lava-oushudb-dt-sql-parser/test/parser/mysql/syntax/fixtures/commit.sql

49 lines
1.1 KiB
MySQL
Raw Normal View History

-- https://dev.mysql.com/doc/refman/8.0/en/commit.html
/* START TRANSACTION
[transaction_characteristic [, transaction_characteristic] ...]
transaction_characteristic: {
WITH CONSISTENT SNAPSHOT
| READ WRITE
| READ ONLY
}
BEGIN [WORK]
COMMIT [WORK] [AND [NO] CHAIN] [[NO] RELEASE]
ROLLBACK [WORK] [AND [NO] CHAIN] [[NO] RELEASE]
SET autocommit = {0 | 1} */
START TRANSACTION WITH CONSISTENT SNAPSHOT, WITH CONSISTENT SNAPSHOT;
START TRANSACTION WITH CONSISTENT SNAPSHOT;
START TRANSACTION READ WRITE, READ WRITE;
START TRANSACTION READ WRITE;
START TRANSACTION READ ONLY, READ ONLY;
START TRANSACTION READ ONLY;
START TRANSACTION;
BEGIN WORK;
BEGIN;
COMMIT WORK AND NO CHAIN NO RELEASE;
COMMIT AND NO CHAIN NO RELEASE;
COMMIT WORK AND CHAIN NO RELEASE;
COMMIT AND NO CHAIN RELEASE;
COMMIT AND CHAIN RELEASE;
COMMIT AND CHAIN;
COMMIT NO RELEASE;
COMMIT RELEASE;
ROLLBACK WORK AND NO CHAIN NO RELEASE;
ROLLBACK AND NO CHAIN NO RELEASE;
ROLLBACK WORK AND CHAIN NO RELEASE;
ROLLBACK AND NO CHAIN RELEASE;
ROLLBACK AND CHAIN RELEASE;
ROLLBACK AND CHAIN;
ROLLBACK NO RELEASE;
ROLLBACK RELEASE;
SET autocommit=0;
SET autocommit=1;