summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
authorunknown <malff/marcsql@weblab.(none)>2007-04-24 09:25:54 -0600
committerunknown <malff/marcsql@weblab.(none)>2007-04-24 09:25:54 -0600
commit6f5cacfae89cdd7ef4498ab73b4213117a118e9b (patch)
treec077f6aec7d906b5ade273fd8d620f53aedbdfcc /sql/sp.cc
parentc94da3764fde2c4cb775317052b483df9f45d129 (diff)
parent3eff7d4dd5bba598fe055808697d630622fa249b (diff)
downloadmariadb-git-6f5cacfae89cdd7ef4498ab73b4213117a118e9b.tar.gz
Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into weblab.(none):/home/marcsql/TREE/mysql-5.0-25411_d sql/item_func.cc: Auto merged sql/log_event.cc: Auto merged sql/mysql_priv.h: Auto merged sql/slave.cc: Auto merged sql/sp.cc: Auto merged sql/sp_head.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_view.cc: Auto merged
Diffstat (limited to 'sql/sp.cc')
-rw-r--r--sql/sp.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sp.cc b/sql/sp.cc
index 4fc9ea1f602..976bb1911b2 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -434,10 +434,15 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
if ((ret= sp_use_new_db(thd, name->m_db, &old_db, 1, &dbchanged)))
goto end;
- lex_start(thd, (uchar*)defstr.c_ptr(), defstr.length());
+ {
+ Lex_input_stream lip(thd, defstr.c_ptr(), defstr.length());
+ thd->m_lip= &lip;
+ lex_start(thd);
+ ret= MYSQLparse(thd);
+ }
thd->spcont= 0;
- if (MYSQLparse(thd) || thd->is_fatal_error || newlex.sphead == NULL)
+ if (ret || thd->is_fatal_error || newlex.sphead == NULL)
{
sp_head *sp= newlex.sphead;