diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index c0d0d196336..824aaf8e991 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1296,7 +1296,6 @@ void LEX::start(THD *thd_arg) ignore= 0; empty_field_list_on_rset= 0; use_only_table_context= 0; - escape_used= 0; default_used= 0; with_rownum= FALSE; is_lex_started= 1; diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 79e126b5c2d..9edd3894862 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -3509,7 +3509,6 @@ public: (see Item_field::fix_fields()). */ bool use_only_table_context:1; - bool escape_used:1; bool default_used:1; /* using default() function */ bool with_rownum:1; /* Using rownum() function */ bool is_lex_started:1; /* If lex_start() did run. For debugging. */ diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index efc5c5bd571..fa017e8acfc 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -127,7 +127,6 @@ int yylex(void *yylval, void *yythd); static Item* escape(THD *thd) { - thd->lex->escape_used= false; const char *esc= thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES ? "" : "\\"; return new (thd->mem_root) Item_string_ascii(thd, esc, MY_TEST(esc[0])); } @@ -9621,7 +9620,6 @@ predicate: } | predicate LIKE predicate ESCAPE_SYM predicate %prec LIKE { - Lex->escape_used= true; $$= new (thd->mem_root) Item_func_like(thd, $1, $3, $5, true); if (unlikely(!$$)) MYSQL_YYABORT; @@ -9635,7 +9633,6 @@ predicate: } | predicate not LIKE predicate ESCAPE_SYM predicate %prec LIKE { - Lex->escape_used= true; Item *item= new (thd->mem_root) Item_func_like(thd, $1, $4, $6, true); if (unlikely(!item)) MYSQL_YYABORT;