1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
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 = ARCHIVE 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 = ARCHIVE 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 = ARCHIVE 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 = ARCHIVE 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=ARCHIVE
# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE (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=ARCHIVE
# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE (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=ARCHIVE
# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE (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=ARCHIVE
# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 5A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = ARCHIVE
# default: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# default: DROP TABLE t1
# Subtest 5B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = ARCHIVE
# default: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# default: DROP TABLE t1
# Subtest 5C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = ARCHIVE
# con2: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# con2: DROP TABLE t1
# Subtest 5D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = ARCHIVE
# con2: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# con2: DROP TABLE t1
disconnect con2;
DEALLOCATE PREPARE stmt_start;
DEALLOCATE PREPARE stmt_break;
|