summaryrefslogtreecommitdiff
path: root/mysql-test/main
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2022-04-08 10:23:24 +0400
committerAlexander Barkov <bar@mariadb.com>2022-04-08 11:36:31 +0400
commit3814b04d6b0b87e20cdfa85933221d463ce71515 (patch)
tree6a2c4fc241d29c1519a8d78634f9dff75467c7ba /mysql-test/main
parent4194f7b6054d9cf888d657f08c88dc27031def7b (diff)
downloadmariadb-git-3814b04d6b0b87e20cdfa85933221d463ce71515.tar.gz
MDEV-28062 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on INSERT..SELECT
Adding an MTR test only. This problem was earlier fixed by the patch for: MDEV-28078 Garbage on multiple equal ENUMs with tricky character sets
Diffstat (limited to 'mysql-test/main')
-rw-r--r--mysql-test/main/ctype_utf32_innodb.result34
-rw-r--r--mysql-test/main/ctype_utf32_innodb.test35
2 files changed, 69 insertions, 0 deletions
diff --git a/mysql-test/main/ctype_utf32_innodb.result b/mysql-test/main/ctype_utf32_innodb.result
new file mode 100644
index 00000000000..82b7348cabb
--- /dev/null
+++ b/mysql-test/main/ctype_utf32_innodb.result
@@ -0,0 +1,34 @@
+#
+# Start of 10.3 tests
+#
+#
+# MDEV-28062 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on INSERT..SELECT
+#
+SET sql_mode='';
+CREATE TABLE t1 (
+HOST CHAR DEFAULT '%',
+USER CHAR DEFAULT '%',
+ROLE CHAR DEFAULT '%',
+ENABLED ENUM ('a','a') DEFAULT 'a',
+HISTORY ENUM ('a','a') DEFAULT 'a'
+) COLLATE=utf32_general_ci ENGINE=InnoDB;
+Warnings:
+Note 1291 Column 'ENABLED' has duplicated value 'a' in ENUM
+Note 1291 Column 'HISTORY' has duplicated value 'a' in ENUM
+INSERT INTO t1 SELECT * FROM t1;
+DROP TABLE t1;
+CREATE TABLE t1 (
+HOST CHAR DEFAULT '%',
+USER CHAR DEFAULT '%',
+ROLE CHAR DEFAULT '%',
+ENABLED ENUM ('a','a') DEFAULT 'a',
+HISTORY ENUM ('a','a') DEFAULT 'a'
+) COLLATE=utf32_general_ci ENGINE=MyISAM;
+Warnings:
+Note 1291 Column 'ENABLED' has duplicated value 'a' in ENUM
+Note 1291 Column 'HISTORY' has duplicated value 'a' in ENUM
+INSERT INTO t1 SELECT * FROM t1;
+DROP TABLE t1;
+#
+# End of 10.3 tests
+#
diff --git a/mysql-test/main/ctype_utf32_innodb.test b/mysql-test/main/ctype_utf32_innodb.test
new file mode 100644
index 00000000000..1663b5adafb
--- /dev/null
+++ b/mysql-test/main/ctype_utf32_innodb.test
@@ -0,0 +1,35 @@
+--source include/have_innodb.inc
+
+--echo #
+--echo # Start of 10.3 tests
+--echo #
+
+--echo #
+--echo # MDEV-28062 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on INSERT..SELECT
+--echo #
+
+SET sql_mode='';
+
+CREATE TABLE t1 (
+ HOST CHAR DEFAULT '%',
+ USER CHAR DEFAULT '%',
+ ROLE CHAR DEFAULT '%',
+ ENABLED ENUM ('a','a') DEFAULT 'a',
+ HISTORY ENUM ('a','a') DEFAULT 'a'
+) COLLATE=utf32_general_ci ENGINE=InnoDB;
+INSERT INTO t1 SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+ HOST CHAR DEFAULT '%',
+ USER CHAR DEFAULT '%',
+ ROLE CHAR DEFAULT '%',
+ ENABLED ENUM ('a','a') DEFAULT 'a',
+ HISTORY ENUM ('a','a') DEFAULT 'a'
+) COLLATE=utf32_general_ci ENGINE=MyISAM;
+INSERT INTO t1 SELECT * FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.3 tests
+--echo #