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 | 1c73da70cea05fa6d7c73cda83d38e1ae6a101df (patch) | |
tree | 14bfefa872195990d45ab8f3ee850730cd31ed1b /sql/sql_prepare.cc | |
parent | ca7f3f2ae08e30cd6c68cb7af60d4528759f8bbd (diff) | |
parent | 3742489c3797b14ac3c4453ef4058b5a87a62442 (diff) | |
download | mariadb-git-1c73da70cea05fa6d7c73cda83d38e1ae6a101df.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 || |