| 1 |
################################################################################ |
| 2 |
# ==== Purpose ==== |
| 3 |
# The purpose of this test is to verify that, SHOW PROCESSLIST in Replica |
| 4 |
# shows null value instead of previously executed command in the INFO section |
| 5 |
# when slave_sql thread is waiting for updates from the Source. |
| 6 |
# |
| 7 |
# ==== Requirements ==== |
| 8 |
# Replica's slave_sql thread should show null value in the SHOW PROCESSLIST |
| 9 |
# INFO section when it is waiting for updates from Source, even if the |
| 10 |
# previoulsy executed query is a rewritten query. |
| 11 |
# |
| 12 |
# ==== Implementation ==== |
| 13 |
# 1. Perform an operation that can cause rewritten query on Source |
| 14 |
# 2. Verify Replica state and info through 'SHOW PROCESSLIST' |
| 15 |
# 3. Clean-up |
| 16 |
# |
| 17 |
# ==== References ==== |
| 18 |
# Bug#:30521198: IDLE & CAUGHT UP SLAVE HAS OLD QUERY SHOWN IN "INFO" |
| 19 |
# SECTION OF PROCESSLIST |
| 20 |
# |
| 21 |
################################################################################ |
| 22 |
|
| 23 |
# Test is binlog_format-agnostic |
| 24 |
--source include/have_binlog_format_row.inc |
| 25 |
--source include/master-slave.inc |
| 26 |
|
| 27 |
--echo |
| 28 |
--echo ==== Test ==== |
| 29 |
# Perform an operation that can cause rewritten query on Source |
| 30 |
CREATE USER IF NOT EXISTS 'user1'@'%' IDENTIFIED WITH 'mysql_native_password'; |
| 31 |
|
| 32 |
# Verify replica activity using SHOW PROCESSLIST; |
| 33 |
--source include/sync_slave_sql_with_master.inc |
| 34 |
|
| 35 |
let $show_statement= SHOW PROCESSLIST; |
| 36 |
let $field= State; |
| 37 |
let $condition= = 'Replica has read all relay log; waiting for more updates'; |
| 38 |
--source include/wait_show_condition.inc |
| 39 |
--let $wait_condition= SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE State='Replica has read all relay log; waiting for more updates' AND INFO IS NULL; |
| 40 |
--source include/wait_condition.inc |
| 41 |
|
| 42 |
--echo |
| 43 |
--echo ==== Clean up ==== |
| 44 |
--source include/rpl_connection_master.inc |
| 45 |
DROP USER IF EXISTS 'user1'@'%'; |
| 46 |
|
| 47 |
--source include/rpl_end.inc |