mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
c0075fa64b
"Add a column "Timestamp_of_last_master_event_executed" in SHOW SLAVE STATUS". Finally this is adding - Slave_IO_State (a copy of the State column of SHOW PROCESSLIST for the I/O thread, so that the users, most of the time, has enough info with only SHOW SLAVE STATUS). - Seconds_behind_master. When the slave connects to the master it does SELECT UNIX_TIMESTAMP() on the master, computes the absolute difference between the master's and the slave's clock. It records the timestamp of the last event executed by the SQL thread, and does a small computation to find the number of seconds by which the slave is late.
26 lines
911 B
Text
26 lines
911 B
Text
# Test for
|
|
# Bug #797: If a query is ignored on slave (replicate-ignore-table) the slave
|
|
# still checks that it has the same error as on the master.
|
|
|
|
source include/master-slave.inc;
|
|
connection master;
|
|
create table t1 (a int primary key);
|
|
# generate an error that goes to the binlog
|
|
--error 1062;
|
|
insert into t1 values (1),(1);
|
|
save_master_pos;
|
|
connection slave;
|
|
# as the t1 table is ignored on the slave, the slave should be able to sync
|
|
sync_with_master;
|
|
# The port number is different when doing the release build with
|
|
# Do-compile, hence we have to replace the port number here accordingly
|
|
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
|
|
--replace_column 33 #
|
|
show slave status;
|
|
# check that the table has been ignored, because otherwise the test is nonsense
|
|
show tables like 't1';
|
|
connection master;
|
|
drop table t1;
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|