[Commits] Rev 4062: MDEV-5863: Incorrect handling of temp tables in parallel replication in http://bazaar.launchpad.net/~maria-captains/maria/10.0

knielsen at knielsen-hq.org knielsen at knielsen-hq.org
Wed Mar 19 08:02:49 EET 2014


At http://bazaar.launchpad.net/~maria-captains/maria/10.0

------------------------------------------------------------
revno: 4062
revision-id: knielsen at knielsen-hq.org-20140319060249-301xy2t2re9fmqsj
parent: jplindst at mariadb.org-20140317134941-hl5yqdv531j3eequ
committer: knielsen at knielsen-hq.org
branch nick: work-10.0-mdev5863
timestamp: Wed 2014-03-19 07:02:49 +0100
message:
  MDEV-5863: Incorrect handling of temp tables in parallel replication
  
  MDEV-5863 found multiple problems; this patch is for one of them.
  When query_id in both THD and temp table are zero, this indicates
  just that query_id was never set; however the code would incorrectly
  think they were associated, and wrongly execute code during cleanup
  at SLAVE STOP, causing assertion and possibly other grief.
=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc	2014-03-12 09:26:40 +0000
+++ b/sql/sql_base.cc	2014-03-19 06:02:49 +0000
@@ -656,6 +656,12 @@ static void mark_temp_tables_as_free_for
 {
   DBUG_ENTER("mark_temp_tables_as_free_for_reuse");
 
+  if (thd->query_id == 0)
+  {
+    /* Thread has not executed any statement and has not used any tmp tables */
+    DBUG_VOID_RETURN;
+  }
+  
   thd->lock_temporary_tables();
   for (TABLE *table= thd->temporary_tables ; table ; table= table->next)
   {



More information about the commits mailing list