mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 10:56:12 +01:00 
			
		
		
		
	 41997d148d
			
		
	
	
	41997d148d
	
	
	
		
			
			that must not send a response Problem:- When using wsrep (w/ galera) and issuing commands that can cause deadlocks, deadlock exception errors are sent in responses to commands such as close prepared statement and close connection which, by spec, must not send a response. Solution:- In dispatch_command, we will handle COM_QUIT and COM_STMT_CLOSE commands even in case of error. Patch Credit:- Jaka Močnik
		
			
				
	
	
		
			27 lines
		
	
	
	
		
			652 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
	
		
			652 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| --source include/galera_cluster.inc
 | |
| --source include/have_innodb.inc
 | |
| 
 | |
| --echo #
 | |
| --echo # MDEV-10812: On COM_STMT_CLOSE/COM_QUIT, when wsrep_conflict_state
 | |
| --echo # is ABORTED, it causes wrong response to be sent to the client
 | |
| --echo #
 | |
| 
 | |
| #  First create a deadlock
 | |
| --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
 | |
| SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
 | |
| CREATE TABLE t1(a INT PRIMARY KEY);
 | |
| INSERT INTO t1 VALUES(1),(2),(3);
 | |
| START TRANSACTION ;
 | |
| UPDATE t1 SET a=a+100;
 | |
| 
 | |
| --sleep 2
 | |
| --connection node_2
 | |
| UPDATE t1 SET a=a+100;
 | |
| 
 | |
| --sleep 2
 | |
| --connection node_1a
 | |
| # here we get deadlock error
 | |
| --disconnect node_1a
 | |
| 
 | |
| --connection node_2
 | |
| DROP TABLE t1;
 |