Handler_commit STATUS variable not correctly incremented
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
Medium
|
Jay Pipes |
Bug Description
Given this test case and result:
test:
# This is a test of various SQL statements
# and looks at the statement and transaction
# boundaries (start/end) to ensure they are sane
SET AUTOCOMMIT= 0;
# Expect 0 commit count since nothing
# has yet happened...
SHOW STATUS LIKE 'Handler_commit%';
BEGIN;
# Expect 0 commit count since nothing
# has yet been committed...
SHOW STATUS LIKE 'Handler_commit%';
DROP SCHEMA IF EXISTS boundaries;
# Expect 0 commit count since nothing
# has yet been committed...
SHOW STATUS LIKE 'Handler_commit%';
COMMIT;
# Expect 1 commit count since
# an explicit call to COMMIT was made
# even though nothing was changed...
SHOW STATUS LIKE 'Handler_commit%';
result:
SET AUTOCOMMIT= 0;
SHOW STATUS LIKE 'Handler_commit%';
Variable_name Value
Handler_commit 0
BEGIN;
SHOW STATUS LIKE 'Handler_commit%';
Variable_name Value
Handler_commit 0
DROP SCHEMA IF EXISTS boundaries;
Warnings:
Note 1008 Can't drop database './boundaries/'; database doesn't exist
SHOW STATUS LIKE 'Handler_commit%';
Variable_name Value
Handler_commit 0
COMMIT;
SHOW STATUS LIKE 'Handler_commit%';
Variable_name Value
Handler_commit 1
We get a failure with Handler_commit not being incremented correctly:
main.statement_
+++ /home/jpipes/
@@ -5,14 +5,14 @@
BEGIN;
SHOW STATUS LIKE 'Handler_commit%';
Variable_name Value
-Handler_commit 0
+Handler_commit 1
DROP SCHEMA IF EXISTS boundaries;
Warnings:
Note 1008 Can't drop database './boundaries/'; database doesn't exist
SHOW STATUS LIKE 'Handler_commit%';
Variable_name Value
-Handler_commit 0
+Handler_commit 2
COMMIT;
SHOW STATUS LIKE 'Handler_commit%';
Variable_name Value
-Handler_commit 1
+Handler_commit 2
Related branches
- Brian Aker: Pending requested
- Drizzle Developers: Pending requested
-
Diff: 101 lines (+56/-4)3 files modifieddrizzled/transaction_services.cc (+4/-4)
tests/r/statement_boundaries.result (+18/-0)
tests/t/statement_boundaries.test (+34/-0)
Changed in drizzle: | |
status: | Confirmed → Fix Committed |
Changed in drizzle: | |
status: | Fix Committed → Fix Released |
This is the result of not having proper statement and transaction boundaries for DDL operations. :(