Changed how query classifier determines which statements trigger implicit commit.
Changed test makefile and rwsplit.sh script and added two example sql scripts.
This commit is contained in:
@ -6,16 +6,14 @@ START TRANSACTION;
|
||||
CREATE TABLE IF NOT EXISTS myCity (a int, b char(20));
|
||||
INSERT INTO myCity VALUES (1, 'Milan');
|
||||
INSERT INTO myCity VALUES (2, 'London');
|
||||
COMMIT;
|
||||
-- Now there are two values
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
DELETE FROM myCity;
|
||||
-- Now there are zero values
|
||||
SET @a = (SELECT COUNT(1) FROM myCity); -- implicit COMMIT for DELETE operation
|
||||
ROLLBACK; -- nothing to roll back
|
||||
SET @a = (SELECT COUNT(1) FROM myCity);
|
||||
ROLLBACK;
|
||||
START TRANSACTION;
|
||||
SET @b = (SELECT COUNT(*) FROM myCity); -- implicit COMMIT for empty trx
|
||||
SET @b = (SELECT COUNT(*) FROM myCity);
|
||||
START TRANSACTION;
|
||||
DROP TABLE myCity;
|
||||
SELECT (@a+@b) AS res; -- counts 0+0 ans sets the result to 'res'
|
||||
SELECT (@a+@b) AS res;
|
||||
COMMIT;
|
||||
|
Reference in New Issue
Block a user