mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-7317: Make an index ignorable to the optimizer
This feature adds the functionality of ignorability for indexes. Indexes are not ignored be default. To control index ignorability explicitly for a new index, use IGNORE or NOT IGNORE as part of the index definition for CREATE TABLE, CREATE INDEX, or ALTER TABLE. Primary keys (explicit or implicit) cannot be made ignorable. The table INFORMATION_SCHEMA.STATISTICS get a new column named IGNORED that would store whether an index needs to be ignored or not.
This commit is contained in:
@ -980,13 +980,13 @@ CREATE TABLE t1(c1 VARCHAR(33), KEY (c1) USING BTREE);
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(c1 VARCHAR(33), KEY USING BTREE (c1) USING HASH) 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
|
||||
t1 1 c1 1 c1 NULL 0 NULL NULL YES HASH
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
|
||||
t1 1 c1 1 c1 NULL 0 NULL NULL YES HASH NO
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(c1 VARCHAR(33), KEY USING HASH (c1) USING BTREE) 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
|
||||
t1 1 c1 1 c1 A NULL NULL NULL YES BTREE
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
|
||||
t1 1 c1 1 c1 A NULL NULL NULL YES BTREE NO
|
||||
DROP TABLE t1;
|
||||
create user mysqltest_1@'test@test';
|
||||
ERROR HY000: Malformed hostname (illegal symbol: '@')
|
||||
|
Reference in New Issue
Block a user