From 85ca983736fe3b559adcf9b7b4f722e2d0098b45 Mon Sep 17 00:00:00 2001 From: Kristofer Pettersson Date: Tue, 7 Oct 2008 11:48:27 +0200 Subject: [PATCH] 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. Since the delayed insert thread already takes care of invalidating the query cache there is no need to try to synchronize an extra cache invalidation call. The fix is to remove the query_cache_invalidate3 call altogether. sql/sql_insert.cc: When end_delayed_insert is called, the table_list items will be invalidated by the concurrent insert thread. Further more there is no need to call query_cache_invalidate here since the delayed insert thread takes care of this already. --- sql/sql_insert.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 8a7a5ca90a5..994e2b2c72a 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -830,7 +830,6 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, info.copied=values_list.elements; end_delayed_insert(thd); } - query_cache_invalidate3(thd, table_list, 1); } else #endif