mariadb/mysql-test/suite/innodb_fts/t
Marko Mäkelä ddd7d5d8e3 MDEV-24035 Failing assertion: UT_LIST_GET_LEN(lock.trx_locks) == 0 causing disruption and replication failure
Under unknown circumstances, the SQL layer may wrongly disregard an
invocation of thd_mark_transaction_to_rollback() when an InnoDB
transaction had been aborted (rolled back) due to one of the following errors:
* HA_ERR_LOCK_DEADLOCK
* HA_ERR_RECORD_CHANGED (if innodb_snapshot_isolation=ON)
* HA_ERR_LOCK_WAIT_TIMEOUT (if innodb_rollback_on_timeout=ON)

Such an error used to cause a crash of InnoDB during transaction commit.
These changes aim to catch and report the error earlier, so that not only
this crash can be avoided but also the original root cause be found and
fixed more easily later.

The idea of this fix is from Michael 'Monty' Widenius.

HA_ERR_ROLLBACK: A new error code that will be translated into
ER_ROLLBACK_ONLY, signalling that the current transaction
has been aborted and the only allowed action is ROLLBACK.

trx_t::state: Add TRX_STATE_ABORTED that is like
TRX_STATE_NOT_STARTED, but noting that the transaction had been
rolled back and aborted.

trx_t::is_started(): Replaces trx_is_started().

ha_innobase: Check the transaction state in various places.
Simplify the logic around SAVEPOINT.

ha_innobase::is_valid_trx(): Replaces ha_innobase::is_read_only().

The InnoDB logic around transaction savepoints, commit, and rollback
was unnecessarily complex and might have contributed to this
inconsistency. So, we are simplifying that logic as well.

trx_savept_t: Replace with const undo_no_t*. When we rollback to
a savepoint, all we need to know is the number of undo log records
that must survive.

trx_named_savept_t, DB_NO_SAVEPOINT: Remove. We can store undo_no_t
directly in the space allocated at innobase_hton->savepoint_offset.

fts_trx_create(): Do not copy previous savepoints.

fts_savepoint_rollback(): If a savepoint was not found, roll back
everything after the default savepoint of fts_trx_create().
The test innodb_fts.savepoint is extended to cover this code.

Reviewed by: Vladislav Lesin
Tested by: Matthias Leich
2024-12-12 18:02:00 +02:00
..
basic.inc MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
basic.test MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
bug_32831765.test MDEV-27913 innodb_ft_cache_size max possible value (80000000) is too small for practical purposes 2022-02-24 22:41:23 +05:30
concurrent_insert.test MDEV-30996 insert.. select in presence of full text index freezes all other commits at commit time 2023-04-24 11:06:56 +05:30
crash_recovery.opt MDEV-18518 follow-up fixes 2021-05-06 16:04:29 +03:00
crash_recovery.test MDEV-32050 fixup: Stabilize tests 2023-11-21 12:42:00 +02:00
create.opt MDEV-11233 CREATE FULLTEXT INDEX with a token longer than 127 bytes 2017-01-27 10:19:39 +02:00
create.test MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
foreign_key_check.test MDEV-13626 Merge InnoDB test cases from MySQL 5.7 2023-11-08 12:17:14 +02:00
foreign_key_update.test MDEV-32346 Assertion failure sym_node->table != NULL in pars_retrieve_table_def on UPDATE 2024-03-06 14:04:49 +05:30
ft_result_cache_limit.test MDEV-27282 InnoDB: Failing assertion: !query->intersection 2022-08-03 20:35:12 +05:30
fts_kill_query.test MDEV-16865 InnoDB fts_query() ignores KILL 2018-08-01 08:43:12 +03:00
fts_sync_commit_resiliency.opt MDEV-34057 Inconsistent FTS state in concurrent scenarios 2024-06-06 19:09:13 +05:30
fts_sync_commit_resiliency.test MDEV-34057 Inconsistent FTS state in concurrent scenarios 2024-06-06 19:09:13 +05:30
fulltext.test Correct cursor protocol tests main.{loaddata,grant_plugin} & innodb_fts.fulltext 2024-11-21 21:43:44 +11:00
fulltext2.test Merge 10.3 into 10.4 2023-01-03 16:10:02 +02:00
fulltext3.test MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
fulltext_cache.test MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
fulltext_distinct.test MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
fulltext_left_join.test MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
fulltext_misc.test MDEV-29871 innodb_fts.fulltext_misc unexpectedly reports a result 2023-02-21 18:48:59 +05:30
fulltext_multi.test MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
fulltext_order_by.test MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
fulltext_update.test MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
fulltext_var.test MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
index_table.opt MDEV-13626 Merge InnoDB test cases from MySQL 5.7 2023-11-08 12:17:14 +02:00
index_table.test MDEV-13626 Merge InnoDB test cases from MySQL 5.7 2023-11-08 12:17:14 +02:00
innodb-fts-ddl.opt MDEV-27582 Fulltext DDL decrements the FTS_DOC_ID value 2022-03-03 19:03:31 +05:30
innodb-fts-ddl.test MDEV-30528 CREATE FULLTEXT INDEX assertion failure WITH SYSTEM VERSIONING 2024-02-12 16:52:55 +01:00
innodb-fts-fic.test MDEV-30528 CREATE FULLTEXT INDEX assertion failure WITH SYSTEM VERSIONING 2024-02-12 16:52:55 +01:00
innodb_ft_aux_table.opt MDEV-19445 heap-use-after-free related to innodb_ft_aux_table 2019-05-13 17:16:42 +03:00
innodb_ft_aux_table.test MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
innodb_fts_large_records.test MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
innodb_fts_misc.test Merge branch '10.5' into 10.6 2024-10-09 08:38:48 +02:00
innodb_fts_misc_1.opt MDEV-25536 InnoDB: Failing assertion: sym_node->table != NULL in pars_retrieve_table_def 2021-04-30 20:05:12 +05:30
innodb_fts_misc_1.test Merge 10.5 into 10.6 2021-10-21 16:06:34 +03:00
innodb_fts_multiple_index.test MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
innodb_fts_plugin.test Merge 10.5 into 10.6 2022-10-06 09:22:39 +03:00
innodb_fts_proximity.test MDEV-13626 Merge InnoDB test cases from MySQL 5.7 2023-11-08 12:17:14 +02:00
innodb_fts_result_cache_limit.test MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
innodb_fts_stopword_charset.test MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
innodb_fts_transaction.test MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
limit_union.test MDEV-13626 Merge InnoDB test cases from MySQL 5.7 2023-11-08 12:17:14 +02:00
misc.test MDEV-35082 HANDLER with FULLTEXT keys is not always rejected 2024-10-08 18:20:13 +02:00
misc_1.test MDEV-13626 Merge InnoDB test cases from MySQL 5.7 2023-11-08 12:17:14 +02:00
misc_debug.test Merge 10.5 into 10.6 2024-02-13 20:42:59 +02:00
misc_debug2.test Merge 10.5 into 10.6 2022-10-12 12:14:13 +03:00
multiple_index.test MDEV-14231 MATCH() AGAINST( IN BOOLEAN MODE), results mismatch 2024-08-13 15:22:09 +05:30
opt.opt MDEV-13626 Merge InnoDB test cases from MySQL 5.7 2023-11-08 12:17:14 +02:00
opt.test MDEV-31005: Make working cursor-protocol 2024-09-18 18:39:26 +07:00
phrase.opt MDEV-13626 Merge InnoDB test cases from MySQL 5.7 2023-11-08 12:17:14 +02:00
phrase.test MDEV-13626 Merge InnoDB test cases from MySQL 5.7 2023-11-08 12:17:14 +02:00
plugin_debug.test MDEV-14231 MATCH() AGAINST( IN BOOLEAN MODE), results mismatch 2024-08-13 15:22:09 +05:30
result_cache_limit.test MDEV-13626 Merge InnoDB test cases from MySQL 5.7 2023-11-08 12:17:14 +02:00
savepoint.test MDEV-24035 Failing assertion: UT_LIST_GET_LEN(lock.trx_locks) == 0 causing disruption and replication failure 2024-12-12 18:02:00 +02:00
stopword.inc MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
stopword.opt MDEV-22393 Corruption for SET GLOBAL innodb_ string variables 2020-04-28 16:09:07 +03:00
stopword.test MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
subexpr.test MDEV-13626 Merge InnoDB test cases from MySQL 5.7 2023-11-08 12:17:14 +02:00
sync.opt Adjust the innodb_fts.sync and innodb_fts.sync_block tests for MariaDB 2017-10-27 10:36:20 +03:00
sync.test MDEV-16944 Fix file sharing issues on Windows in mysqltest 2024-04-17 16:52:37 +02:00
sync_block.test MDEV-30996 insert.. select in presence of full text index freezes all other commits at commit time 2023-04-24 11:06:56 +05:30
sync_ddl.test MDEV-30528 CREATE FULLTEXT INDEX assertion failure WITH SYSTEM VERSIONING 2024-02-12 16:52:55 +01:00
versioning.combinations MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
versioning.opt MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY 2022-12-27 00:02:02 +03:00
versioning.test MDEV-25004 Refactorings 2022-12-27 00:02:02 +03:00