mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
4baf459644
> ------------------------------------------------------------ > revno: 2818.1.18 > revision-id: li-bing.song@sun.com-20091103090041-zj7nedx6ok5jgges > parent: davi.arnaut@sun.com-20091102201021-1brn7cjb1kvqg9gr > committer: <Li-Bing.Song@sun.com> > branch nick: mysql-5.0-bugteam > timestamp: Tue 2009-11-03 17:00:41 +0800 > message: > BUG#48216 Replication fails on all slaves after upgrade to 5.0.86 on master > > When a sessione is closed, all temporary tables of the session are automatically > dropped and are binlogged. But it will be binlogged with wrong database names when > the length of the temporary tables' database names are greater than the > length of the current database name or the current database is not set. > > Query_log_event's db_len is forgot to set when Query_log_event's db is set. > This patch wrote code to set db_len immediately after db has set.
23 lines
1 KiB
Text
23 lines
1 KiB
Text
drop database if exists `drop-temp+table-test`;
|
|
reset master;
|
|
create database `drop-temp+table-test`;
|
|
use `drop-temp+table-test`;
|
|
create temporary table shortn1 (a int);
|
|
create temporary table `table:name` (a int);
|
|
create temporary table shortn2 (a int);
|
|
select get_lock("a",10);
|
|
get_lock("a",10)
|
|
1
|
|
USE test;
|
|
select get_lock("a",10);
|
|
get_lock("a",10)
|
|
1
|
|
show binlog events;
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
|
|
master-bin.000001 # Query 1 # create database `drop-temp+table-test`
|
|
master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table shortn1 (a int)
|
|
master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table `table:name` (a int)
|
|
master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table shortn2 (a int)
|
|
master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `shortn2`,`table:name`,`shortn1`
|
|
drop database `drop-temp+table-test`;
|