Commit b94d70a6 authored by unknown's avatar unknown

BUG#19188 incorrect temporary table name of DROP query in replication

manual merge of 5.0 patch and fixing an issue with closing temp tables when no binlog or RBR.
Note, that despite temporary_tables is indeed double-linked list in 5.1 (patch for bug #19881) it is still enough to use only 'next' reference, as it was done for 5.0, when the list is sorted and 
destoyed after.


mysql-test/r/rpl_temporary.result:
  results changed
mysql-test/t/rpl_temporary.test:
  fixing kill stmt for a thread with temp tables. Restoring check of temp table with accent char.
sql/sql_base.cc:
  manual merge part 2. Leaving only extensively refactored close_temporary_tables from local rep.
parent 1730c0c7
......@@ -76,16 +76,11 @@ drop table t1,t2;
create temporary table t3 (f int);
create temporary table t4 (f int);
create table t5 (f int);
drop table if exists t999;
create temporary table t999 (f int);
LOAD DATA INFILE "./tmp/bl_dump_thread_id" into table t999;
drop table t999;
insert into t4 values (1);
kill `select id from information_schema.processlist where command='Binlog Dump'`;
select id from information_schema.processlist where command='Binlog Dump' into @id;
kill @id;
insert into t5 select * from t4;
select * from t5 /* must be 1 after reconnection */;
f
1
drop temporary table t4;
drop table t5;
set @@session.pseudo_thread_id=100;
......@@ -105,4 +100,7 @@ select * from t1 /* must be 1 */;
f
1
drop table t1;
End of 5.1 tests
select * from t1;
a
1
drop table t1;
......@@ -142,11 +142,8 @@ create temporary table t4 (f int);
create table t5 (f int);
sync_with_master;
# find dumper's $id
source include/get_binlog_dump_thread_id.inc;
insert into t4 values (1);
# a hint how to do that in 5.1
--replace_result $id "`select id from information_schema.processlist where command='Binlog Dump'`"
eval kill $id; # to stimulate reconnection by slave w/o timeout
select id from information_schema.processlist where command='Binlog Dump' into @id;
kill @id; # to stimulate reconnection by slave w/o timeout
insert into t5 select * from t4;
save_master_pos;
......@@ -190,5 +187,17 @@ select * from t1 /* must be 1 */;
connection master;
drop table t1;
--echo End of 5.1 tests
#
#14157: utf8 encoding in binlog without set character_set_client
#
--exec $MYSQL --character-sets-dir=../sql/share/charsets/ --default-character-set=latin1 test -e 'create table t1 (a int); set names latin1; create temporary table `äöüÄÖÜ` (a int); insert into `äöüÄÖÜ` values (1); insert into t1 select * from `äöüÄÖÜ`'
sync_slave_with_master;
#connection slave;
select * from t1;
connection master;
drop table t1;
# End of 5.1 tests
This diff is collapsed.
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