mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-04 12:56:14 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			58 lines
		
	
	
	
		
			3 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
	
		
			3 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
 | 
						|
PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start";
 | 
						|
SET @runtime = <intended_runtime>;
 | 
						|
PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1";
 | 
						|
connect  con2,localhost,root,,;
 | 
						|
connection default;
 | 
						|
DROP TABLE IF EXISTS t1;
 | 
						|
# Subtest 2A (one connection, no PREPARE/EXECUTE)
 | 
						|
#    connection  action
 | 
						|
#    default:    CREATE TABLE t1 ENGINE = CSV AS SELECT 1 AS f1
 | 
						|
#    default:    SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
 | 
						|
#    default:    DROP TABLE t1
 | 
						|
#    default:    SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
 | 
						|
# Subtest 2B (one connection, use PREPARE/EXECUTE)
 | 
						|
#    connection  action
 | 
						|
#    default:    CREATE TABLE t1 ENGINE = CSV AS SELECT 1 AS f1
 | 
						|
#    default:    SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
 | 
						|
#    default:    DROP TABLE t1
 | 
						|
#    default:    SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
 | 
						|
# Subtest 2C (two connections, no PREPARE/EXECUTE)
 | 
						|
#    connection  action
 | 
						|
#    default:    CREATE TABLE t1 ENGINE = CSV AS SELECT 1 AS f1
 | 
						|
#    con2:       SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
 | 
						|
#    default:    DROP TABLE t1
 | 
						|
#    con2:       SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
 | 
						|
# Subtest 2D (two connections, use PREPARE/EXECUTE)
 | 
						|
#    connection  action
 | 
						|
#    default:    CREATE TABLE t1 ENGINE = CSV AS SELECT 1 AS f1
 | 
						|
#    con2:       SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
 | 
						|
#    default:    DROP TABLE t1
 | 
						|
#    con2:       SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
 | 
						|
# Subtest 3A (one connection, no PREPARE/EXECUTE)
 | 
						|
#    connection  action
 | 
						|
#    default:    CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV
 | 
						|
#    default:    CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR)
 | 
						|
#    default:    DROP TABLE t1
 | 
						|
#    default:    DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
 | 
						|
# Subtest 3B (one connection, use PREPARE/EXECUTE)
 | 
						|
#    connection  action
 | 
						|
#    default:    CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV
 | 
						|
#    default:    CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR)
 | 
						|
#    default:    DROP TABLE t1
 | 
						|
#    default:    DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
 | 
						|
# Subtest 3C (two connections, no PREPARE/EXECUTE)
 | 
						|
#    connection  action
 | 
						|
#    default:    CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV
 | 
						|
#    con2:       CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR)
 | 
						|
#    default:    DROP TABLE t1
 | 
						|
#    con2:       DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
 | 
						|
# Subtest 3D (two connections, use PREPARE/EXECUTE)
 | 
						|
#    connection  action
 | 
						|
#    default:    CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV
 | 
						|
#    con2:       CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR)
 | 
						|
#    default:    DROP TABLE t1
 | 
						|
#    con2:       DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
 | 
						|
disconnect con2;
 | 
						|
DEALLOCATE PREPARE stmt_start;
 | 
						|
DEALLOCATE PREPARE stmt_break;
 |