diff options
author | Igor Babaev <igor@askmonty.org> | 2023-03-22 21:27:51 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2023-03-22 21:27:51 -0700 |
commit | 7032b35e5655e854e0edf5d040c72a2dc09b9f90 (patch) | |
tree | 21d6e3ae34a81c9688ffaad505f342f43e37853c /sql/item_cmpfunc.cc | |
parent | fc18f9c9ec15035894154fb7dcdd85caac73cfc2 (diff) | |
download | mariadb-git-bb-11.0-igor.tar.gz |
MDEV-29971 Re-design the upper level of handling SELECT statementsbb-11.0-igor
The initial patch.
All tests from the main test suite passed.
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r-- | sql/item_cmpfunc.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index fcdb2aaf2d4..c7295f1b684 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -5794,6 +5794,8 @@ bool fix_escape_item(THD *thd, Item *escape_item, String *tmp_str, bool escape_used_in_parsing, CHARSET_INFO *cmp_cs, int *escape) { + if (thd->lex->context_analysis_only) + return false; /* ESCAPE clause accepts only constant arguments and Item_param. @@ -5803,9 +5805,13 @@ bool fix_escape_item(THD *thd, Item *escape_item, String *tmp_str, reach val_int(), so we won't need the value. CONTEXT_ANALYSIS_ONLY_DERIVED being a notable exception here. */ +#if 0 if (!escape_item->const_during_execution() || (!escape_item->const_item() && !(thd->lex->context_analysis_only & ~CONTEXT_ANALYSIS_ONLY_DERIVED))) +#else + if (!escape_item->const_item()) +#endif { my_error(ER_WRONG_ARGUMENTS,MYF(0),"ESCAPE"); return TRUE; |