~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/statement_boundaries.test

Updates to tests (now moved into plugins).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# This is a test of various SQL statements
2
 
# and looks at the statement and transaction
3
 
# boundaries (start/end) to ensure they are sane
4
 
 
5
 
SET AUTOCOMMIT= 0;
6
 
 
7
 
# Expect 0 commit count since nothing 
8
 
# has yet happened...
9
 
 
10
 
SHOW STATUS LIKE 'Handler_commit%';
11
 
 
12
 
BEGIN;
13
 
 
14
 
# Expect 0 commit count since nothing 
15
 
# has yet been committed...
16
 
 
17
 
SHOW STATUS LIKE 'Handler_commit%';
18
 
 
19
 
DROP SCHEMA IF EXISTS boundaries;
20
 
 
21
 
# Expect 1 commit count since above DROP SCHEMA
22
 
# will implicitly call COMMIT.
23
 
#
24
 
# When we get transactional DDL, should be 0.
25
 
SHOW STATUS LIKE 'Handler_commit%';
26
 
 
27
 
COMMIT;
28
 
 
29
 
# Expect 1 commit count since 
30
 
# an explicit call to COMMIT was made
31
 
# even though nothing was changed...
32
 
 
33
 
SHOW STATUS LIKE 'Handler_commit%';
34
 
 
35
 
 
36
 
## Enable AUOTOCOMMIT
37
 
#
38
 
SET AUTOCOMMIT= 1;
39
 
 
40
 
SHOW STATUS LIKE 'Handler_commit%';
41
 
BEGIN;
42
 
DROP SCHEMA IF EXISTS boundaries;
43
 
COMMIT;
44
 
 
45
 
SHOW STATUS LIKE 'Handler_commit%';
46
 
CREATE TABLE commit_test (a int);
47
 
SHOW STATUS LIKE 'Handler_commit%';
48
 
INSERT into commit_test VALUES (10);
49
 
SHOW STATUS LIKE 'Handler_commit%';
50
 
INSERT into commit_test VALUES (10), (20);
51
 
SHOW STATUS LIKE 'Handler_commit%';
52
 
INSERT into commit_test VALUES (10);
53
 
SHOW STATUS LIKE 'Handler_commit%';
54
 
 
55
 
BEGIN;
56
 
 
57
 
INSERT into commit_test VALUES (10);
58
 
SHOW STATUS LIKE 'Handler_commit%';
59
 
 
60
 
COMMIT;
61
 
 
62
 
SHOW STATUS LIKE 'Handler_commit%';
63
 
BEGIN;
64
 
 
65
 
INSERT into commit_test VALUES (10);
66
 
SHOW STATUS LIKE 'Handler_commit%';
67
 
 
68
 
ROLLBACK;
69
 
 
70
 
SHOW STATUS LIKE 'Handler_commit%';
71
 
BEGIN;
72
 
 
73
 
 
74
 
INSERT into commit_test VALUES (10);
75
 
SHOW STATUS LIKE 'Handler_commit%';
76
 
 
77
 
COMMIT;
78
 
SHOW STATUS LIKE 'Handler_commit%';
79
 
 
80
 
SET AUTOCOMMIT= 0;
81
 
INSERT into commit_test VALUES (10);
82
 
INSERT into commit_test VALUES (10);
83
 
 
84
 
 
85
 
SHOW STATUS LIKE 'Handler_commit%';
86
 
drop table commit_test;
87
 
SHOW STATUS LIKE 'Handler_commit%';