diff options
author | Alexander Nozdrin <alexander.nozdrin@oracle.com> | 2011-05-16 12:50:42 +0400 |
---|---|---|
committer | Alexander Nozdrin <alexander.nozdrin@oracle.com> | 2011-05-16 12:50:42 +0400 |
commit | 96daf87a10e132e2bbb58e96343ffa0513b56870 (patch) | |
tree | a92c9f933346d809af5f18ad8149c219e04480cb /sql/sql_acl.cc | |
parent | fa9218566c98d2b55e3aab4eca23e56d32a3084e (diff) | |
download | mariadb-git-96daf87a10e132e2bbb58e96343ffa0513b56870.tar.gz |
A patch for Bug#12429877: QUERY_TABLES_LIST::SROUTINES IS NOT
FREED IN FLUSH_READ_LOCK (VALGRIND WARNING).
The problem was that under some circustances the memory allocated
for Query_tables_list::sroutines was not freed properly.
The cause of this problem was the absence of
LEX::restore_backup_query_tables_list() call in one of the branches
in mysql_table_grant() function.
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 18758130767..0eb05489015 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -3644,6 +3644,7 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, { // Should never happen /* Restore the state of binlog format */ DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row()); + thd->lex->restore_backup_query_tables_list(&backup); if (save_binlog_row_based) thd->set_current_stmt_binlog_format_row(); DBUG_RETURN(TRUE); /* purecov: deadcode */ |