#At file:///export/home/x/mysql-trunk-bugfixing-test/ based on revid:marc.alff@stripped
3242 Jon Olav Hauglid 2010-08-26
Bug #56241 Valgrind/CDB warnings for many tests in trunk-bugfixing
The reason for the warnings was that the performance schema
instrumentation function release_table_share() could be called
on a TABLE_SHARE that had already been free'd.
The bug was introduced during merging of the patch for Bug#52044
from mysql-5.5-bugfixing (which does not include the call to
PSI release_table_share()) to mysql-trunk-bugfixing.
This patch fixes the problem by moving the release_table_share()
call to TABLE_SHARE::destroy() before the TABLE_SHARE is free'd.
No test case added as this problem is detected by existing
=== modified file 'sql/table.cc'
--- a/sql/table.cc 2010-08-20 08:48:59 +0000
+++ b/sql/table.cc 2010-08-26 15:17:35 +0000
@@ -426,6 +426,12 @@ void TABLE_SHARE::destroy()
+ if (likely(PSI_server && m_psi))
Make a copy since the share is allocated in its own root,
and free_root() updates its argument after freeing the memory.
@@ -477,12 +483,6 @@ void free_table_share(TABLE_SHARE *share
for this thread to do the work.
- if (likely(PSI_server && share->m_psi))
Attachment: [text/bzr-bundle] email@example.com