Commit ae02999c authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

MDEV-34776 Assertion failure in Item_string::do_build_clone

Added missed methods to Item_string child.
parent fccfdc28
......@@ -35,5 +35,12 @@ SELECT * FROM t WHERE a=b'';
a
drop view t;
#
# MDEV-34776: Assertion failure in Item_string::do_build_clone
#
CREATE VIEW v AS SELECT version() AS f;
SELECT * FROM v WHERE f = '10.5.20';
f
drop view v;
#
# End of 10.5 tests
#
......@@ -38,6 +38,14 @@ CREATE VIEW t AS SELECT 1 AS a;
SELECT * FROM t WHERE a=b'';
drop view t;
--echo #
--echo # MDEV-34776: Assertion failure in Item_string::do_build_clone
--echo #
CREATE VIEW v AS SELECT version() AS f;
SELECT * FROM v WHERE f = '10.5.20';
drop view v;
--echo #
--echo # End of 10.5 tests
--echo #
......@@ -4719,6 +4719,9 @@ class Item_string_sys :public Item_string
Item_string_sys(THD *thd, const char *str):
Item_string(thd, str, (uint) strlen(str), system_charset_info)
{ }
Item *do_get_copy(THD *thd) const override
{ return get_item_copy<Item_string_sys>(thd, this); }
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
};
......@@ -4733,6 +4736,9 @@ class Item_string_ascii :public Item_string
Item_string(thd, str, (uint) strlen(str), &my_charset_latin1,
DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII)
{ }
Item *do_get_copy(THD *thd) const override
{ return get_item_copy<Item_string_ascii>(thd, this); }
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
};
......@@ -4769,6 +4775,9 @@ class Item_static_string_func :public Item_string
// require fix_fields() to be re-run for every statement.
return mark_unsupported_function(func_name.str, arg, VCOL_TIME_FUNC);
}
Item *do_get_copy(THD *thd) const override
{ return get_item_copy<Item_static_string_func>(thd, this); }
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
};
......@@ -4786,6 +4795,9 @@ class Item_partition_func_safe_string: public Item_string
{
return mark_unsupported_function("safe_string", arg, VCOL_IMPOSSIBLE);
}
Item *do_get_copy(THD *thd) const override
{ return get_item_copy<Item_partition_func_safe_string>(thd, this); }
Item *do_build_clone(THD *thd) const override { return get_copy(thd); }
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment