From cd2924bacbb06596d30f4397b0e200fc9c73e40b Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 7 Aug 2020 13:37:41 +0200 Subject: MDEV-23330 Server crash or ASAN negative-size-param in my_strnncollsp_binary / SORT_FIELD_ATTR::compare_packed_varstrings and MDEV-23414 Assertion `res->charset() == item->collation.collation' failed in Type_handler_string_result::make_packed_sort_key_part pack_sort_string() *must* take a collation from the Item, not from the String value. Because when casting a string to _binary the original String is not copied for performance reasons, it's reused but its collation does not match Item's collation anymore. Note, that String's collation cannot be simply changed to _binary, because for an Item_string literal the original String must stay unchanged for the duration of the query. this partially reverts 61c15ebe323 --- mysql-test/main/func_crypt.test | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mysql-test/main/func_crypt.test') diff --git a/mysql-test/main/func_crypt.test b/mysql-test/main/func_crypt.test index d091aa4ae86..118a7023669 100644 --- a/mysql-test/main/func_crypt.test +++ b/mysql-test/main/func_crypt.test @@ -120,3 +120,5 @@ SHOW CREATE TABLE t1; INSERT INTO t1 (a) VALUES ('hello'); SELECT * FROM t1; DROP TABLE t1; + +--echo # End of 10.2 tests -- cgit v1.2.1