Commit e53419b4 authored by unknown's avatar unknown

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

cleanup.


sql/sp_head.cc:
  Remove unused variable and always add sql_mode to fields in
  sp_head::show_create_function().
parent aa337b1d
...@@ -1320,7 +1320,6 @@ sp_head::show_create_function(THD *thd) ...@@ -1320,7 +1320,6 @@ sp_head::show_create_function(THD *thd)
String buffer(buff, sizeof(buff), system_charset_info); String buffer(buff, sizeof(buff), system_charset_info);
int res; int res;
List<Item> field_list; List<Item> field_list;
sys_var *sql_mode_var;
byte *sql_mode_str; byte *sql_mode_str;
ulong sql_mode_len; ulong sql_mode_len;
bool full_access; bool full_access;
...@@ -1337,8 +1336,7 @@ sp_head::show_create_function(THD *thd) ...@@ -1337,8 +1336,7 @@ sp_head::show_create_function(THD *thd)
m_sql_mode, m_sql_mode,
&sql_mode_len); &sql_mode_len);
field_list.push_back(new Item_empty_string("Function",NAME_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", field_list.push_back(new Item_empty_string("Create Function",
max(buffer.length(),1024))); max(buffer.length(),1024)));
if (protocol->send_fields(&field_list, 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