MDEV-22111 ERROR 1064 & 1033 and SIGSEGV on CREATE TABLE w/ various charsets on 10.4/5 optimized builds | Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed
Additional 10.2 specific tests (with JSON)
This commit is contained in:
parent
bdab5b667e
commit
6462af1c2e
@ -3267,3 +3267,52 @@ ERROR HY000: Incorrect information in file: 'DIR/t1.frm'
|
|||||||
#
|
#
|
||||||
# End of 10.1 tests
|
# End of 10.1 tests
|
||||||
#
|
#
|
||||||
|
#
|
||||||
|
# Start of 10.2 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# MDEV-22111 ERROR 1064 & 1033 and SIGSEGV on CREATE TABLE w/ various charsets on 10.4/5 optimized builds | Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed
|
||||||
|
# 10.2 tests
|
||||||
|
#
|
||||||
|
SET NAMES latin1;
|
||||||
|
CREATE TABLE t1(c ENUM(0x0061) CHARACTER SET 'Binary', d JSON);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c` enum('\0a') CHARACTER SET binary DEFAULT NULL,
|
||||||
|
`d` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 (c) VALUES (1);
|
||||||
|
SELECT HEX(c) FROM t1;
|
||||||
|
HEX(c)
|
||||||
|
0061
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1(
|
||||||
|
c ENUM(0x0061) CHARACTER SET 'Binary',
|
||||||
|
d INT DEFAULT NULL CHECK (d>0)
|
||||||
|
);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c` enum('\0a') CHARACTER SET binary DEFAULT NULL,
|
||||||
|
`d` int(11) DEFAULT NULL CHECK (`d` > 0)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES (1,1);
|
||||||
|
SELECT HEX(c), d FROM t1;
|
||||||
|
HEX(c) d
|
||||||
|
0061 1
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1(c ENUM(0x0061) CHARACTER SET 'Binary' CHECK (c>0));
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c` enum('\0a') CHARACTER SET binary DEFAULT NULL CHECK (`c` > 0)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
SELECT HEX(c) FROM t1;
|
||||||
|
HEX(c)
|
||||||
|
0061
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of 10.2 tests
|
||||||
|
#
|
||||||
|
@ -7899,5 +7899,46 @@ a b
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
SET NAMES utf8;
|
SET NAMES utf8;
|
||||||
#
|
#
|
||||||
|
# MDEV-22111 ERROR 1064 & 1033 and SIGSEGV on CREATE TABLE w/ various charsets on 10.4/5 optimized builds | Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed
|
||||||
|
# 10.2 tests
|
||||||
|
#
|
||||||
|
SET NAMES utf8, COLLATION_CONNECTION=utf16_hungarian_ci;
|
||||||
|
CREATE TABLE t1(c ENUM('aaaaaaaa') CHARACTER SET 'Binary',d JSON);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c` enum('\0a\0a\0a\0a\0a\0a\0a\0a') CHARACTER SET binary DEFAULT NULL,
|
||||||
|
`d` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 (c) VALUES (1);
|
||||||
|
SELECT HEX(c) FROM t1;
|
||||||
|
HEX(c)
|
||||||
|
00610061006100610061006100610061
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE OR REPLACE TABLE t1(c ENUM('aaaaaaaaa') CHARACTER SET 'Binary',d JSON);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c` enum('\0a\0a\0a\0a\0a\0a\0a\0a\0a') CHARACTER SET binary DEFAULT NULL,
|
||||||
|
`d` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 (c) VALUES (1);
|
||||||
|
SELECT HEX(c) FROM t1;
|
||||||
|
HEX(c)
|
||||||
|
006100610061006100610061006100610061
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE OR REPLACE TABLE t1(c ENUM('aaaaaaaaaa') CHARACTER SET 'Binary',d JSON);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c` enum('\0a\0a\0a\0a\0a\0a\0a\0a\0a\0a') CHARACTER SET binary DEFAULT NULL,
|
||||||
|
`d` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 (c) VALUES (1);
|
||||||
|
SELECT HEX(c) FROM t1;
|
||||||
|
HEX(c)
|
||||||
|
0061006100610061006100610061006100610061
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
# End of 10.2 tests
|
# End of 10.2 tests
|
||||||
#
|
#
|
||||||
|
@ -2868,5 +2868,25 @@ DROP TABLE t1;
|
|||||||
#
|
#
|
||||||
SET STORAGE_ENGINE=Default;
|
SET STORAGE_ENGINE=Default;
|
||||||
#
|
#
|
||||||
|
# MDEV-22111 ERROR 1064 & 1033 and SIGSEGV on CREATE TABLE w/ various charsets on 10.4/5 optimized builds | Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed
|
||||||
|
# 10.2 tests
|
||||||
|
#
|
||||||
|
SET NAMES utf8, COLLATION_CONNECTION=utf32_bin;
|
||||||
|
CREATE TABLE t1(c1 ENUM('a','b','ac') CHARACTER SET 'Binary',c2 JSON,c3 INT);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c1` enum('\0\0\0a','\0\0\0b','\0\0\0a\0\0\0c') CHARACTER SET binary DEFAULT NULL,
|
||||||
|
`c2` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
|
||||||
|
`c3` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 (c1) VALUES (1),(2),(3);
|
||||||
|
SELECT HEX(c1) FROM t1 ORDER BY c1;
|
||||||
|
HEX(c1)
|
||||||
|
00000061
|
||||||
|
00000062
|
||||||
|
0000006100000063
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
# End of 10.2 tests
|
# End of 10.2 tests
|
||||||
#
|
#
|
||||||
|
@ -137,3 +137,44 @@ CREATE TABLE t1 (a ENUM('a',0x0061), b ENUM('b'));
|
|||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.1 tests
|
--echo # End of 10.1 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Start of 10.2 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-22111 ERROR 1064 & 1033 and SIGSEGV on CREATE TABLE w/ various charsets on 10.4/5 optimized builds | Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed
|
||||||
|
--echo # 10.2 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SET NAMES latin1;
|
||||||
|
CREATE TABLE t1(c ENUM(0x0061) CHARACTER SET 'Binary', d JSON);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
INSERT INTO t1 (c) VALUES (1);
|
||||||
|
SELECT HEX(c) FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
CREATE TABLE t1(
|
||||||
|
c ENUM(0x0061) CHARACTER SET 'Binary',
|
||||||
|
d INT DEFAULT NULL CHECK (d>0)
|
||||||
|
);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
INSERT INTO t1 VALUES (1,1);
|
||||||
|
SELECT HEX(c), d FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
CREATE TABLE t1(c ENUM(0x0061) CHARACTER SET 'Binary' CHECK (c>0));
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
SELECT HEX(c) FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.2 tests
|
||||||
|
--echo #
|
||||||
|
@ -243,6 +243,31 @@ SET NAMES utf8, collation_connection=utf16_unicode_520_nopad_ci;
|
|||||||
SET NAMES utf8;
|
SET NAMES utf8;
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-22111 ERROR 1064 & 1033 and SIGSEGV on CREATE TABLE w/ various charsets on 10.4/5 optimized builds | Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed
|
||||||
|
--echo # 10.2 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SET NAMES utf8, COLLATION_CONNECTION=utf16_hungarian_ci;
|
||||||
|
CREATE TABLE t1(c ENUM('aaaaaaaa') CHARACTER SET 'Binary',d JSON); # ERROR 1064 (42000): You have an error in your SQL syntax
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
INSERT INTO t1 (c) VALUES (1);
|
||||||
|
SELECT HEX(c) FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
CREATE OR REPLACE TABLE t1(c ENUM('aaaaaaaaa') CHARACTER SET 'Binary',d JSON); # ERROR 1033 (HY000): Incorrect information in file: './test/t.frm'
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
INSERT INTO t1 (c) VALUES (1);
|
||||||
|
SELECT HEX(c) FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
CREATE OR REPLACE TABLE t1(c ENUM('aaaaaaaaaa') CHARACTER SET 'Binary',d JSON); # Sig 11
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
INSERT INTO t1 (c) VALUES (1);
|
||||||
|
SELECT HEX(c) FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.2 tests
|
--echo # End of 10.2 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -1035,6 +1035,19 @@ let $coll='utf32_nopad_bin';
|
|||||||
let $coll_pad='utf32_bin';
|
let $coll_pad='utf32_bin';
|
||||||
--source include/ctype_pad_all_engines.inc
|
--source include/ctype_pad_all_engines.inc
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-22111 ERROR 1064 & 1033 and SIGSEGV on CREATE TABLE w/ various charsets on 10.4/5 optimized builds | Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed
|
||||||
|
--echo # 10.2 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SET NAMES utf8, COLLATION_CONNECTION=utf32_bin;
|
||||||
|
CREATE TABLE t1(c1 ENUM('a','b','ac') CHARACTER SET 'Binary',c2 JSON,c3 INT);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
INSERT INTO t1 (c1) VALUES (1),(2),(3);
|
||||||
|
SELECT HEX(c1) FROM t1 ORDER BY c1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.2 tests
|
--echo # End of 10.2 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
Loading…
x
Reference in New Issue
Block a user