Commit 81a3130d authored by sasha@mysql.sashanet.com's avatar sasha@mysql.sashanet.com
Browse files

spurious binlog error code logging on temp table auto-drop fixed

added a new replication test
parent 5f93b1e4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
n	m
1	2
n
45
+21 −0
Original line number Diff line number Diff line
source include/master-slave.inc;
connection master;
use test;
drop database if exists d1;
create database d1;
create table d1.t1 ( n int);
alter table d1.t1 add m int;
insert into d1.t1 values (1,2);
create table d1.t2 (n int);
insert into d1.t2 values (45);
rename table d1.t2 to d1.t3, d1.t1 to d1.t2;
save_master_pos;
connection slave;
sync_with_master;
select * from d1.t2;
select * from d1.t3;
connection master;
drop database d1;
save_master_pos;
connection slave;
sync_with_master;
+1 −0
Original line number Diff line number Diff line
@@ -546,6 +546,7 @@ void close_temporary_tables(THD *thd)
    *--end = 0;					// Remove last ','
    thd->query_length = (uint)(end-query);
    Query_log_event qinfo(thd, query);
    qinfo.error_code=0;
    mysql_bin_log.write(&qinfo);
    thd->query_length = save_query_len;
  }