List:Commits« Previous MessageNext Message »
From:Kristofer Pettersson Date:October 6 2008 2:13pm
Subject:bzr commit into mysql-5.1 branch (kpettersson:2730) Bug#38692
View as plain text  
#At file:///home/thek/Development/cpp/mysqlbzr/mysql-5.1-bug38692/

 2730 Kristofer Pettersson	2008-10-06
      Bug#38692 concurrent inserts cause valgrind errors in Query_cache::invalidate
      
      Concurrent inserts produce valgrind error messages.
      The reason is that the query cache is invalidated after the target table object
      is closed.
      By executing query cache invalidation before the delayed insert thread is
      terminated avoids this issue.
modified:
  sql/sql_insert.cc

per-file messages:
  sql/sql_insert.cc
    Executing end_delayed_insert will invalidate the elements in table_list. Hence
query_cache_invalidate3 must be called before this function since it iterates the
table_list.
=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc	2008-09-10 14:58:03 +0000
+++ b/sql/sql_insert.cc	2008-10-06 12:13:25 +0000
@@ -825,12 +825,12 @@ bool mysql_insert(THD *thd,TABLE_LIST *t
 #ifndef EMBEDDED_LIBRARY
   if (lock_type == TL_WRITE_DELAYED)
   {
+    query_cache_invalidate3(thd, table_list, 1);
     if (!error)
     {
       info.copied=values_list.elements;
       end_delayed_insert(thd);
     }
-    query_cache_invalidate3(thd, table_list, 1);
   }
   else
 #endif

Thread
bzr commit into mysql-5.1 branch (kpettersson:2730) Bug#38692Kristofer Pettersson6 Oct
  • Re: bzr commit into mysql-5.1 branch (kpettersson:2730) Bug#38692Konstantin Osipov7 Oct