Details
- 
    
Bug
 - 
    Status: Closed (View Workflow)
 - 
    
Critical
 - 
    Resolution: Fixed
 - 
    10.11.14
 - 
    None
 
- 
        Not for Release Notes
 
Description
					innodb.trx_deadlock                      w4 [ fail ]
			 | 
		
					        Test ended at 2025-09-03 15:48:43
			 | 
		
| 
					 | 
		
					CURRENT_TEST: innodb.trx_deadlock
			 | 
		
					mysqltest: At line 83: query 'UPDATE t1 SET col2=100 where col1=1' succeeded - should have failed with error ER_LOCK_DEADLOCK (1213)...
			 | 
		
| 
					 | 
		
					The result from queries just before the failure was:
			 | 
		
					< snip >
			 | 
		
					INSERT INTO t1 VALUES (1, 1), (2, 2);
			 | 
		
					SELECT * FROM t1;
			 | 
		
					col1	col2
			 | 
		
					1	1
			 | 
		
					2	2
			 | 
		
					connection con1;
			 | 
		
					XA BEGIN 'x1';
			 | 
		
					# XA Trx-1: Lock 1st record
			 | 
		
					UPDATE t1 SET col2=10 where col1=1;
			 | 
		
					connection default;
			 | 
		
					XA BEGIN 'x2';
			 | 
		
					# XA Trx-2: Lock 2nd record
			 | 
		
					UPDATE t1 SET col2=100 where col1=2;
			 | 
		
					connection con1;
			 | 
		
					# XA Trx-1: Try locking 1st record : Wait
			 | 
		
					UPDATE t1 SET col2=10 where col1=2;
			 | 
		
					connection default;
			 | 
		
					# Wait for XA Trx-1 to get into lock wait stage
			 | 
		
					# XA Trx-2: Try locking 2nd record : Deadlock
			 | 
		
					UPDATE t1 SET col2=100 where col1=1;
			 | 
		
| 
					 | 
		
					More results from queries before failure can be found in /dev/shm/var/4/log/trx_deadlock.log
			 | 
		
The failure appears since 2025-07-22 18:50:12 in 10.11:
It is easily repeatable by adding trx_deadlock.combinations, failed for me on pass 6:
					mtr --fast --reorder --parallel=36 --max-test-fail=1 --repeat=1000
			 | 
		
| 
					 | 
		
					innodb.trx_deadlock 'a33'                w30 [ 6 fail ]
			 | 
		
					        Test ended at 2025-09-04 00:56:35
			 | 
		
| 
					 | 
		
					CURRENT_TEST: innodb.trx_deadlock
			 | 
		
					mysqltest: At line 83: query 'UPDATE t1 SET col2=100 where col1=1' succeeded - should have failed with error ER_LOCK_DEADLOCK (1213)...
			 | 
		
| 
					 | 
		
					 - saving '/home/midenok/src/mariadb/10.6es/build/mysql-test/var/30/log/innodb.trx_deadlock-a33/' to '/home/midenok/src/mariadb/10.6es/build/mysql-test/var/log/innodb.trx_deadlock-a33/'
			 | 
		
					Too many tests(1) failed! Terminating...
			 | 
		
Attachments
Issue Links
- relates to
 - 
                    
MDEV-37141 DML committed within XA transaction block after deadlock error and implicit rollback
-         
 - Closed
 
 -