Loading client/mysqlbinlog.cc +2 −2 Original line number Diff line number Diff line Loading @@ -723,8 +723,8 @@ static int dump_remote_log_entries(const char* logname) */ if (old_off) old_off+= len-1; else old_off= BIN_LOG_HEADER_SIZE; else // first event, so it's a fake Rotate event old_off= position; } return 0; } Loading mysql-test/r/rpl_drop.result 0 → 100644 +10 −0 Original line number Diff line number Diff line 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' mysql-test/t/rpl_drop.test 0 → 100644 +10 −0 Original line number Diff line number Diff line # 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; sql/sql_table.cc +13 −10 Original line number Diff line number Diff line Loading @@ -230,6 +230,17 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, wrong_tables.append(String(table->real_name)); } } error= 0; if (wrong_tables.length()) { if (!foreign_key_error) my_error(ER_BAD_TABLE_ERROR,MYF(0),wrong_tables.c_ptr()); else my_error(ER_ROW_IS_REFERENCED,MYF(0)); error= 1; } if (some_tables_deleted || tmp_table_deleted) { query_cache_invalidate3(thd, tables, 0); Loading @@ -238,6 +249,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, 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); Loading @@ -247,15 +259,6 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, } unlock_table_names(thd, tables); error= 0; if (wrong_tables.length()) { if (!foreign_key_error) my_error(ER_BAD_TABLE_ERROR,MYF(0),wrong_tables.c_ptr()); else my_error(ER_ROW_IS_REFERENCED,MYF(0)); error= 1; } DBUG_RETURN(error); } Loading Loading
client/mysqlbinlog.cc +2 −2 Original line number Diff line number Diff line Loading @@ -723,8 +723,8 @@ static int dump_remote_log_entries(const char* logname) */ if (old_off) old_off+= len-1; else old_off= BIN_LOG_HEADER_SIZE; else // first event, so it's a fake Rotate event old_off= position; } return 0; } Loading
mysql-test/r/rpl_drop.result 0 → 100644 +10 −0 Original line number Diff line number Diff line 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'
mysql-test/t/rpl_drop.test 0 → 100644 +10 −0 Original line number Diff line number Diff line # 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;
sql/sql_table.cc +13 −10 Original line number Diff line number Diff line Loading @@ -230,6 +230,17 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, wrong_tables.append(String(table->real_name)); } } error= 0; if (wrong_tables.length()) { if (!foreign_key_error) my_error(ER_BAD_TABLE_ERROR,MYF(0),wrong_tables.c_ptr()); else my_error(ER_ROW_IS_REFERENCED,MYF(0)); error= 1; } if (some_tables_deleted || tmp_table_deleted) { query_cache_invalidate3(thd, tables, 0); Loading @@ -238,6 +249,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, 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); Loading @@ -247,15 +259,6 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, } unlock_table_names(thd, tables); error= 0; if (wrong_tables.length()) { if (!foreign_key_error) my_error(ER_BAD_TABLE_ERROR,MYF(0),wrong_tables.c_ptr()); else my_error(ER_ROW_IS_REFERENCED,MYF(0)); error= 1; } DBUG_RETURN(error); } Loading