mariadb/mysql-test/suite
Vlad Lesin 47e687b109 MDEV-36639 innodb_snapshot_isolation=1 gives error for not committed row changes
Set solution is to check if transaction, which modified a record, is
still active in lock_clust_rec_read_check_and_lock(). if yes, then just
request a lock. If no, then, depending on if the current transaction read
view can see the changes, return eighter DB_RECORD_CHANGED or request a
lock.

We can do the check in lock_clust_rec_read_check_and_lock() because
transaction tries to set a lock on the record which cursor points to after
transaction resuming and cursor position restoring. If the lock already
exists, then we don't request the lock again. But for the current commit
it's important that lock_clust_rec_read_check_and_lock() will be invoked
again for the same record, so we can do the check again after
transaction, which modified a record, was committed or rolled back.

MDEV-33802(4aa9291) is partially reverted. If some transaction holds
implicit lock on some record and transaction with snapshot isolation level
requests conflicting lock on the same record, it should be blocked instead
of returning DB_RECORD_CHANGED to have ability to continue execution when
implicit lock owner is rolled back.

The construction
--------------------------------------------------------------------------
let $wait_condition=
  select count(*) = 1 from information_schema.processlist
  where state = 'Updating' and info = 'UPDATE t SET b = 2 WHERE a';
--source include/wait_condition.inc
--------------------------------------------------------------------------

is not reliable enought to make sure transaction is blocked in test
case, the test failed sporadically with
--------------------------------------------------------------------------
./mtr --max-test-fail=1 --parallel=96 lock_isolation{,,,,,,,}{,,,}{,,} \
--repeat=500
--------------------------------------------------------------------------

command. That's why it was replaced with debug sync-points.

Reviewed by: Marko Mäkelä
2025-04-22 20:41:43 +03:00
..
archive test: archive-big test too big for msan 2025-04-07 11:04:53 +02:00
atomic Add --source include/long_test.inc to a few long-running tests 2025-03-13 11:26:02 +01:00
binlog Merge branch '10.5' into 10.6 2025-01-29 11:17:38 +01:00
binlog_encryption Merge 10.5 into 10.6 2025-03-26 17:09:57 +02:00
client
compat Merge branch '10.5' into 10.6 2025-01-29 11:17:38 +01:00
csv Backporting bugs fixes fixed by MDEV-31340 from 11.5 2024-05-21 14:58:01 +04:00
encryption MDEV-36180 Doublewrite recovery of innodb_checksum_algorithm=full_crc32 page_compressed pages does not work 2025-03-26 12:03:44 +01:00
engines Remove dates from all rdiff files 2025-01-05 16:40:11 +02:00
federated MDEV-31846: enable cursor protocol for test federatedx_create_handlers 2025-04-07 11:04:53 +02:00
funcs_1 Merge branch '10.5' into 10.6 2024-12-17 11:06:09 +11:00
funcs_2 Merge 10.5 into 10.6 2025-03-26 17:09:57 +02:00
galera MDEV-33136: backport corrections from 10.11+ 2025-04-15 01:51:32 +02:00
galera_3nodes MDEV-36464 : Galera test failure on galera_3nodes.galera_gtid_2_cluster 2025-04-15 01:51:59 +02:00
galera_3nodes_sr galera mtr tests: synchronization between branches and editions 2025-04-02 04:50:11 +02:00
galera_sr Merge branch '10.5' into '10.6' 2025-04-02 04:43:24 +02:00
gcol Merge branch '10.5' into 10.6 2025-04-21 10:43:17 +02:00
handler Merge branch '10.5' into 10.6 2024-12-17 11:06:09 +11:00
heap Merge 10.5 into 10.6 2025-01-20 09:57:37 +02:00
innodb MDEV-36639 innodb_snapshot_isolation=1 gives error for not committed row changes 2025-04-22 20:41:43 +03:00
innodb_fts MDEV-36420 Assertion failure in SET GLOBAL innodb_ft_aux_table 2025-03-28 09:05:20 +02:00
innodb_gis Merge 10.5 into 10.6 2025-03-26 17:09:57 +02:00
innodb_i_s
innodb_zip Merge branch '10.5' into 10.6 2025-01-29 11:17:38 +01:00
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-35469 Heap tables are calling mallocs to often 2025-01-05 16:40:11 +02:00
mariabackup Merge 10.5 into 10.6 2025-03-26 17:09:57 +02:00
mtr/t Remove dates from all rdiff files 2025-01-05 16:40:11 +02:00
mtr2
multi_source 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
optimizer_unfixed_bugs
parts Merge 10.5 into 10.6 2025-03-26 17:09:57 +02:00
perfschema Suppress processist_state='buffer pool load' 2025-02-03 08:29:52 +02:00
perfschema_stress
period Remove dates from all rdiff files 2025-01-05 16:40:11 +02:00
plugins Merge branch '10.5' into 10.6 2025-04-21 10:43:17 +02:00
roles Merge 10.5 into 10.6 2025-01-20 09:57:37 +02:00
rpl MDEV-36359: Patch NULL deref after disabling Semi-Sync primary 2025-04-17 15:56:45 -06:00
s3 Merge 10.5 into 10.6 2025-01-20 09:57:37 +02:00
sql_sequence Merge branch '10.5' into 10.6 2025-04-21 10:43:17 +02: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-36378 Recognize innodb_purge_rseg_truncate_frequency 2025-03-25 11:48:12 +01:00
sysschema Merge 10.5 into 10.6 2024-03-12 09:19:57 +02:00
unit
vcol Merge 10.5 into 10.6 2025-01-20 09:57:37 +02:00
versioning Merge branch '10.5' into '10.6' 2025-04-02 04:43:24 +02:00
wsrep Merge branch '10.5' into '10.6' 2025-04-02 04:43:24 +02:00