Description:
I tried to recover from an error 'Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT != AUTOMATIC or @@SESSION.GTID_NEXT_LIST != NULL.' (bug#69045), but failed because GTID_NEXT_LIST was not visible.
mysql> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 127.0.0.1
Master_User: repl
Master_Port: 5611
Connect_Retry: 60
Master_Log_File: binary-5611.000003
Read_Master_Log_Pos: 1810801
Relay_Log_File: slave-relay-bin.000002
Relay_Log_Pos: 265272
Relay_Master_Log_File: binary-5611.000003
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 1778
Last_Error: Error 'Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT != AUTOMATIC or @@SESSION.GTID_NEXT_LIST != NULL.' on query. Default database: ''. Query: 'flush privileges'
Skip_Counter: 0
Exec_Master_Log_Pos: 265058
Relay_Log_Space: 1811222
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 1778
Last_SQL_Error: Error 'Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT != AUTOMATIC or @@SESSION.GTID_NEXT_LIST != NULL.' on query. Default database: ''. Query: 'flush privileges'
Replicate_Ignore_Server_Ids:
Master_Server_Id: 5611
Master_UUID: 03d8526f-b103-11e2-bfc9-0002c9517906
Master_Info_File: mysql.slave_master_info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State:
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp: 130429 13:44:05
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set: 03d8526f-b103-11e2-bfc9-0002c9517906:1-3842
Executed_Gtid_Set: 03d8526f-b103-11e2-bfc9-0002c9517906:1-1256
Auto_Position: 1
1 row in set (0.00 sec)
mysql> show variables like '%gtid%';
+--------------------------+-----------+
| Variable_name | Value |
+--------------------------+-----------+
| enforce_gtid_consistency | ON |
| gtid_executed | |
| gtid_mode | ON |
| gtid_next | AUTOMATIC |
| gtid_owned | |
| gtid_purged | |
+--------------------------+-----------+
6 rows in set (0.00 sec)
mysql> set session gtid_next_list="03d8526f-b103-11e2-bfc9-0002c9517906:1257";
ERROR 1193 (HY000): Unknown system variable 'gtid_next_list'
How to repeat:
See bug#69045, and try to recover from the error.
Suggested fix:
HAVE_GTID_NEXT_LIST should be defined in official 5.6.x binary.
./sql/sys_vars.cc:
#ifdef HAVE_GTID_NEXT_LIST
static bool check_gtid_next_list(sys_var *self, THD *thd, set_var *var)
...