Commit de9f159c authored by anozdrin/alik@ibm's avatar anozdrin/alik@ibm

1. Fix memory leak.

2. Use multibyte-safe constant.
parent 072ff4e3
...@@ -1014,8 +1014,8 @@ sp_show_create_routine(THD *thd, int type, sp_name *name) ...@@ -1014,8 +1014,8 @@ sp_show_create_routine(THD *thd, int type, sp_name *name)
{ {
bool err_status= TRUE; bool err_status= TRUE;
sp_head *sp; sp_head *sp;
sp_cache *cache = type == TYPE_ENUM_PROCEDURE ? sp_cache **cache = type == TYPE_ENUM_PROCEDURE ?
thd->sp_proc_cache : thd->sp_func_cache; &thd->sp_proc_cache : &thd->sp_func_cache;
DBUG_ENTER("sp_show_create_routine"); DBUG_ENTER("sp_show_create_routine");
DBUG_PRINT("enter", ("name: %.*s", name->m_name.length, name->m_name.str)); DBUG_PRINT("enter", ("name: %.*s", name->m_name.length, name->m_name.str));
...@@ -1038,7 +1038,7 @@ sp_show_create_routine(THD *thd, int type, sp_name *name) ...@@ -1038,7 +1038,7 @@ sp_show_create_routine(THD *thd, int type, sp_name *name)
thd->variables.max_sp_recursion_depth++; thd->variables.max_sp_recursion_depth++;
} }
if ((sp= sp_find_routine(thd, type, name, &cache, FALSE))) if ((sp= sp_find_routine(thd, type, name, cache, FALSE)))
err_status= sp->show_create_routine(thd, type); err_status= sp->show_create_routine(thd, type);
if (type == TYPE_ENUM_PROCEDURE) if (type == TYPE_ENUM_PROCEDURE)
......
...@@ -2141,7 +2141,7 @@ sp_head::show_create_routine(THD *thd, int type) ...@@ -2141,7 +2141,7 @@ sp_head::show_create_routine(THD *thd, int type)
/* Send header. */ /* Send header. */
fields.push_back(new Item_empty_string(col1_caption, NAME_LEN)); fields.push_back(new Item_empty_string(col1_caption, NAME_CHAR_LEN));
fields.push_back(new Item_empty_string("sql_mode", sql_mode.length)); fields.push_back(new Item_empty_string("sql_mode", sql_mode.length));
{ {
......
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