MDEV-29342 Assertion failure in file que0que.cc line 728

- During shutdown, InnoDB fts fails to update synced doc id
when there is only one doc id about to sync. While starting
the server, InnoDB fetches the already synced doc id from
config table. In the subsequent sync operation, InnoDB fails
with DB_DUPLICATE_KEY error.
parent f501f815
......@@ -5,3 +5,16 @@ set debug_dbug="+d,fts_instrument_sync_request";
INSERT INTO mdev21563 VALUES('This is a test');
ALTER TABLE mdev21563 DISCARD TABLESPACE;
DROP TABLE mdev21563;
#
# MDEV-29342 Assertion failure in file que0que.cc line 728
#
CREATE TABLE t1(f1 CHAR(100), FULLTEXT idx(f1))ENGINE=InnoDB;
INSERT INTO t1 VALUES('mysql'), ('innodb');
set debug_dbug="+d,fts_instrument_sync_debug";
INSERT INTO t1 VALUES('test');
set debug_dbug="-d,fts_instrument_sync_debug";
INSERT INTO t1 VALUES('This is a fts issue');
set debug_dbug="+d,fts_instrument_sync_debug";
UPDATE t1 SET f1="mariadb";
set debug_dbug="-d,fts_instrument_sync_debug";
DROP TABLE t1;
......@@ -10,3 +10,18 @@ INSERT INTO mdev21563 VALUES('This is a test');
ALTER TABLE mdev21563 DISCARD TABLESPACE;
--source include/restart_mysqld.inc
DROP TABLE mdev21563;
--echo #
--echo # MDEV-29342 Assertion failure in file que0que.cc line 728
--echo #
CREATE TABLE t1(f1 CHAR(100), FULLTEXT idx(f1))ENGINE=InnoDB;
INSERT INTO t1 VALUES('mysql'), ('innodb');
set debug_dbug="+d,fts_instrument_sync_debug";
INSERT INTO t1 VALUES('test');
set debug_dbug="-d,fts_instrument_sync_debug";
INSERT INTO t1 VALUES('This is a fts issue');
--source include/restart_mysqld.inc
set debug_dbug="+d,fts_instrument_sync_debug";
UPDATE t1 SET f1="mariadb";
set debug_dbug="-d,fts_instrument_sync_debug";
DROP TABLE t1;
......@@ -2667,7 +2667,7 @@ fts_cmp_set_sync_doc_id(
}
mutex_exit(&cache->doc_id_lock);
if (cmp_doc_id > *doc_id) {
if (cmp_doc_id && cmp_doc_id >= *doc_id) {
error = fts_update_sync_doc_id(
table, cache->synced_doc_id, trx);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment