Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
Description
SYNTAX
An index can be ignored in the following way:
1) Adding IGNORED to the key specification in CREATE TABLE
Example
CREATE TABLE t1(a INT, key key1(a) IGNORE); |
2) Adding IGNORED to the key specification in CREATE INDEX
Example
CREATE INDEX key1 on t1 (a) IGNORE; |
3) Adding IGNORED to the key in the ALTER statement
New syntax: ALTER TABLE table_name ALTER INDEX key_name ignorability
ignorability:
IGNORE_SYM |
NOT IGNORE_SYM |
Example:
ALTER TABLE t1 ADD INDEX key1 IGNORE; |
Specifications
- Store the information about the ignorability of the index in the FRM.
- A primary index cannot be made IGNORABLE.
- A non-nullable unique key that is promoted to a primary key cannot be made IGNORABLE.
- CHANGES in the output of SHOW CREATE TABLE and SHOW INDEXES|KEYS to show if the index is IGNORED or not.
- An ALTER INDEX operation should use the INPLACE algorithm by default.
Attachments
Issue Links
- causes
-
MDEV-25075 Ignorable index makes the resulting CREATE TABLE invalid
- Closed
- includes
-
MDEV-22199 Add VISIBLE attribute for indexes in CREATE TABLE
- Closed
- relates to
-
MDEV-33777 Spider: ERROR 12710 (HY000): Invalid information from remote table when using MariaDB 10.5 local and MariaDB 10.6 remote
- Closed