mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-19049 Server crashes in check_duplicate_long_entry_key, ASAN stack-buffer-overflow in Field_blob::get_key_image
Long Unique keys should always be last unique key.
This commit is contained in:
@ -71,8 +71,8 @@ create table t1 (a int primary key, b blob unique , c int unique );
|
||||
show keys from t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
|
||||
t1 0 PRIMARY 1 a A 0 NULL NULL BTREE
|
||||
t1 0 b 1 b A NULL NULL NULL YES HASH
|
||||
t1 0 c 1 c A NULL NULL NULL YES BTREE
|
||||
t1 0 b 1 b A NULL NULL NULL YES HASH
|
||||
insert into t1 values(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),(6,6,6),(7,7,7);
|
||||
select * from t1 limit 3;
|
||||
a b c
|
||||
@ -220,18 +220,18 @@ t1 CREATE TABLE `t1` (
|
||||
`f` int(11) DEFAULT NULL,
|
||||
`g` text DEFAULT NULL,
|
||||
PRIMARY KEY (`a`),
|
||||
UNIQUE KEY `b` (`b`,`c`) USING HASH,
|
||||
UNIQUE KEY `b_2` (`b`,`f`),
|
||||
UNIQUE KEY `b` (`b`,`c`) USING HASH,
|
||||
UNIQUE KEY `e` (`e`,`g`) USING HASH,
|
||||
UNIQUE KEY `a` (`a`,`b`,`c`,`d`,`e`,`f`,`g`) USING HASH
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
show keys from t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
|
||||
t1 0 PRIMARY 1 a A 0 NULL NULL BTREE
|
||||
t1 0 b 1 b A NULL NULL NULL YES HASH
|
||||
t1 0 b 2 c A NULL NULL NULL YES HASH
|
||||
t1 0 b_2 1 b A NULL NULL NULL YES BTREE
|
||||
t1 0 b_2 2 f A NULL NULL NULL YES BTREE
|
||||
t1 0 b 1 b A NULL NULL NULL YES HASH
|
||||
t1 0 b 2 c A NULL NULL NULL YES HASH
|
||||
t1 0 e 1 e A NULL NULL NULL YES HASH
|
||||
t1 0 e 2 g A NULL NULL NULL YES HASH
|
||||
t1 0 a 1 a A NULL NULL NULL HASH
|
||||
|
Reference in New Issue
Block a user