From a33bb001445d2576f15437d9392bc70736ab419a Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Fri, 8 Nov 2013 14:18:16 +0400 Subject: MDEV-4842 STR_TO_DATE does not work with UCS2/UTF16/UTF32 --- mysql-test/include/ctype_str_to_date.inc | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 mysql-test/include/ctype_str_to_date.inc (limited to 'mysql-test/include/ctype_str_to_date.inc') diff --git a/mysql-test/include/ctype_str_to_date.inc b/mysql-test/include/ctype_str_to_date.inc new file mode 100644 index 00000000000..62adb05b094 --- /dev/null +++ b/mysql-test/include/ctype_str_to_date.inc @@ -0,0 +1,12 @@ +--echo # +--echo # MDEV-4842 STR_TO_DATE does not work with UCS2/UTF16/UTF32 +--echo # + +SELECT @@character_set_connection, HEX(CAST(_utf8'÷' AS CHAR)); +SELECT STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR)); +CREATE TABLE t1 AS SELECT REPEAT(' ', 64) AS subject, REPEAT(' ',64) AS pattern LIMIT 0; +SHOW COLUMNS FROM t1; +INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d'); +SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1; +DROP TABLE t1; + -- cgit v1.2.1