WL#3424: show slave status [short|full] with full as default
Affects: Server-Prototype Only
—
Status: Un-Assigned
show slave status\G
Would give the full report:
mysql> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: ndb09.mysql.com
Master_User: rep
Master_Port: 3306
Connect_Retry: 10
Master_Log_File: ndb09.000002
Read_Master_Log_Pos: 10326171
Relay_Log_File: ndb12-relay-bin.001014
Relay_Log_Pos: 1118024
Relay_Master_Log_File: ndb09.000002
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB: mysql
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 6672323
Relay_Log_Space: 4776480
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: 598
1 row in set (0.00 sec)
But "show slave status short\G" would cut a lot of the none needed stuff out:
mysql> show slave status short\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: ndb09.mysql.com
Master_User: rep
Master_Port: 3306
Master_Log_File: ndb09.000002
Read_Master_Log_Pos: 10326171
Relay_Log_File: ndb12-relay-bin.001014
Relay_Log_Pos: 1118024
Relay_Master_Log_File: ndb09.000002
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Last_Errno: 0
Last_Error:
Exec_Master_Log_Pos: 6672323
Relay_Log_Space: 4776480
Seconds_Behind_Master: 598
1 row in set (0.00 sec)
Would be nice to remove some of the clutter when you don't need any
thing but the most inportant details.
Or we could make short the default and have them do "show slave status full\G"
to get a full listing.
Would also be better to have the following fields in either all together.
Master_Log_File: ndb09.000002
Read_Master_Log_Pos: 10326171
Exec_Master_Log_Pos: 6672323
Relay_Log_File: ndb12-relay-bin.001014
Relay_Log_Pos: 1118024
Relay_Log_Space: 4776480
Relay_Master_Log_File: ndb09.000002
-----
Lars think it is better with an information schema, i.e. treat everything
as tables:
1. Less parsing,
2. You can select the columns you like,
3. You can filter information, and
4. you can write predicates.
5. with multisource we will have one row/master.
-----
Jon likes SHOW for convenience but is inclined to agree with Lars that I_S
offers more flexibility. It's also more standard. However, if we were to support
a SHOW statement for this, then it should follow the pattern already set with
SHOW COLUMNS and SHOW PROCESSLIST: SHOW [FULL] SLAVE STATUS with the default
(i.e. sans FULL) displaying the abbreviated output.
Copyright (c) 2000, 2025, Oracle Corporation and/or its affiliates. All rights reserved.