summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorunknown <kostja@vajra.(none)>2007-05-11 17:26:12 +0400
committerunknown <kostja@vajra.(none)>2007-05-11 17:26:12 +0400
commita0567199b118f14ec346249d91aabe2ee5d99354 (patch)
tree0457e0d1c6d9ce58028bbfc280e7d21426a8b771 /sql/sql_lex.cc
parent30184f9624b93b12844f2076ae6b113a0cf1d619 (diff)
downloadmariadb-git-a0567199b118f14ec346249d91aabe2ee5d99354.tar.gz
Cleanup: now that we have Lex_input_stream, finish the transition
by moving yet another relevant flag to it from struct LEX. mysql-test/r/ps.result: Update result. mysql-test/r/ps_1general.result: Update result. mysql-test/t/ps.test: New error code. mysql-test/t/ps_1general.test: New error code. sql/sql_lex.cc: Move stmt_prepare_mode to Lex_input_stream. sql/sql_lex.h: Move stmt_prepare_mode to class Lex_input_stream sql/sql_prepare.cc: Move stmt_prepare_mode to Lex_input_stream sql/sql_yacc.yy: Remove dead code.
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 6a44a883b51..7bcdc499011 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -123,7 +123,8 @@ Lex_input_stream::Lex_input_stream(THD *thd,
buf(buffer),
next_state(MY_LEX_START),
found_semicolon(NULL),
- ignore_space(test(thd->variables.sql_mode & MODE_IGNORE_SPACE))
+ ignore_space(test(thd->variables.sql_mode & MODE_IGNORE_SPACE)),
+ stmt_prepare_mode(FALSE)
{
}
@@ -172,7 +173,6 @@ void lex_start(THD *thd)
lex->describe= 0;
lex->subqueries= FALSE;
lex->view_prepare_mode= FALSE;
- lex->stmt_prepare_mode= FALSE;
lex->derived_tables= 0;
lex->lock_option= TL_READ;
lex->safe_to_cache_query= 1;
@@ -586,7 +586,7 @@ int MYSQLlex(void *arg, void *yythd)
its value in a query for the binlog, the query must stay
grammatically correct.
*/
- else if (c == '?' && lex->stmt_prepare_mode && !ident_map[yyPeek()])
+ else if (c == '?' && lip->stmt_prepare_mode && !ident_map[yyPeek()])
return(PARAM_MARKER);
return((int) c);
@@ -989,7 +989,7 @@ int MYSQLlex(void *arg, void *yythd)
if (yyPeek())
{
if ((thd->client_capabilities & CLIENT_MULTI_STATEMENTS) &&
- !lex->stmt_prepare_mode)
+ !lip->stmt_prepare_mode)
{
lex->safe_to_cache_query= 0;
lip->found_semicolon= lip->ptr;