1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-35059 ALTER TABLE...IMPORT TABLESPACE with FULLTEXT SEARCH may corrupt the adaptive hash index

build_fts_hidden_table(): Correct a mistake that had been made in
commit 903ae30069 (MDEV-30655).
This commit is contained in:
Marko Mäkelä
2024-10-02 11:09:31 +03:00
parent a298dfb84c
commit cc70ca7eab
3 changed files with 18 additions and 3 deletions

View File

@ -1,5 +1,11 @@
--source include/have_innodb.inc
--source include/have_sequence.inc
--error 0,ER_UNKNOWN_SYSTEM_VARIABLE
SET @save_adaptive=@@GLOBAL.innodb_adaptive_hash_index;
--error 0,ER_UNKNOWN_SYSTEM_VARIABLE
SET GLOBAL innodb_adaptive_hash_index=ON;
# Table with virtual, fulltext, instant add, instant drop column
# and purgeable rows
call mtr.add_suppression("InnoDB: Added system generated FTS_DOC_ID and FTS_DOC_ID_INDEX while importing the tablespace");
@ -13,7 +19,7 @@ INSERT INTO t1(f1, f2) SELECT seq, "si" FROM seq_2_to_256;
ALTER TABLE t1 ADD COLUMN f6 INT NOT NULL;
ALTER TABLE t1 DROP COLUMN f6;
ALTER TABLE t1 DROP INDEX f_idx;
connect(con1,localhost,root,,);
connect(block_purge,localhost,root,,);
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default;
@ -26,6 +32,7 @@ ib_backup_tablespaces("test", "t1");
EOF
UNLOCK TABLES;
DROP TABLE t1;
disconnect block_purge;
CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
f2 CHAR(2) not null,
@ -44,3 +51,5 @@ ALTER TABLE t1 IMPORT TABLESPACE;
--enable_warnings
SHOW CREATE TABLE t1;
DROP TABLE t1;
--error 0,ER_UNKNOWN_SYSTEM_VARIABLE
SET GLOBAL innodb_adaptive_hash_index=@save_adaptive;