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 | |
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')
-rw-r--r-- | sql/sp.cc | 6 | ||||
-rw-r--r-- | sql/sp_head.cc | 2 |
2 files changed, 4 insertions, 4 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) diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 746fc17ce4e..566aadcc864 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -2141,7 +2141,7 @@ sp_head::show_create_routine(THD *thd, int type) /* 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)); { |