List:Commits« Previous MessageNext Message »
From:Ramil Kalimullin Date:October 7 2008 3:52pm
Subject:bzr push into mysql-5.1 branch (ramil:2759 to 2760) Bug#38269
View as plain text  
 2760 Ramil Kalimullin	2008-10-07
      Fix for bug#38269: pushbuild gives valgrind error in 
      ha_statistic_increment for rpl_temporary
      
      Problem: in some cases master send a special event to reconnecting
      slave to keep slave's temporary tables (see #17284) and they still 
      have references to the "old" SQL slave thread and use them to access
      thread's data.
      
      Fix: set temporary tables thread references to the actual SQL slave
      thread in such cases.
modified:
  mysql-test/suite/rpl/t/disabled.def
  sql/log_event.cc

 2759 Georgi Kodinov	2008-10-07 [merge]
      merged 5.1-5.1.29-rc -> bug 39812
modified:
  mysql-test/r/log_basic.result
  mysql-test/r/log_bin_trust_routine_creators_basic.result
  mysql-test/r/log_state.result
  mysql-test/r/warnings.result
  mysql-test/suite/rpl/r/rpl_sp.result
  mysql-test/t/log_basic.test
  mysql-test/t/log_state.test
  sql/mysqld.cc
  sql/set_var.cc

=== modified file 'mysql-test/suite/rpl/t/disabled.def'
--- a/mysql-test/suite/rpl/t/disabled.def	2008-07-23 14:34:02 +0000
+++ b/mysql-test/suite/rpl/t/disabled.def	2008-10-07 13:21:17 +0000
@@ -12,5 +12,4 @@
 
 rpl_redirect               : Failure is sporadic and and the test is superfluous (mats)
 rpl_innodb_bug28430        : Failure on Solaris Bug #36793
-rpl_temporary              : BUG#38269 2008-07-21 Sven valgrind error in pushbuild
 rpl_flushlog_loop          : BUG#37733 2008-07-23 Sven disabled in 5.1-bugteam. the bug has been fixed in 5.1-rpl: please re-enable when that gets pushed to main

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2008-10-03 07:36:22 +0000
+++ b/sql/log_event.cc	2008-10-07 13:21:17 +0000
@@ -3350,6 +3350,17 @@ int Start_log_event_v3::do_apply_event(R
       close_temporary_tables(thd);
       cleanup_load_tmpdir();
     }
+    else
+    {
+      /*
+        Set all temporary tables thread references to the current thread
+        as they may point to the "old" SQL slave thread in case of its
+        restart.
+      */
+      TABLE *table;
+      for (table= thd->temporary_tables; table; table= table->next)
+        table->in_use= thd;
+    }
     break;
 
     /*

Thread
bzr push into mysql-5.1 branch (ramil:2759 to 2760) Bug#38269Ramil Kalimullin7 Oct