mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-03 14:33:32 +03:00 
			
		
		
		
	+ Fix for Bug#43114 wait_until_count_sessions too restrictive, random PB failures + Removal of a lot of other weaknesses found + modifications according to review
		
			
				
	
	
		
			58 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
# Establish connection con1 (user=root)
 | 
						|
# Establish connection con2 (user=root)
 | 
						|
# Establish connection con3 (user=root)
 | 
						|
# Switch to connection con1
 | 
						|
DROP TABLE IF EXISTS t1;
 | 
						|
CREATE TABLE t1 (a INT) ENGINE=innodb;
 | 
						|
BEGIN;
 | 
						|
INSERT INTO t1 VALUES(1);
 | 
						|
# Switch to connection con2
 | 
						|
FLUSH TABLES WITH READ LOCK;
 | 
						|
SELECT * FROM t1;
 | 
						|
a
 | 
						|
# Switch to connection con1
 | 
						|
COMMIT;
 | 
						|
# Switch to connection con2
 | 
						|
SELECT * FROM t1;
 | 
						|
a
 | 
						|
UNLOCK TABLES;
 | 
						|
# Switch to connection con1
 | 
						|
# Switch to connection con1
 | 
						|
BEGIN;
 | 
						|
SELECT * FROM t1 FOR UPDATE;
 | 
						|
a
 | 
						|
1
 | 
						|
# Switch to connection con2
 | 
						|
BEGIN;
 | 
						|
SELECT * FROM t1 FOR UPDATE;
 | 
						|
# Switch to connection con3
 | 
						|
FLUSH TABLES WITH READ LOCK;
 | 
						|
# Switch to connection con1
 | 
						|
COMMIT;
 | 
						|
# Switch to connection con2
 | 
						|
a
 | 
						|
1
 | 
						|
# Switch to connection con3
 | 
						|
UNLOCK TABLES;
 | 
						|
# Switch to connection con2
 | 
						|
COMMIT;
 | 
						|
# Switch to connection con1
 | 
						|
BEGIN;
 | 
						|
INSERT INTO t1 VALUES(10);
 | 
						|
FLUSH TABLES WITH READ LOCK;
 | 
						|
COMMIT;
 | 
						|
UNLOCK TABLES;
 | 
						|
# Switch to connection con2
 | 
						|
FLUSH TABLES WITH READ LOCK;
 | 
						|
UNLOCK TABLES;
 | 
						|
BEGIN;
 | 
						|
SELECT * FROM t1;
 | 
						|
a
 | 
						|
1
 | 
						|
10
 | 
						|
SHOW CREATE DATABASE test;
 | 
						|
Database	Create Database
 | 
						|
test	CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET latin1 */
 | 
						|
DROP TABLE t1;
 | 
						|
# Switch to connection default and close connections con1, con2, con3
 |