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