summaryrefslogtreecommitdiff
path: root/sql/sql_prepare.cc
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-06-11 16:52:06 +0400
committerAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-06-11 16:52:06 +0400
commit386929d3aee738cd0e3db335fb54e95bba8f9985 (patch)
treedd79682febb582afa1309c3b04f172d140b20aa6 /sql/sql_prepare.cc
parent0823afc8bf160e03ce722c5e3cef21024b63b99a (diff)
parentc2ebb0ac882feadedd0bbca71277fd2de66aa957 (diff)
downloadmariadb-git-386929d3aee738cd0e3db335fb54e95bba8f9985.tar.gz
Manual merge from the bugfix tree.
conflicts: conflict sql/sql_parse.cc
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r--sql/sql_prepare.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index 4fe64732c72..85ec5a72d77 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -3033,13 +3033,16 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len)
old_stmt_arena= thd->stmt_arena;
thd->stmt_arena= this;
- Parser_state parser_state(thd, thd->query(), thd->query_length());
- parser_state.m_lip.stmt_prepare_mode= TRUE;
- lex_start(thd);
+ Parser_state parser_state;
+ if (!parser_state.init(thd, thd->query(), thd->query_length()))
+ {
+ parser_state.m_lip.stmt_prepare_mode= TRUE;
+ lex_start(thd);
- error= parse_sql(thd, & parser_state, NULL) ||
- thd->is_error() ||
- init_param_array(this);
+ error= parse_sql(thd, & parser_state, NULL) ||
+ thd->is_error() ||
+ init_param_array(this);
+ }
lex->set_trg_event_type_for_tables();