| 1 |
RESET MASTER; |
| 2 |
SET GTID_NEXT= 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1'; |
| 3 |
CREATE TABLE t1 (c1 INT); |
| 4 |
SET GTID_NEXT= 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:2'; |
| 5 |
BEGIN; |
| 6 |
# |
| 7 |
# Check that the command 'BEGIN' causes an error |
| 8 |
# 'ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET' inside |
| 9 |
# an empty transaction, since it causes an implicit commit. And we |
| 10 |
# do not save the gtid specified by GTID_NEXT into |
| 11 |
# GLOBAL@gtid_executed in the case. |
| 12 |
# |
| 13 |
BEGIN; |
| 14 |
ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. |
| 15 |
include/assert.inc [Dose not commit gtid aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:2] |
| 16 |
INSERT INTO t1 VALUES (1); |
| 17 |
# |
| 18 |
# Check that the command 'BEGIN' causes an error |
| 19 |
# 'ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET' inside |
| 20 |
# a non-empty transaction, since it causes an implicit commit. And |
| 21 |
# we do not save the gtid specified by GTID_NEXT into |
| 22 |
# GLOBAL@gtid_executed in the case. |
| 23 |
# |
| 24 |
BEGIN; |
| 25 |
ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. |
| 26 |
include/assert.inc [Dose not commit gtid aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:2] |
| 27 |
# |
| 28 |
# Check that we save the gtid specified by GTID_NEXT into |
| 29 |
# GLOBAL@gtid_executed when committing the transaction. |
| 30 |
# |
| 31 |
COMMIT; |
| 32 |
include/assert.inc [Committed gtid aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:2] |
| 33 |
SET GTID_NEXT= 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:3'; |
| 34 |
DROP TABLE t1; |