mirror of
https://github.com/MariaDB/server.git
synced 2025-11-28 17:36:30 +03:00
Problem: ======= The problem is that InnoDB doesn't add the table in fts slots if drop table fails. InnoDB marks the table is in fts slots while processing sync message. So the consecutive alter statement assumes that table is in queue and tries to remove it. But InnoDB can't find the table in fts_slots. Solution: ========= i) Removal of in_queue in fts_t while processing the fts sync message. ii) Add the table to fts_slots when drop table fails.
29 lines
1.2 KiB
Plaintext
29 lines
1.2 KiB
Plaintext
CREATE TABLE articles (
|
|
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
|
title VARCHAR(200),
|
|
body TEXT,
|
|
FULLTEXT (title,body)
|
|
) ENGINE=InnoDB;
|
|
SET @saved_debug_dbug = @@SESSION.debug_dbug;
|
|
SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail";
|
|
CREATE FULLTEXT INDEX idx ON articles(body);
|
|
ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
|
|
SET SESSION debug_dbug=@saved_debug_dbug;
|
|
ALTER TABLE articles STATS_PERSISTENT=DEFAULT;
|
|
DROP TABLE articles;
|
|
CREATE TABLE t (a INT, b TEXT) engine=innodb;
|
|
SET debug_dbug='+d,alter_table_rollback_new_index';
|
|
ALTER TABLE t ADD FULLTEXT INDEX (b(64));
|
|
ERROR HY000: Unknown error
|
|
SET SESSION debug_dbug=@saved_debug_dbug;
|
|
DROP TABLE t;
|
|
CREATE TABLE t1 (pk INT, a VARCHAR(8), PRIMARY KEY(pk),
|
|
FULLTEXT KEY(a)) ENGINE=InnoDB;
|
|
CREATE TABLE t2 (b INT, FOREIGN KEY(b) REFERENCES t1(pk)) ENGINE=InnoDB;
|
|
DROP TABLE t1;
|
|
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
|
|
SET DEBUG_DBUG="+d,fts_instrument_sync";
|
|
INSERT INTO t1 VALUES(1, "mariadb");
|
|
ALTER TABLE t1 FORCE;
|
|
DROP TABLE t2, t1;
|