mariadb/mysql-test/suite/innodb_zip/r
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
..
8k,full_crc32.rdiff MDEV-12026: Implement innodb_checksum_algorithm=full_crc32 2019-02-19 18:50:19 +02:00
8k,strict_full_crc32.rdiff MDEV-12026: Implement innodb_checksum_algorithm=full_crc32 2019-02-19 18:50:19 +02:00
16k,full_crc32.rdiff MDEV-19940 Clean up INFORMATION_SCHEMA.INNODB_ tables 2019-07-04 00:09:16 +03:00
16k,strict_full_crc32.rdiff MDEV-19940 Clean up INFORMATION_SCHEMA.INNODB_ tables 2019-07-04 00:09:16 +03:00
blob.result MDEV-32050 fixup: Stabilize tests 2023-11-21 12:42:00 +02:00
bug36169.result Merge InnoDB 5.7 from mysql-5.7.9. 2016-09-02 13:22:28 +03:00
bug52745.result MDEV-27634 innodb_zip tests failing on s390x 2022-02-16 17:03:02 +02:00
bug53591.result MDEV-18650: Options deprecated in previous versions - old_alter_table 2020-02-13 13:42:01 +02:00
bug56680.result Write information about restart in .result 2019-04-01 19:47:24 +03:00
cmp_drop_table.result Enable more variants of some innodb_zip tests 2017-06-30 18:43:48 +03:00
cmp_per_index.result MDEV-12353: Deprecate and ignore innodb_log_compressed_pages 2020-02-13 18:19:13 +02:00
create_options.result MDEV-29446 Change SHOW CREATE TABLE to display default collation 2022-09-12 22:10:39 +04:00
index_large_prefix.result MDEV-29446 Change SHOW CREATE TABLE to display default collation 2022-09-12 22:10:39 +04:00
index_large_prefix_4k.result MDEV-21679 fixup for s390x 2023-09-11 12:32:44 +03:00
index_large_prefix_8k.result MDEV-21679 fixup for s390x 2023-09-11 12:32:44 +03:00
innochecksum.result MDEV-28181 The innochecksum -w option was inadvertently removed 2022-03-28 11:35:10 +03:00
innochecksum_2.result MDEV-35394 Innochecksum misinterprets freed pages 2024-11-27 13:00:51 +05:30
innochecksum_3.result MDEV-35394 Innochecksum misinterprets freed pages 2024-11-27 13:00:51 +05:30
innodb-zip.result MDEV-9077 Use sys schema in bootstrapping, incl. mtr 2021-03-18 08:02:48 +01:00
large_blob.result Merge InnoDB 5.7 from mysql-5.7.9. 2016-09-02 13:22:28 +03:00
page_size,4k.rdiff Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
page_size,8k.rdiff Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
page_size.result MDEV-31158: Potential hang with ROW_FORMAT=COMPRESSED tables 2023-06-03 11:12:16 +02:00
prefix_index_liftedlimit.result Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
recover.result MDEV-21892: Assertion ...row_get_rec_trx_id... failed on SELECT 2020-03-09 11:38:34 +02:00
restart.result MDEV-32027 Opening all .ibd files on InnoDB startup can be slow 2023-11-17 15:07:51 +02:00
wl5522_debug_zip.result 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
wl5522_zip.result Merge 10.5 into 10.6 2022-12-13 16:58:58 +02:00
wl6344_compress_level.result Merge 10.5 into 10.6 2022-02-17 14:37:17 +02:00
wl6347_comp_indx_stat.result Merge 10.3 into 10.4 2022-08-22 12:34:42 +03:00