Problem when using gtid with MySQL replication I am faced with this problem when using gtid in MySQL replication: 


  When @@SESSION.GTID_NEXT is set to a GTID, you must explicitly set it
  to a different value after a COMMIT or ROLLBACK. Please check
  GTID_NEXT variable manual page for detailed explanation. Current
  @@SESSION.GTID_NEXT is 'xxx'"


It makes my slave SQL thread is impossible to run.

I am stuck with it. What is the cause of the problem ?
I've been having this issue on a new install of 5.6.26. I found a bug report on this and it suggests that the fix is available on 5.6.27 or 5.7.9.

https://bugs.mysql.com/bug.php?id=68525

I've upgraded to 5.6.27 and just watching to see if it happens again.

Hope this helps.