List:Commits« Previous MessageNext Message »
From:Li-Bing.Song Date:November 3 2009 9:01am
Subject:bzr push into mysql-5.0-bugteam branch (Li-Bing.Song:2835 to 2836) Bug#48216
View as plain text  
 2836 Li-Bing.Song@stripped	2009-11-03
      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.

    modified:
      mysql-test/r/drop_temp_table.result
      mysql-test/t/drop_temp_table.test
      sql/sql_base.cc
 2835 Davi Arnaut	2009-11-02
      Bug#44952: Ndbd file system inconsistency error
      
      Backport a ndb patch: fix bug with crash during restart, where
      a mbyte incorrectly could be skipped, leading to "end of log
      wo/ finding gci".

    modified:
      ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
=== modified file 'mysql-test/r/drop_temp_table.result'
--- a/mysql-test/r/drop_temp_table.result	2009-08-27 16:28:09 +0000
+++ b/mysql-test/r/drop_temp_table.result	2009-11-03 09:00:41 +0000
@@ -8,6 +8,7 @@ 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

=== modified file 'mysql-test/t/drop_temp_table.test'
--- a/mysql-test/t/drop_temp_table.test	2007-06-14 21:23:30 +0000
+++ b/mysql-test/t/drop_temp_table.test	2009-11-03 09:00:41 +0000
@@ -14,6 +14,17 @@ create temporary table shortn1 (a int);
 create temporary table `table:name` (a int);
 create temporary table shortn2 (a int);
 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;

=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc	2009-08-28 15:51:31 +0000
+++ b/sql/sql_base.cc	2009-11-03 09:00:41 +0000
@@ -798,6 +798,7 @@ void close_temporary_tables(THD *thd)
                             s_query.length() - 1 /* to remove trailing ',' */,
                             0, FALSE, THD::NOT_KILLED);
       qinfo.db= db.ptr();
+      qinfo.db_len= db.length();
       thd->variables.character_set_client= cs_save;
       DBUG_ASSERT(qinfo.error_code == 0);
       mysql_bin_log.write(&qinfo);


Attachment: [text/bzr-bundle] bzr/li-bing.song@sun.com-20091103090041-zj7nedx6ok5jgges.bundle
Thread
bzr push into mysql-5.0-bugteam branch (Li-Bing.Song:2835 to 2836) Bug#48216Li-Bing.Song3 Nov