summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
authorunknown <pem@mysql.comhem.se>2004-08-02 18:05:31 +0200
committerunknown <pem@mysql.comhem.se>2004-08-02 18:05:31 +0200
commit81aad353c5338433db4ab3e208e1858018ae7982 (patch)
treec0c3ba42464ab9922b65d89d2d985f9b8ee830da /sql/sp.cc
parent4467bcf26e0e5f9b205864b5f54f6234c62a2fe3 (diff)
downloadmariadb-git-81aad353c5338433db4ab3e208e1858018ae7982.tar.gz
WL#2001: Optimize stored procedure code.
Added a simple optimizer that shortcuts jumps and skip unused instructions. sql/sp.cc: Optimize the code after parsing. sql/sp_head.cc: Added a simple optimizer that shortcuts jumps and skip unused instructions. sql/sp_head.h: Added a simple optimizer that shortcuts jumps and skip unused instructions.
Diffstat (limited to 'sql/sp.cc')
-rw-r--r--sql/sp.cc1
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;