From e0b6294338fdfc8a4a8b42e6b199c588453be879 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Fri, 18 Oct 2019 10:24:53 +0400 Subject: MDEV-20855 Crash with PARTITION BY LIST and extended characters The code in convert_charset_partition_constant() did not take into account that the call for item->safe_charset_converter() can return NULL when conversion is not safe. Note, 10.2 was not affected. The test for NULL presents in 10.2, but it disappeared in 10.3 in a mistake. Restoring the test. --- mysql-test/main/partition_ucs2.result | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 mysql-test/main/partition_ucs2.result (limited to 'mysql-test/main/partition_ucs2.result') diff --git a/mysql-test/main/partition_ucs2.result b/mysql-test/main/partition_ucs2.result new file mode 100644 index 00000000000..ae2f3f15fa3 --- /dev/null +++ b/mysql-test/main/partition_ucs2.result @@ -0,0 +1,13 @@ +# +# Start of 10.3 tests +# +# +# MDEV-20855 Crash with PARTITION BY LIST and extended characters +# +SET NAMES utf8; +CREATE OR REPLACE TABLE t1 (a TIME) +PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (_ucs2 0x0411)); +ERROR HY000: This partition function is not allowed +# +# End of 10.3 tests +# -- cgit v1.2.1