mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-27406 Index on a HEAP table retains DESC attribute despite being hash
just like in SHOW KEYS, suppress DESC in SHOW CREATE if not HA_READ_ORDER
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
drop table if exists t1,t2;
|
||||
create table t1 (a int not null,b int not null, primary key using HASH (a)) engine=heap comment="testing heaps" avg_row_length=100 min_rows=1 max_rows=100;
|
||||
insert into t1 values(1,1),(2,2),(3,3),(4,4);
|
||||
delete from t1 where a=1 or a=0;
|
||||
@ -467,4 +466,23 @@ SELECT * FROM t1 WHERE c1='bar2';
|
||||
c1
|
||||
bar2
|
||||
DROP TABLE t1;
|
||||
End of 5.5 tests
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
#
|
||||
# MDEV-27406 Index on a HEAP table retains DESC attribute despite being hash
|
||||
#
|
||||
create table t1 (a int, key(a desc)) engine=memory;
|
||||
show index from t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
|
||||
t1 1 a 1 a NULL 0 NULL NULL YES HASH NO
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
KEY `a` (`a`)
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
#
|
||||
# End of 10.8 tests
|
||||
#
|
||||
|
@ -2,10 +2,6 @@
|
||||
# Test of heap tables.
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2;
|
||||
--enable_warnings
|
||||
|
||||
create table t1 (a int not null,b int not null, primary key using HASH (a)) engine=heap comment="testing heaps" avg_row_length=100 min_rows=1 max_rows=100;
|
||||
insert into t1 values(1,1),(2,2),(3,3),(4,4);
|
||||
delete from t1 where a=1 or a=0;
|
||||
@ -346,4 +342,18 @@ explain SELECT * FROM t1 WHERE c1='bar2';
|
||||
SELECT * FROM t1 WHERE c1='bar2';
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.5 tests
|
||||
--echo #
|
||||
--echo # End of 5.5 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-27406 Index on a HEAP table retains DESC attribute despite being hash
|
||||
--echo #
|
||||
create table t1 (a int, key(a desc)) engine=memory;
|
||||
show index from t1;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.8 tests
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user