Commit 7a17e979 authored by unknown's avatar unknown

Merge serg@bk-internal.mysql.com:/home/bk/mysql-4.1/

into sergbook.mysql.com:/usr/home/serg/Abk/mysql-4.1


configure.in:
  Auto merged
parents 1a4532e3 8dd8f60a
......@@ -118,7 +118,7 @@ AC_SUBST(SAVE_LDFLAGS)
AC_SUBST(SAVE_CXXLDFLAGS)
AC_SUBST(CXXLDFLAGS)
AC_PREREQ(2.57)dnl Minimum Autoconf version required.
AC_PREREQ(2.52)dnl Minimum Autoconf version required.
#AC_ARG_PROGRAM # Automaticly invoked by AM_INIT_AUTOMAKE
AM_SANITY_CHECK
......
This diff is collapsed.
......@@ -5,30 +5,33 @@
connection master;
--disable_warnings
drop database if exists d1;
drop database if exists mysqltest1;
--enable_warnings
create database d1;
create table d1.t1 (n int);
insert into d1.t1 values (1);
select * from d1.t1 into outfile 'd1/f1.txt';
create table d1.t2 (n int);
create table d1.t3 (n int);
create database mysqltest1;
create table mysqltest1.t1 (n int);
insert into mysqltest1.t1 values (1);
select * from mysqltest1.t1 into outfile 'mysqltest1/f1.txt';
create table mysqltest1.t2 (n int);
create table mysqltest1.t3 (n int);
--error 1010
drop database d1;
use d1;
drop database mysqltest1;
use mysqltest1;
show tables;
# test the branch of the code that deals with the query buffer overflow
--disable_query_log
let $1=1000;
while ($1)
{
eval create table d1.t$1(n int);
eval create table mysqltest1.t$1(n int);
dec $1;
}
--enable_query_log
--error 1010
drop database d1;
use d1;
drop database mysqltest1;
use mysqltest1;
show tables;
use test;
create table t1 (n int);
......@@ -36,7 +39,7 @@ insert into t1 values (1234);
sync_slave_with_master;
connection slave;
use d1;
use mysqltest1;
show tables;
use test;
select * from t1;
......@@ -48,5 +51,5 @@ sync_slave_with_master;
#cleanup
connection slave;
stop slave;
system rm -rf var/master-data/d1;
system rm -rf var/master-data/mysqltest1;
......@@ -697,41 +697,38 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
else if (mysql_bin_log.is_open())
{
char* query= thd->alloc(MAX_DROP_TABLE_Q_LEN);
if (!query)
goto exit; /* not much else we can do */
char* p= strmov(query,"drop table ");
char* p= strmov(query,"drop table ");
char* p_end= query + MAX_DROP_TABLE_Q_LEN;
TABLE_LIST* tbl;
bool last_query_needs_write= 0;
uint db_len= strlen(db);
for (tbl= dropped_tables;tbl;tbl= tbl->next)
{
if (!tbl->was_dropped)
continue;
/* 3 for the quotes and the comma*/
uint tbl_name_len= strlen(tbl->real_name) + 3;
/* 3 for the quotes and the comma*/
uint tbl_name_len= strlen(tbl->real_name) + 3;
if (p + tbl_name_len + 1 >= p_end)
{
*--p= 0; /* kill , */
write_to_binlog(thd, query, p - query, db, db_len);
p= query + 11; /* reuse the initial "drop table" */
}
}
*p++ = '`';
p= strmov(p,tbl->real_name);
*p++ = '`';
*p++ = ',';
last_query_needs_write= 1;
}
if (last_query_needs_write)
{
*--p= 0;
write_to_binlog(thd, query, p - query, db, db_len);
}
}
}
exit:
......
......@@ -220,7 +220,6 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
for (table=tables ; table ; table=table->next)
{
char *db=table->db;
table->was_dropped= 0;
mysql_ha_flush(thd, table, MYSQL_HA_CLOSE_FINAL);
if (!close_temporary_table(thd, db, table->real_name))
{
......@@ -281,8 +280,6 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
wrong_tables.append(',');
wrong_tables.append(String(table->real_name,system_charset_info));
}
else
table->was_dropped= 1;
}
thd->tmp_table_used= tmp_table_deleted;
error= 0;
......
......@@ -235,9 +235,6 @@ typedef struct st_table_list
bool cacheable_table; /* stop PS caching */
/* used in multi-upd privelege check */
bool table_in_update_from_clause;
/* used for proper partially successful DROP DATABASE binlogging */
bool was_dropped;
} TABLE_LIST;
typedef struct st_changed_table_list
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment