summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2020-12-16 19:35:24 +0100
committerSergei Golubchik <serg@mariadb.org>2020-12-19 11:44:42 +0100
commit5785de72ac85ba37eda837c691aaf9a9195ba45d (patch)
tree35e2e60b7a604af74430faf2cbbbcee298430672 /sql/item_cmpfunc.cc
parentd1e9a4c15c7ea4121408c21e02a0006a19689508 (diff)
downloadmariadb-git-5785de72ac85ba37eda837c691aaf9a9195ba45d.tar.gz
Item_func_like calls escape_item->fix_fields() twice
this happens if Item_func_like is copied (get_copy()). after one copy gets fixed, the other tries to fix escape item again.
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 2a0972216f8..d0941ef58c2 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -5413,7 +5413,7 @@ bool Item_func_like::fix_fields(THD *thd, Item **ref)
{
DBUG_ASSERT(fixed == 0);
if (Item_bool_func2::fix_fields(thd, ref) ||
- escape_item->fix_fields(thd, &escape_item) ||
+ (!escape_item->fixed && escape_item->fix_fields(thd, &escape_item)) ||
fix_escape_item(thd, escape_item, &cmp_value1, escape_used_in_parsing,
cmp_collation.collation, &escape))
return TRUE;