diff options
author | unknown <Li-Bing.Song@sun.com> | 2009-11-03 18:20:08 +0800 |
---|---|---|
committer | unknown <Li-Bing.Song@sun.com> | 2009-11-03 18:20:08 +0800 |
commit | 9519c8e597ed46de2276f36cf91e0693ae0854fc (patch) | |
tree | a37b65d4d82dc1197dabf02371548c8bb0c3f37a | |
parent | 1ca80ed19e14d8d5837fa900ad75ec1a7a7856e1 (diff) | |
parent | 9819885177059fd75f3250b917142eb9d6ae5b8c (diff) | |
download | mariadb-git-9519c8e597ed46de2276f36cf91e0693ae0854fc.tar.gz |
Manual Merge
-rw-r--r-- | mysql-test/extra/binlog_tests/drop_temp_table.test | 10 | ||||
-rw-r--r-- | mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result | 1 | ||||
-rw-r--r-- | mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result | 1 | ||||
-rw-r--r-- | sql/sql_base.cc | 1 |
4 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/extra/binlog_tests/drop_temp_table.test b/mysql-test/extra/binlog_tests/drop_temp_table.test index 5616fb4a643..63833c10c14 100644 --- a/mysql-test/extra/binlog_tests/drop_temp_table.test +++ b/mysql-test/extra/binlog_tests/drop_temp_table.test @@ -48,6 +48,16 @@ DROP TABLE IF EXISTS tmp2, t; --enable_warnings SELECT GET_LOCK("a",10); + +# +# BUG48216 Replication fails on all slaves after upgrade to 5.0.86 on master +# +# When the session is closed, any temporary tables of the session are dropped +# and are binlogged. But it will be binlogged with a wrong database name when +# the length of the database name('drop-temp-table-test') is greater than the +# current database name('test'). +# +USE test; disconnect con1; connection con2; diff --git a/mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result b/mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result index 0a6ff1d4400..75c088e595d 100644 --- a/mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result +++ b/mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result @@ -19,6 +19,7 @@ DROP TABLE IF EXISTS tmp2, t; SELECT GET_LOCK("a",10); GET_LOCK("a",10) 1 +USE test; SELECT GET_LOCK("a",10); GET_LOCK("a",10) 1 diff --git a/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result b/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result index 8bbf1bccc63..19ddcf49080 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result +++ b/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result @@ -19,6 +19,7 @@ DROP TABLE IF EXISTS tmp2, t; SELECT GET_LOCK("a",10); GET_LOCK("a",10) 1 +USE test; SELECT GET_LOCK("a",10); GET_LOCK("a",10) 1 diff --git a/sql/sql_base.cc b/sql/sql_base.cc index af18660b9a5..be31ffe04dd 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1548,6 +1548,7 @@ void close_temporary_tables(THD *thd) s_query.length() - 1 /* to remove trailing ',' */, 0, FALSE, 0); qinfo.db= db.ptr(); + qinfo.db_len= db.length(); thd->variables.character_set_client= cs_save; mysql_bin_log.write(&qinfo); thd->variables.pseudo_thread_id= save_pseudo_thread_id; |