diff options
author | unknown <malff/marcsql@weblab.(none)> | 2007-04-25 21:38:12 -0600 |
---|---|---|
committer | unknown <malff/marcsql@weblab.(none)> | 2007-04-25 21:38:12 -0600 |
commit | 034c11f3cdac8b2b39dd8593d1fbad5b92f98879 (patch) | |
tree | f8e46975bbaed334eddc4cc2ab0c1b752a7b321d /sql/sp.cc | |
parent | 5e414cd222b1d39eb49371ba28fb990a963017c5 (diff) | |
download | mariadb-git-034c11f3cdac8b2b39dd8593d1fbad5b92f98879.tar.gz |
manual merge 5.0-runtime -> 5.1->runtime, with 25411 part I
Diffstat (limited to 'sql/sp.cc')
-rw-r--r-- | sql/sp.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sp.cc b/sql/sp.cc index 49b8b304e76..0a99be3f970 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -384,10 +384,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, 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; |