SET SESSION SESSION_TRACK_GTIDS=ALL_GTIDS;
RESET MASTER;
CREATE TABLE t1 (c1 INT) Engine=InnoDB;
BEGIN;
INSERT INTO t1 VALUES (1);
COMMIT;
BEGIN;
INSERT INTO t1 VALUES (2);
CREATE TABLE t2 (c1 INT) Engine=InnoDB;
INSERT INTO t2 VALUES (1);
SELECT * FROM t1;
c1
1
2
BEGIN;
INSERT INTO t1 VALUES (2);
SAVEPOINT s;
INSERT INTO t1 VALUES (3);
ROLLBACK TO SAVEPOINT s;
ROLLBACK;
DROP TABLE t1, t2;
SET SESSION SESSION_TRACK_GTIDS=OWN_GTID;
RESET MASTER;
CREATE TABLE t1 (c1 INT) Engine=InnoDB;
BEGIN;
INSERT INTO t1 VALUES (1);
COMMIT;
BEGIN;
INSERT INTO t1 VALUES (2);
CREATE TABLE t2 (c1 INT) Engine=InnoDB;
INSERT INTO t2 VALUES (1);
SELECT * FROM t1;
c1
1
2
BEGIN;
INSERT INTO t1 VALUES (2);
SAVEPOINT s;
INSERT INTO t1 VALUES (3);
ROLLBACK TO SAVEPOINT s;
ROLLBACK;
DROP TABLE t1, t2;
SET SESSION SESSION_TRACK_GTIDS=OFF;
RESET MASTER;
CREATE TABLE t1 (c1 INT) Engine=InnoDB;
BEGIN;
INSERT INTO t1 VALUES (1);
COMMIT;
BEGIN;
INSERT INTO t1 VALUES (2);
CREATE TABLE t2 (c1 INT) Engine=InnoDB;
INSERT INTO t2 VALUES (1);
SELECT * FROM t1;
c1
1
2
BEGIN;
INSERT INTO t1 VALUES (2);
SAVEPOINT s;
INSERT INTO t1 VALUES (3);
ROLLBACK TO SAVEPOINT s;
ROLLBACK;
DROP TABLE t1, t2;
