1include/master-slave.inc 2[connection master] 3select @@global.relay_log_index; 4@@global.relay_log_index 5MYSQLTEST_VARDIR/mysqld.1/data/master-relay-bin.index 6select @@session.relay_log_index; 7ERROR HY000: Variable 'relay_log_index' is a GLOBAL variable 8show global variables like 'relay_log_index'; 9Variable_name Value 10relay_log_index MYSQLTEST_VARDIR/mysqld.1/data/master-relay-bin.index 11show session variables like 'relay_log_index'; 12Variable_name Value 13relay_log_index MYSQLTEST_VARDIR/mysqld.1/data/master-relay-bin.index 14select * from information_schema.global_variables where variable_name='relay_log_index'; 15VARIABLE_NAME VARIABLE_VALUE 16RELAY_LOG_INDEX MYSQLTEST_VARDIR/mysqld.1/data/master-relay-bin.index 17select * from information_schema.session_variables where variable_name='relay_log_index'; 18VARIABLE_NAME VARIABLE_VALUE 19RELAY_LOG_INDEX MYSQLTEST_VARDIR/mysqld.1/data/master-relay-bin.index 20set global relay_log_index=1; 21ERROR HY000: Variable 'relay_log_index' is a read only variable 22set session relay_log_index=1; 23ERROR HY000: Variable 'relay_log_index' is a read only variable 24connection slave; 25select @@global.relay_log_index; 26@@global.relay_log_index 27REPLACED 28select @@session.relay_log_index; 29ERROR HY000: Variable 'relay_log_index' is a GLOBAL variable 30show global variables like 'relay_log_index'; 31Variable_name Value 32relay_log_index REPLACED 33show session variables like 'relay_log_index'; 34Variable_name Value 35relay_log_index REPLACED 36select * from information_schema.global_variables where variable_name='relay_log_index'; 37VARIABLE_NAME VARIABLE_VALUE 38RELAY_LOG_INDEX REPLACED 39select * from information_schema.session_variables where variable_name='relay_log_index'; 40VARIABLE_NAME VARIABLE_VALUE 41RELAY_LOG_INDEX REPLACED 42set global relay_log_index=1; 43ERROR HY000: Variable 'relay_log_index' is a read only variable 44set session relay_log_index=1; 45ERROR HY000: Variable 'relay_log_index' is a read only variable 46include/rpl_end.inc 47