diff options
author | Chad MILLER <chad@mysql.com> | 2008-12-17 15:01:34 -0500 |
---|---|---|
committer | Chad MILLER <chad@mysql.com> | 2008-12-17 15:01:34 -0500 |
commit | 926e5f6694d1bb1dd5b8074efd526fd8983b620f (patch) | |
tree | 14bfefa872195990d45ab8f3ee850730cd31ed1b /sql/sql_prepare.cc | |
parent | 27d35e3517a063c9259a0f8b9638bf3073cf020b (diff) | |
parent | 4d1a042df0c52fd7c721313ec84d39e2b2c0a2f6 (diff) | |
download | mariadb-git-926e5f6694d1bb1dd5b8074efd526fd8983b620f.tar.gz |
Merged from 5.0 (enterprise).
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r-- | sql/sql_prepare.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index ae6764254cd..505a3d122b4 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2852,12 +2852,13 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len) old_stmt_arena= thd->stmt_arena; thd->stmt_arena= this; - Lex_input_stream lip(thd, thd->query, thd->query_length); - lip.stmt_prepare_mode= TRUE; - thd->m_lip= &lip; + Parser_state parser_state(thd, thd->query, thd->query_length); + parser_state.m_lip.stmt_prepare_mode= TRUE; + thd->m_parser_state= &parser_state; lex_start(thd); lex->safe_to_cache_query= FALSE; int err= MYSQLparse((void *)thd); + thd->m_parser_state= NULL; lex->set_trg_event_type_for_tables(); error= err || thd->is_fatal_error || |