diff options
Diffstat (limited to 'mysql-test/include/show_slave_status.inc')
-rw-r--r-- | mysql-test/include/show_slave_status.inc | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/mysql-test/include/show_slave_status.inc b/mysql-test/include/show_slave_status.inc index b315b9e45ca..d66c068e19b 100644 --- a/mysql-test/include/show_slave_status.inc +++ b/mysql-test/include/show_slave_status.inc @@ -1,6 +1,25 @@ # Include file to show the slave status, masking out some information # that varies depending on where the test is executed. ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 16 # 23 # 33 # 35 # 36 # -query_vertical SHOW SLAVE STATUS; +--let $_items=$status_items +if (`SELECT "XX$status_items" = "XX"`) +{ + --die 'Variable status_items is NULL' +} + +--disable_query_log +--vertical_results + +while (`SELECT "XX$_items" <> "XX"`) +{ + --let $_name= `SELECT SUBSTRING_INDEX('$_items', ',', 1)` + --let $_items= `SELECT LTRIM(SUBSTRING('$_items', LENGTH('$_name') + 2))` + + --let $_value= query_get_value(SHOW SLAVE STATUS, $_name, 1) + + --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR + --eval SELECT "$_value" AS $_name +} + +--horizontal_results +--enable_query_log |