mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0
into dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge client/mysql.cc: Auto merged mysql-test/r/ctype_ucs.result: Auto merged mysql-test/t/ctype_uca.test: Auto merged mysql-test/t/ctype_ucs.test: Auto merged mysql-test/t/subselect.test: Auto merged sql/item_cmpfunc.cc: Auto merged sql/mysqld.cc: Auto merged sql/sql_class.h: Auto merged
This commit is contained in:
121
mysql-test/suite/manual/r/rpl_replication_delay.result
Normal file
121
mysql-test/suite/manual/r/rpl_replication_delay.result
Normal file
@ -0,0 +1,121 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
show slave status /* Second_behind reports 0 */;;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port 9306
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 98
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
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 98
|
||||
Relay_Log_Space #
|
||||
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 0
|
||||
drop table if exists t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
create table t1 (f1 int);
|
||||
flush logs /* contaminate rli->last_master_timestamp */;
|
||||
lock table t1 write;
|
||||
insert into t1 values (1);
|
||||
show slave status /* bug emulated: reports slave threads starting time about 3*3 not 3 secs */;;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port 9306
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 359
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
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 271
|
||||
Relay_Log_Space #
|
||||
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 10
|
||||
unlock tables;
|
||||
flush logs /* this time rli->last_master_timestamp is not affected */;
|
||||
lock table t1 write;
|
||||
insert into t1 values (2);
|
||||
show slave status /* reports the correct diff with master query time about 3+3 secs */;;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port 9306
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 447
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
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 359
|
||||
Relay_Log_Space #
|
||||
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 6
|
||||
unlock tables;
|
||||
drop table t1;
|
@ -0,0 +1 @@
|
||||
--loose-debug=d,let_first_flush_log_change_timestamp
|
71
mysql-test/suite/manual/t/rpl_replication_delay.test
Normal file
71
mysql-test/suite/manual/t/rpl_replication_delay.test
Normal file
@ -0,0 +1,71 @@
|
||||
#
|
||||
# Testing replication delay reporting (bug#29309)
|
||||
# there is an unavoidable non-determinism in the test
|
||||
# please compare the results with the comments
|
||||
#
|
||||
|
||||
|
||||
source include/master-slave.inc;
|
||||
|
||||
connection master;
|
||||
#connection slave;
|
||||
sync_slave_with_master;
|
||||
--replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
|
||||
--replace_column 1 # 8 # 9 # 23 #
|
||||
--query_vertical show slave status /* Second_behind reports 0 */;
|
||||
sleep 3;
|
||||
|
||||
### bug emulation
|
||||
|
||||
connection master;
|
||||
drop table if exists t1;
|
||||
create table t1 (f1 int);
|
||||
sleep 3;
|
||||
|
||||
#connection slave;
|
||||
sync_slave_with_master;
|
||||
flush logs /* contaminate rli->last_master_timestamp */;
|
||||
|
||||
connection slave;
|
||||
lock table t1 write;
|
||||
|
||||
connection master;
|
||||
insert into t1 values (1);
|
||||
|
||||
sleep 3;
|
||||
|
||||
connection slave;
|
||||
--replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
|
||||
--replace_column 1 # 8 # 9 # 23 #
|
||||
--query_vertical show slave status /* bug emulated: reports slave threads starting time about 3*3 not 3 secs */;
|
||||
unlock tables;
|
||||
|
||||
connection master;
|
||||
sync_slave_with_master;
|
||||
|
||||
### bugfix
|
||||
|
||||
|
||||
connection slave;
|
||||
flush logs /* this time rli->last_master_timestamp is not affected */;
|
||||
lock table t1 write;
|
||||
|
||||
connection master;
|
||||
insert into t1 values (2);
|
||||
sleep 3;
|
||||
|
||||
connection slave;
|
||||
--replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
|
||||
--replace_column 1 # 8 # 9 # 23 #
|
||||
--query_vertical show slave status /* reports the correct diff with master query time about 3+3 secs */;
|
||||
unlock tables;
|
||||
|
||||
connection master;
|
||||
drop table t1;
|
||||
|
||||
#connection slave;
|
||||
sync_slave_with_master;
|
||||
|
||||
|
||||
# End of tests
|
||||
|
Reference in New Issue
Block a user