Commit ea7df08c authored by jimw@mysql.com's avatar jimw@mysql.com

Fix crash in 'SHOW CREATE FUNCTION' introduced by Monty's last

cleanup.
parent 5d3b4067
......@@ -1320,7 +1320,6 @@ sp_head::show_create_function(THD *thd)
String buffer(buff, sizeof(buff), system_charset_info);
int res;
List<Item> field_list;
sys_var *sql_mode_var;
byte *sql_mode_str;
ulong sql_mode_len;
bool full_access;
......@@ -1337,8 +1336,7 @@ sp_head::show_create_function(THD *thd)
m_sql_mode,
&sql_mode_len);
field_list.push_back(new Item_empty_string("Function",NAME_LEN));
if (sql_mode_var)
field_list.push_back(new Item_empty_string("sql_mode", sql_mode_len));
field_list.push_back(new Item_empty_string("sql_mode", sql_mode_len));
field_list.push_back(new Item_empty_string("Create Function",
max(buffer.length(),1024)));
if (protocol->send_fields(&field_list,
......
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