mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
f691d9865b
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.
18 lines
1 KiB
Text
18 lines
1 KiB
Text
DROP DATABASE IF EXISTS db_datadict;
|
|
CREATE DATABASE db_datadict;
|
|
DROP USER testuser1@localhost;
|
|
CREATE USER testuser1@localhost;
|
|
GRANT SELECT ON db_datadict.* TO testuser1@localhost;
|
|
SELECT * FROM information_schema.statistics
|
|
WHERE table_schema = 'information_schema'
|
|
ORDER BY table_schema, table_name, index_name, seq_in_index, column_name;
|
|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT IGNORED
|
|
connect testuser1,localhost,testuser1,,db_datadict;
|
|
SELECT * FROM information_schema.statistics
|
|
WHERE table_schema = 'information_schema'
|
|
ORDER BY table_schema, table_name, index_name, seq_in_index, column_name;
|
|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT IGNORED
|
|
connection default;
|
|
disconnect testuser1;
|
|
DROP USER testuser1@localhost;
|
|
DROP DATABASE db_datadict;
|