SET @start_global_value = @@global.gtid_executed; SELECT @start_global_value; @start_global_value select @@global.gtid_executed; @@global.gtid_executed select @@session.gtid_executed; @@session.gtid_executed show global variables like 'gtid_executed'; Variable_name Value gtid_executed show session variables like 'gtid_executed'; Variable_name Value gtid_executed select * from information_schema.global_variables where variable_name='gtid_executed'; VARIABLE_NAME VARIABLE_VALUE GTID_EXECUTED select * from information_schema.session_variables where variable_name='gtid_executed'; VARIABLE_NAME VARIABLE_VALUE GTID_EXECUTED select @@global.gtid_executed; @@global.gtid_executed