* Kristofer Pettersson <kpettersson@stripped> [08/10/06 21:58]:
> 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.
OK to push.
> === 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
--