Added a test for implicitly started trasnaction.

This commit is contained in:
VilhoRaatikka
2014-04-07 17:00:31 +03:00
parent ce5dc19ecc
commit c86e25eeb8
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,9 @@
USE test;
SET autocommit = 0;
CREATE TABLE IF NOT EXISTS myCity (a int, b char(20));
INSERT INTO myCity VALUES (1, 'Milan');
INSERT INTO myCity VALUES (2, 'London');
COMMIT;
DELETE FROM myCity; -- implicit transaction started
SELECT COUNT(*) FROM myCity; -- read transaction's modifications from master
COMMIT;