==== Initialize ==== CREATE TABLE t1 (a INT); ==== Test ==== ---- Prepared statements ---- SET GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1'; PREPARE prep FROM 'INSERT INTO t1 VALUES (1)'; SET GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:2'; EXECUTE prep; ---- Stored procedures ---- SET GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:3'; CREATE PROCEDURE proc () BEGIN INSERT INTO t1 VALUES (1); END; SET GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:4'; CALL proc(); SET GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:5'; DROP PROCEDURE proc; SET GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:6'; LOCK TABLES t1 READ; SET GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:7'; UNLOCK TABLES; SET GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:10'; FLUSH PRIVILEGES; ==== Clean up ==== SET GTID_NEXT = 'AUTOMATIC'; DEALLOCATE PREPARE prep; DROP TABLE t1;