1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00

Remove unused LEX::escape_used

The flag was set by the parser but never read. Item_func_like keeps its own
escape_used_in_parsing member, which is unaffected.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Sergei Petrunia
2026-10-14 17:45:28 +03:00
parent 15845198b4
commit 0bc3ae0baa
3 changed files with 0 additions and 5 deletions

View File

@@ -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;

View File

@@ -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. */

View File

@@ -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;