Fix for memory leak which was introduced by patch improving locking in SP.

Made mysql_make_view() to call destructor for st_lex_local objects before
throwing them away (this happens in case of error).
parent 5b16dbf9
...@@ -816,8 +816,8 @@ typedef struct st_lex ...@@ -816,8 +816,8 @@ typedef struct st_lex
hash_init(&spfuns, system_charset_info, 0, 0, 0, sp_lex_sp_key, 0, 0); hash_init(&spfuns, system_charset_info, 0, 0, 0, sp_lex_sp_key, 0, 0);
hash_init(&spprocs, system_charset_info, 0, 0, 0, sp_lex_sp_key, 0, 0); hash_init(&spprocs, system_charset_info, 0, 0, 0, sp_lex_sp_key, 0, 0);
} }
~st_lex() virtual ~st_lex()
{ {
hash_free(&spfuns); hash_free(&spfuns);
hash_free(&spprocs); hash_free(&spprocs);
......
...@@ -854,6 +854,7 @@ ok2: ...@@ -854,6 +854,7 @@ ok2:
err: err:
if (arena) if (arena)
thd->restore_backup_item_arena(arena, &backup); thd->restore_backup_item_arena(arena, &backup);
delete table->view;
table->view= 0; // now it is not VIEW placeholder table->view= 0; // now it is not VIEW placeholder
thd->lex= old_lex; thd->lex= old_lex;
DBUG_RETURN(1); DBUG_RETURN(1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment