1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0

into mysql.com:/home/mysql_src/mysql-4.0
This commit is contained in:
guilhem@mysql.com
2004-07-17 17:10:52 +02:00
4 changed files with 41 additions and 18 deletions

View File

@ -723,8 +723,8 @@ static int dump_remote_log_entries(const char* logname)
*/ */
if (old_off) if (old_off)
old_off+= len-1; old_off+= len-1;
else else // first event, so it's a fake Rotate event
old_off= BIN_LOG_HEADER_SIZE; old_off= position;
} }
return 0; return 0;
} }

View File

@ -0,0 +1,10 @@
slave stop;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
slave start;
drop table if exists t1, t2;
create table t1 (a int);
drop table t1, t2;
Unknown table 't2'

View File

@ -0,0 +1,10 @@
# Testcase for BUG#4552 (DROP on two tables, one of which does not
# exist, must be binlogged with a non-zero error code)
source include/master-slave.inc;
drop table if exists t1, t2;
create table t1 (a int);
--error 1051;
drop table t1, t2;
save_master_pos;
connection slave;
sync_with_master;

View File

@ -230,23 +230,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
wrong_tables.append(String(table->real_name)); wrong_tables.append(String(table->real_name));
} }
} }
if (some_tables_deleted || tmp_table_deleted)
{
query_cache_invalidate3(thd, tables, 0);
if (!dont_log_query)
{
mysql_update_log.write(thd, thd->query,thd->query_length);
if (mysql_bin_log.is_open())
{
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
tmp_table_deleted && !some_tables_deleted);
mysql_bin_log.write(&qinfo);
}
}
}
unlock_table_names(thd, tables);
error= 0; error= 0;
if (wrong_tables.length()) if (wrong_tables.length())
{ {
@ -256,6 +240,25 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
my_error(ER_ROW_IS_REFERENCED,MYF(0)); my_error(ER_ROW_IS_REFERENCED,MYF(0));
error= 1; error= 1;
} }
if (some_tables_deleted || tmp_table_deleted)
{
query_cache_invalidate3(thd, tables, 0);
if (!dont_log_query)
{
mysql_update_log.write(thd, thd->query,thd->query_length);
if (mysql_bin_log.is_open())
{
if (!error)
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
tmp_table_deleted && !some_tables_deleted);
mysql_bin_log.write(&qinfo);
}
}
}
unlock_table_names(thd, tables);
DBUG_RETURN(error); DBUG_RETURN(error);
} }