Description:
I am wondering which is the aim of the row 'SQL_SLAVE_SKIP_COUNTER' in `INFORMATION_SCHEMA`.`GLOBAL_VARIABLES`.
Variable's value is always empty.
http://bugs.mysql.com/bug.php?id=35994 should fix this.
How to repeat:
Test Script:
Connection 1
STOP SLAVE;
SET GLOBAL sql_slave_skip_counter = 3;
START SLAVE;
SHOW SLAVE STATUS\G
Connection 2:
SELECT `VARIABLE_VALUE` FROM `INFORMATION_SCHEMA`.`GLOBAL_VARIABLES` WHERE `VARIABLE_NAME`='SQL_SLAVE_SKIP_COUNTER';
SHOW SLAVE STATUS\G
Script Output:
Connection 1
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.1.24-rc-community-log MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
mysql> STOP SLAVE;
Query OK, 0 rows affected (0.00 sec)
mysql> SET GLOBAL sql_slave_skip_counter = 3;
Query OK, 0 rows affected (0.00 sec)
mysql> START SLAVE;
Query OK, 0 rows affected (0.00 sec)
mysql> SHOW SLAVE STATUS\G
*************************** 1. row ***************************
Slave_IO_State: Connecting to master
Master_Host: localhost
Master_User: root
Master_Port: 51241
Connect_Retry: 60
Master_Log_File: mysql-bin.000001
Read_Master_Log_Pos: 300
Relay_Log_File: CAMERON-NT-055-relay-bin.000002
Relay_Log_Pos: 251
Relay_Master_Log_File: mysql-bin.000001
Slave_IO_Running: No
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB: hs_audit_schema
Replicate_Do_Table:
Replicate_Ignore_Table: hs_audit_schema.status_system_dpm_table
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 3
Exec_Master_Log_Pos: 300
Relay_Log_Space: 415
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: 0
Last_SQL_Error:
1 row in set (0.00 sec)
mysql>
Connection 2:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 5.1.24-rc-community-log MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> SELECT `VARIABLE_VALUE` FROM `INFORMATION_SCHEMA`.`GLOBAL_VARIABLES` WHERE `VARIABLE_NAME`='SQL_SLAVE_SKIP_COUNTER';
+----------------+
| VARIABLE_VALUE |
+----------------+
| |
+----------------+
1 row in set (0.06 sec)
mysql>
mysql> SHOW SLAVE STATUS\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: localhost
Master_User: root
Master_Port: 51241
Connect_Retry: 60
Master_Log_File: mysql-bin.000001
Read_Master_Log_Pos: 300
Relay_Log_File: CAMERON-NT-055-relay-bin.000003
Relay_Log_Pos: 251
Relay_Master_Log_File: mysql-bin.000001
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB: hs_audit_schema
Replicate_Do_Table:
Replicate_Ignore_Table: hs_audit_schema.status_system_dpm_table
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 3
Exec_Master_Log_Pos: 300
Relay_Log_Space: 560
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: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
1 row in set (0.00 sec)
mysql>
[4 Jun 2008 21:17]
Sveta Smirnova
Thank you for the report.
Verified as described. This value is not indicated in SHOW GLOBAL VARIABLES output. See also bug #20413.
Workaround: use SHOW SLAVE STATUS to obtain this value.
Page generated in 0.054 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders. It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.