Commit e53419b4 authored by unknown's avatar unknown
Browse files

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
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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,7 +1336,6 @@ 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("Create Function",
					     max(buffer.length(),1024)));