| 1 |
# ==== Purpose ==== |
| 2 |
# |
| 3 |
# Verify that Seconds_Behind_Master is calculated correctly on a |
| 4 |
# Multi-threaded Slave. |
| 5 |
# |
| 6 |
# ==== References ==== |
| 7 |
# Bug #25407335 SLAVE DON'T REPORT SECONDS_BEHIND_MASTER WHEN RUNNING |
| 8 |
# REPLICA_PARALLEL_WORKERS > 0 |
| 9 |
# |
| 10 |
|
| 11 |
# Must be statement as we rely on PROCESSLIST's Info column |
| 12 |
--source include/have_binlog_format_statement.inc |
| 13 |
# This test uses debug_sync |
| 14 |
--source include/have_debug.inc |
| 15 |
--source include/have_debug_sync.inc |
| 16 |
--let $rpl_skip_start_slave= 1 |
| 17 |
--source include/master-slave.inc |
| 18 |
|
| 19 |
# Bug #25407335 SLAVE DON'T REPORT SECONDS_BEHIND_MASTER WHEN RUNNING |
| 20 |
# REPLICA_PARALLEL_WORKERS > 0 |
| 21 |
|
| 22 |
# Start slave in MTS mode |
| 23 |
connection slave; |
| 24 |
--let $debug_point= dbug.mta.force_clock_diff_eq_0 |
| 25 |
--source include/add_debug_point.inc |
| 26 |
SET @save_replica_parallel_type = @@GLOBAL.replica_parallel_type; |
| 27 |
SET @save.replica_parallel_workers= @@global.replica_parallel_workers; |
| 28 |
SET @save_replica_transaction_retries= @@global.replica_transaction_retries; |
| 29 |
SET @save_replica_preserve_commit_order= @@global.replica_preserve_commit_order; |
| 30 |
|
| 31 |
--echo # Test for PARALLEL_DATABASE |
| 32 |
SET GLOBAL replica_parallel_type = 'DATABASE'; |
| 33 |
SET @@global.replica_parallel_workers= 4; |
| 34 |
SET @@global.replica_preserve_commit_order=0; |
| 35 |
--source extra/rpl_tests/rpl_seconds_behind_master_mts_type_database.test |
| 36 |
|
| 37 |
--echo # Test for LOGICAL_CLOCK |
| 38 |
SET GLOBAL replica_parallel_type = 'LOGICAL_CLOCK'; |
| 39 |
SET GLOBAL replica_parallel_workers = 3; |
| 40 |
SET GLOBAL replica_preserve_commit_order=1; |
| 41 |
--source extra/rpl_tests/rpl_seconds_behind_master_mts_logical_clock.test |
| 42 |
|
| 43 |
#Cleanup |
| 44 |
--let $debug_point= dbug.mta.force_clock_diff_eq_0 |
| 45 |
--source include/remove_debug_point.inc |
| 46 |
SET @@GLOBAL.replica_parallel_type= @save_replica_parallel_type; |
| 47 |
--disable_warnings |
| 48 |
SET @@global.replica_parallel_workers= @save.replica_parallel_workers; |
| 49 |
--enable_warnings |
| 50 |
SET @@global.replica_transaction_retries= @save_replica_transaction_retries; |
| 51 |
SET @@global.replica_preserve_commit_order= @save_replica_preserve_commit_order; |
| 52 |
--source include/start_slave.inc |
| 53 |
|
| 54 |
--source include/rpl_end.inc |