1324.1.1
by Jay Pipes
Fixes Bug #535296 by only incrementing ha_commit_count when its a normal transaction commit. |
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 |
||
1890.2.47
by Stewart Smith
statement_boundaries test relied on implicit commits in schema operations. use explicit commits instead |
19 |
COMMIT; |
1324.1.1
by Jay Pipes
Fixes Bug #535296 by only incrementing ha_commit_count when its a normal transaction commit. |
20 |
DROP SCHEMA IF EXISTS boundaries; |
21 |
||
1890.2.47
by Stewart Smith
statement_boundaries test relied on implicit commits in schema operations. use explicit commits instead |
22 |
# Expect 1 commit count since above COMMIT before DROP SCHEMA
|
1324.1.1
by Jay Pipes
Fixes Bug #535296 by only incrementing ha_commit_count when its a normal transaction 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%'; |
|
1339
by Brian Aker
Jay + extended test case. |
34 |
|
35 |
||
36 |
## Enable AUOTOCOMMIT
|
|
37 |
#
|
|
38 |
SET AUTOCOMMIT= 1; |
|
39 |
||
40 |
SHOW STATUS LIKE 'Handler_commit%'; |
|
1890.2.47
by Stewart Smith
statement_boundaries test relied on implicit commits in schema operations. use explicit commits instead |
41 |
DROP SCHEMA IF EXISTS boundaries; |
1339
by Brian Aker
Jay + extended test case. |
42 |
BEGIN; |
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%'; |
|
1890.2.18
by Stewart Smith
use explicit COMMIT in statement_boundaries test instead of relying on implicit COMMIT in DROP TABLE statement |
86 |
COMMIT; |
1339
by Brian Aker
Jay + extended test case. |
87 |
drop table commit_test; |
88 |
SHOW STATUS LIKE 'Handler_commit%'; |