mariadb/mysql-test/suite
Marko Mäkelä 19acb0257e MDEV-35508 Race condition between purge and secondary index INSERT or UPDATE
row_purge_remove_sec_if_poss_leaf(): If there is an active transaction
that is not newer than PAGE_MAX_TRX_ID, return the bogus value 1
so that row_purge_remove_sec_if_poss_tree() is guaranteed to recheck if
the record needs to be purged. It could be the case that an active
transaction would insert this record between the time this check
completed and row_purge_remove_sec_if_poss_tree() acquired a latch
on the secondary index leaf page again.

row_purge_del_mark_error(), row_purge_check(): Some unlikely code
refactored into separate non-inline functions.

trx_sys_t::find_same_or_older_low(): Move the unlikely and bulky
part of trx_sys_t::find_same_or_older() to a non-inline function.

trx_sys_t::find_same_or_older_in_purge(): A variant of
trx_sys_t::find_same_or_older() for use in the purge subsystem,
with potential concurrent access of the same trx_t object from
multiple threads.

trx_t::max_inactive_id_atomic: An Atomic_relaxed alias of the
regular data field trx_t::max_inactive_id, which we
use on systems that have native 64-bit loads or stores.
On any 64-bit system that seems to be supported by GCC, Clang or MSVC,
relaxed atomic loads and stores use the regular load and store
instructions. On -march=i686 the 64-bit atomic loads and stores
would use an XMM register.

This fixes a regression that had been introduced in
commit b7b9f3ce82 (MDEV-34515).
There would be messages
[ERROR] InnoDB: tried to purge non-delete-marked record in index
in the server error log, and an assertion ut_ad(0) would cause a
crash of debug instrumented builds. This could also cause incorrect
results for MVCC reads and corrupted secondary indexes.

The debug instrumented test case was written by Debarun Banerjee.

Reviewed by: Debarun Banerjee
2024-11-29 10:44:38 +02:00
..
archive Merge 10.5 into 10.6 2024-10-03 09:31:39 +03:00
atomic
binlog Merge 10.5 into 10.6 2024-10-03 09:31:39 +03:00
binlog_encryption Merge branch '10.5' into 10.6 2024-07-18 16:25:33 +02:00
client
compat MDEV-31910 ASAN memcpy-param-overlap upon CONCAT in ORACLE mode 2024-11-06 11:39:50 +04:00
csv Backporting bugs fixes fixed by MDEV-31340 from 11.5 2024-05-21 14:58:01 +04:00
encryption MDEV-34830: LSN in the future is not being treated as serious corruption 2024-10-17 17:24:20 +03:00
engines Merge 10.5 into 10.6 2024-10-03 09:31:39 +03:00
federated Merge 10.5 into 10.6 2024-10-03 09:31:39 +03:00
funcs_1 MDEV-34679 ER_BAD_FIELD uses non-localizable substrings 2024-10-17 21:37:37 +02:00
funcs_2
galera Merge branch 10.5 into 10.6 2024-11-08 18:17:15 +05:30
galera_3nodes Merge branch 10.5 into 10.6 2024-11-08 18:17:15 +05:30
galera_3nodes_sr Merge branch 10.5 into 10.6 2024-07-09 11:56:47 +02:00
galera_sr Adapt galera_sr.GCF-572 to make it work with innodb-snapshot-isolation 2024-11-29 08:06:32 +01:00
gcol Merge 10.5 into 10.6 2024-10-03 09:31:39 +03:00
handler MDEV-34679 ER_BAD_FIELD uses non-localizable substrings 2024-10-17 21:37:37 +02:00
heap
innodb MDEV-35508 Race condition between purge and secondary index INSERT or UPDATE 2024-11-29 10:44:38 +02:00
innodb_fts Merge branch '10.5' into 10.6 2024-10-29 14:20:03 +01:00
innodb_gis Merge branch '10.5' into 10.6 2024-10-15 16:00:44 +11:00
innodb_i_s
innodb_zip MDEV-35394 Innochecksum misinterprets freed pages 2024-11-27 13:00:51 +05:30
jp
json MDEV-34679 ER_BAD_FIELD uses non-localizable substrings 2024-10-17 21:37:37 +02:00
large_tests fix failing large_tests.maria_recover_encrypted 2024-04-22 17:22:11 +02:00
maria MDEV-34679 ER_BAD_FIELD uses non-localizable substrings 2024-10-17 21:37:37 +02:00
mariabackup MDEV-34830: LSN in the future is not being treated as serious corruption 2024-10-17 17:24:20 +03:00
mtr/t
mtr2
multi_source Merge 10.5 into 10.6 2024-04-17 14:14:58 +03:00
optimizer_unfixed_bugs
parts Merge 10.5 into 10.6 2024-10-03 09:31:39 +03:00
perfschema Merge 10.5 into 10.6 2024-10-03 09:31:39 +03:00
perfschema_stress
period Merge 10.5 into 10.6 2024-10-03 09:31:39 +03:00
plugins MDEV-34679 ER_BAD_FIELD uses non-localizable substrings 2024-10-17 21:37:37 +02:00
roles Merge 10.5 into 10.6 2024-10-03 09:31:39 +03:00
rpl MDEV-35477: rpl_semi_sync_no_missed_ack_after_add_slave fails after MDEV-35109 2024-11-21 11:30:25 -07:00
s3 MDEV-34867 engine S3 cause 500 error for huawei buckets 2024-09-11 16:15:37 +03:00
sql_sequence Merge branch '10.5' into 10.6 2024-10-29 14:20:03 +01:00
storage_engine
stress MDEV-34453 Trying to read 16384 bytes at 70368744161280 outside the bounds of the file: ./ibdata1 2024-09-20 20:26:43 +05:30
sys_vars MDEV-34690 lock_rec_unlock_unmodified() causes deadlock 2024-10-23 12:36:17 +03:00
sysschema Merge 10.5 into 10.6 2024-03-12 09:19:57 +02:00
unit
vcol Merge 10.5 into 10.6 2024-10-03 09:31:39 +03:00
versioning MDEV-34679 ER_BAD_FIELD uses non-localizable substrings 2024-10-17 21:37:37 +02:00
wsrep Merge branch '10.5' into '10.6' 2024-09-01 06:51:25 +02:00