diff options
author | unknown <anozdrin/alik@ibm.> | 2007-05-30 16:24:21 +0400 |
---|---|---|
committer | unknown <anozdrin/alik@ibm.> | 2007-05-30 16:24:21 +0400 |
commit | 9e25cfba001c12d1ff0608520efef8574983202c (patch) | |
tree | d891648a2e8e2804f1d87f26e3d927d85dbf781a /sql/sp.cc | |
parent | 9e600f43bcd497dddcd128bbd49905791e556c26 (diff) | |
download | mariadb-git-9e25cfba001c12d1ff0608520efef8574983202c.tar.gz |
1. Fix memory leak.
2. Use multibyte-safe constant.
sql/sp.cc:
Fix memory leak.
sql/sp_head.cc:
Use multibyte-safe constant.
Diffstat (limited to 'sql/sp.cc')
-rw-r--r-- | sql/sp.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sp.cc b/sql/sp.cc index 79daed9a627..9ce245785d7 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -1014,8 +1014,8 @@ sp_show_create_routine(THD *thd, int type, sp_name *name) { bool err_status= TRUE; sp_head *sp; - sp_cache *cache = type == TYPE_ENUM_PROCEDURE ? - thd->sp_proc_cache : thd->sp_func_cache; + sp_cache **cache = type == TYPE_ENUM_PROCEDURE ? + &thd->sp_proc_cache : &thd->sp_func_cache; DBUG_ENTER("sp_show_create_routine"); 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) 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); if (type == TYPE_ENUM_PROCEDURE) |