diff options
Diffstat (limited to 'sql/sp.cc')
-rw-r--r-- | sql/sp.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sp.cc b/sql/sp.cc index 4164a27ca5f..9d574c81545 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -292,6 +292,7 @@ db_find_routine(THD *thd, int type, sp_name *name, sp_head **sphp) *sphp= thd->lex->sphead; (*sphp)->set_info((char *)definer, (uint)strlen(definer), created, modified, &chistics, sql_mode); + (*sphp)->optimize(); } thd->lex->sql_command= oldcmd; thd->variables.sql_mode= old_sql_mode; |