summaryrefslogtreecommitdiff
path: root/sql/sql_prepare.cc
diff options
context:
space:
mode:
authorChad MILLER <chad@mysql.com>2008-12-17 15:01:34 -0500
committerChad MILLER <chad@mysql.com>2008-12-17 15:01:34 -0500
commit1c73da70cea05fa6d7c73cda83d38e1ae6a101df (patch)
tree14bfefa872195990d45ab8f3ee850730cd31ed1b /sql/sql_prepare.cc
parentca7f3f2ae08e30cd6c68cb7af60d4528759f8bbd (diff)
parent3742489c3797b14ac3c4453ef4058b5a87a62442 (diff)
downloadmariadb-git-1c73da70cea05fa6d7c73cda83d38e1ae6a101df.tar.gz
Merged from 5.0 (enterprise).
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r--sql/sql_prepare.cc7
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 ||