mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
cleanup: key algorithm vs key flags
the information about index algorithm was stored in two places inconsistently split between both. BTREE index could have key->algorithm == HA_KEY_ALG_BTREE, if the user explicitly specified USING BTREE or HA_KEY_ALG_UNDEF, if not. RTREE index had key->algorithm == HA_KEY_ALG_RTREE and always had key->flags & HA_SPATIAL FULLTEXT index had key->algorithm == HA_KEY_ALG_FULLTEXT and always had key->flags & HA_FULLTEXT HASH index had key->algorithm == HA_KEY_ALG_HASH or HA_KEY_ALG_UNDEF long unique index always had key->algorithm == HA_KEY_ALG_LONG_HASH In this commit: All indexes except BTREE and HASH always have key->algorithm set, HA_SPATIAL and HA_FULLTEXT flags are not used anymore (except for storage to keep frms backward compatible). As a side effect ALTER TABLE now detects FULLTEXT index renames correctly
This commit is contained in:
@@ -182,6 +182,8 @@ ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: INPLACE ADD or DROP of
|
||||
CREATE FULLTEXT INDEX idx ON t1(col9);
|
||||
ALTER TABLE t1 ADD COLUMN col7a INT GENERATED ALWAYS AS (col5x % col6x)
|
||||
VIRTUAL, ADD FULLTEXT KEY ftidx ( col9 ), algorithm=inplace;
|
||||
Warnings:
|
||||
Note 1831 Duplicate index `ftidx`. This is deprecated and will be disallowed in a future release
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
col1 int(11) NOT NULL,
|
||||
|
Reference in New Issue
Block a user