Bug #76820 GTID is not released properly when ps_protocol + GTID + binlog off combination
Submitted: 24 Apr 2015 9:38 Modified: 14 Jul 2015 12:38
Reporter: Venkatesh Duggirala Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any

[24 Apr 2015 9:38] Venkatesh Duggirala
Description:
GTID of a transaction should be released after a commit/rollback.
But the same is not happening properly when the statement is prepared statements.

How to repeat:
Include the below lines in mysql-test/t/x.test  and run it with ./mtr --ps-protocol --mysqld=--gtid_mode=ON --mysqld=--enfore_gtid_consistency=ON x.test 

=============================================
let $master_uuid= `SELECT @@GLOBAL.SERVER_UUID`;
--connection default
--eval SET SESSION GTID_NEXT='$master_uuid:1'
CREATE TABLE t1 (a INT) ENGINE = InnoDB;
--eval SET SESSION GTID_NEXT='$master_uuid:2'    # is failing with 1790 , but expectation is should not throw error.
================================================
[14 Jul 2015 12:38] David Moss
The following was added to the internal 5.7.8 changelog:
When using mysql-test-run.pl with the --ps-protocol option to run a test against a server with log_bin=OFF, setting gtid_next and then executing a DDL statement caused an error. This was due to the DDL statement not being correctly logged to consume the GTID specified when setting gtid_next.