Commit 92784001 authored by mats@kindahl-laptop.dnsalias.net's avatar mats@kindahl-laptop.dnsalias.net

Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-rpl

into  kindahl-laptop.dnsalias.net:/home/bk/b24954-mysql-5.1-new-rpl
parents 42cb3148 7bc43ebf
...@@ -107,9 +107,7 @@ show binlog events in 'slave-bin.000001' from 4; ...@@ -107,9 +107,7 @@ show binlog events in 'slave-bin.000001' from 4;
--replace_column 2 # 5 # --replace_column 2 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
show binlog events in 'slave-bin.000002' from 4; show binlog events in 'slave-bin.000002' from 4;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
show slave status;
# Need to recode the following # Need to recode the following
......
...@@ -43,10 +43,7 @@ set global max_relay_log_size=8192-1; # mapped to 4096 ...@@ -43,10 +43,7 @@ set global max_relay_log_size=8192-1; # mapped to 4096
select @@global.max_relay_log_size; select @@global.max_relay_log_size;
start slave; start slave;
sync_with_master; sync_with_master;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
--vertical_results
show slave status;
--echo # --echo #
--echo # Test 2 --echo # Test 2
...@@ -55,13 +52,10 @@ show slave status; ...@@ -55,13 +52,10 @@ show slave status;
stop slave; stop slave;
reset slave; reset slave;
set global max_relay_log_size=(5*4096); set global max_relay_log_size=(5*4096);
select @@global.max_relay_log_size; query_vertical select @@global.max_relay_log_size;
start slave; start slave;
sync_with_master; sync_with_master;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
--vertical_results
show slave status;
--echo # --echo #
--echo # Test 3: max_relay_log_size = 0 --echo # Test 3: max_relay_log_size = 0
...@@ -70,13 +64,10 @@ show slave status; ...@@ -70,13 +64,10 @@ show slave status;
stop slave; stop slave;
reset slave; reset slave;
set global max_relay_log_size=0; set global max_relay_log_size=0;
select @@global.max_relay_log_size; query_vertical select @@global.max_relay_log_size;
start slave; start slave;
sync_with_master; sync_with_master;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
--vertical_results
show slave status;
--echo # --echo #
--echo # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions --echo # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
...@@ -87,10 +78,7 @@ reset slave; ...@@ -87,10 +78,7 @@ reset slave;
# test of relay log rotation when the slave is stopped # test of relay log rotation when the slave is stopped
# (to make sure it does not crash). # (to make sure it does not crash).
flush logs; flush logs;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
--vertical_results
show slave status;
--echo # --echo #
--echo # Test 5 --echo # Test 5
...@@ -108,10 +96,7 @@ create table t1 (a int); ...@@ -108,10 +96,7 @@ create table t1 (a int);
save_master_pos; save_master_pos;
connection slave; connection slave;
sync_with_master; sync_with_master;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
--vertical_results
show slave status;
--echo # --echo #
--echo # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated --echo # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
...@@ -123,16 +108,13 @@ drop table t1; ...@@ -123,16 +108,13 @@ drop table t1;
save_master_pos; save_master_pos;
connection slave; connection slave;
sync_with_master; sync_with_master;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
--vertical_results
show slave status;
connection master; connection master;
# test that the absence of relay logs does not make a master crash # test that the absence of relay logs does not make a master crash
flush logs; flush logs;
-- replace_column 3 <Binlog_Ignore_DB> -- replace_column 3 <Binlog_Ignore_DB>
show master status; query_vertical show master status;
# Restore max_binlog_size # Restore max_binlog_size
connection slave; connection slave;
......
...@@ -13,26 +13,18 @@ connection master; ...@@ -13,26 +13,18 @@ connection master;
save_master_pos; save_master_pos;
connection slave; connection slave;
sync_with_master; sync_with_master;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
show slave status;
stop slave; stop slave;
change master to master_user='test'; change master to master_user='test';
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
show slave status;
reset slave; reset slave;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
show slave status;
start slave; start slave;
sync_with_master; sync_with_master;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
show slave status;
# test of crash with temp tables & RESET SLAVE # test of crash with temp tables & RESET SLAVE
# (test to see if RESET SLAVE clears temp tables in memory and disk) # (test to see if RESET SLAVE clears temp tables in memory and disk)
......
# 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;
...@@ -3,21 +3,128 @@ show master status; ...@@ -3,21 +3,128 @@ show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 106 master-bin.000001 106
reset slave; reset slave;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert
change master to master_host='127.0.0.1'; change master to master_host='127.0.0.1';
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 test DEFAULT_MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No # No Master_Host 127.0.0.1
Master_User test
Master_Port 3306
Connect_Retry 7
Master_Log_File
Read_Master_Log_Pos 4
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File
Slave_IO_Running No
Slave_SQL_Running No
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 0
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
change master to master_host='127.0.0.1',master_user='root', change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=MASTER_PORT; master_password='',master_port=MASTER_PORT;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 7
Master_Log_File
Read_Master_Log_Pos 4
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File
Slave_IO_Running No
Slave_SQL_Running No
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 0
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave; start slave;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 106 # # master-bin.000001 Yes Yes 0 0 106 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 7
Master_Log_File master-bin.000001
Read_Master_Log_Pos 106
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 106
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
drop table if exists t1; drop table if exists t1;
create table t1 (n int, PRIMARY KEY(n)); create table t1 (n int, PRIMARY KEY(n));
insert into t1 values (10),(45),(90); insert into t1 values (10),(45),(90);
......
...@@ -11,13 +11,85 @@ stop slave sql_thread; ...@@ -11,13 +11,85 @@ stop slave sql_thread;
insert into t1 values(1); insert into t1 values(1);
insert into t1 values(2); insert into t1 values(2);
stop slave; stop slave;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running No
Slave_SQL_Running No
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 191
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
change master to master_user='root'; change master to master_user='root';
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running No
Slave_SQL_Running No
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 191
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave; start slave;
select * from t1; select * from t1;
n n
......
...@@ -79,6 +79,10 @@ Master_SSL_Cipher ...@@ -79,6 +79,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 0
Last_SQL_Error
stop slave; stop slave;
delete from t3; delete from t3;
change master to master_log_pos=548; change master to master_log_pos=548;
...@@ -134,6 +138,10 @@ Master_SSL_Cipher ...@@ -134,6 +138,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 0
Last_SQL_Error
set @my_max_relay_log_size= @@global.max_relay_log_size; set @my_max_relay_log_size= @@global.max_relay_log_size;
set global max_relay_log_size=0; set global max_relay_log_size=0;
stop slave; stop slave;
...@@ -194,6 +202,10 @@ Master_SSL_Cipher ...@@ -194,6 +202,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 0
Last_SQL_Error
drop table t1,t2,t3,t4; drop table t1,t2,t3,t4;
set global max_relay_log_size= @my_max_relay_log_size; set global max_relay_log_size= @my_max_relay_log_size;
End of 5.1 tests End of 5.1 tests
...@@ -4,8 +4,7 @@ reset master; ...@@ -4,8 +4,7 @@ reset master;
reset slave; reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave; start slave;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert
load table t1 from master; load table t1 from master;
ERROR 08S01: Error connecting to master: Master is not configured ERROR 08S01: Error connecting to master: Master is not configured
load table t1 from master; load table t1 from master;
......
...@@ -73,7 +73,7 @@ Replicate_Ignore_Table ...@@ -73,7 +73,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 0 type mismatch - received type 252, test.t3 has type 3 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -88,6 +88,10 @@ Master_SSL_Cipher ...@@ -88,6 +88,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
*** Drop t3 *** *** Drop t3 ***
...@@ -131,7 +135,7 @@ Replicate_Ignore_Table ...@@ -131,7 +135,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 0 type mismatch - received type 246, test.t4 has type 3 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -146,6 +150,10 @@ Master_SSL_Cipher ...@@ -146,6 +150,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
*** Drop t4 *** *** Drop t4 ***
...@@ -189,7 +197,7 @@ Replicate_Ignore_Table ...@@ -189,7 +197,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 5 type mismatch - received type 4, test.t5 has type 246 Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -204,6 +212,10 @@ Master_SSL_Cipher ...@@ -204,6 +212,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
*** Drop t5 *** *** Drop t5 ***
...@@ -246,7 +258,7 @@ Replicate_Ignore_Table ...@@ -246,7 +258,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 3 type mismatch - received type 16, test.t6 has type 3 Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -261,6 +273,10 @@ Master_SSL_Cipher ...@@ -261,6 +273,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
*** Drop t6 *** *** Drop t6 ***
DROP TABLE t6; DROP TABLE t6;
...@@ -354,7 +370,7 @@ Replicate_Ignore_Table ...@@ -354,7 +370,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 2 type mismatch - received type 254, test.t10 has type 5 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -369,6 +385,10 @@ Master_SSL_Cipher ...@@ -369,6 +385,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
*** Drop t10 *** *** Drop t10 ***
...@@ -411,7 +431,7 @@ Replicate_Ignore_Table ...@@ -411,7 +431,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 2 type mismatch - received type 15, test.t11 has type 252 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -426,6 +446,10 @@ Master_SSL_Cipher ...@@ -426,6 +446,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
*** Drop t11 *** *** Drop t11 ***
...@@ -612,6 +636,10 @@ Master_SSL_Cipher ...@@ -612,6 +636,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1060
Last_SQL_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
*** Try to insert in master **** *** Try to insert in master ****
...@@ -728,7 +756,7 @@ Replicate_Ignore_Table ...@@ -728,7 +756,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 0 type mismatch - received type 8, test.t17 has type 2 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -743,6 +771,10 @@ Master_SSL_Cipher ...@@ -743,6 +771,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
** DROP table t17 *** ** DROP table t17 ***
......
...@@ -73,7 +73,7 @@ Replicate_Ignore_Table ...@@ -73,7 +73,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 0 type mismatch - received type 252, test.t3 has type 3 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -88,6 +88,10 @@ Master_SSL_Cipher ...@@ -88,6 +88,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
*** Drop t3 *** *** Drop t3 ***
...@@ -131,7 +135,7 @@ Replicate_Ignore_Table ...@@ -131,7 +135,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 0 type mismatch - received type 246, test.t4 has type 3 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -146,6 +150,10 @@ Master_SSL_Cipher ...@@ -146,6 +150,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
*** Drop t4 *** *** Drop t4 ***
...@@ -189,7 +197,7 @@ Replicate_Ignore_Table ...@@ -189,7 +197,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 5 type mismatch - received type 4, test.t5 has type 246 Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -204,6 +212,10 @@ Master_SSL_Cipher ...@@ -204,6 +212,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
*** Drop t5 *** *** Drop t5 ***
...@@ -246,7 +258,7 @@ Replicate_Ignore_Table ...@@ -246,7 +258,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 3 type mismatch - received type 16, test.t6 has type 3 Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -261,6 +273,10 @@ Master_SSL_Cipher ...@@ -261,6 +273,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
*** Drop t6 *** *** Drop t6 ***
DROP TABLE t6; DROP TABLE t6;
...@@ -354,7 +370,7 @@ Replicate_Ignore_Table ...@@ -354,7 +370,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 2 type mismatch - received type 254, test.t10 has type 5 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -369,6 +385,10 @@ Master_SSL_Cipher ...@@ -369,6 +385,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
*** Drop t10 *** *** Drop t10 ***
...@@ -411,7 +431,7 @@ Replicate_Ignore_Table ...@@ -411,7 +431,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 2 type mismatch - received type 15, test.t11 has type 252 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -426,6 +446,10 @@ Master_SSL_Cipher ...@@ -426,6 +446,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
*** Drop t11 *** *** Drop t11 ***
...@@ -612,6 +636,10 @@ Master_SSL_Cipher ...@@ -612,6 +636,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1060
Last_SQL_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
*** Try to insert in master **** *** Try to insert in master ****
...@@ -728,7 +756,7 @@ Replicate_Ignore_Table ...@@ -728,7 +756,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 0 type mismatch - received type 8, test.t17 has type 2 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -743,6 +771,10 @@ Master_SSL_Cipher ...@@ -743,6 +771,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
** DROP table t17 *** ** DROP table t17 ***
......
...@@ -51,4 +51,8 @@ Master_SSL_Cert ...@@ -51,4 +51,8 @@ Master_SSL_Cert
Master_SSL_Cipher Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert #
Last_IO_Errno #
Last_IO_Error
Last_SQL_Errno 0
Last_SQL_Error
...@@ -60,6 +60,10 @@ Master_SSL_Cipher ...@@ -60,6 +60,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1586
Last_SQL_Error The incident LOST_EVENTS occured on the master. Message: <none>
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE; START SLAVE;
SELECT * FROM t1; SELECT * FROM t1;
...@@ -103,4 +107,8 @@ Master_SSL_Cipher ...@@ -103,4 +107,8 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 0
Last_SQL_Error
DROP TABLE t1; DROP TABLE t1;
...@@ -46,6 +46,10 @@ Master_SSL_Cipher ...@@ -46,6 +46,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1105
Last_SQL_Error Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10'
SELECT * FROM t1; SELECT * FROM t1;
a b a b
stop slave; stop slave;
...@@ -129,6 +133,14 @@ Master_SSL_Cipher ...@@ -129,6 +133,14 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1105
Last_SQL_Error Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1 (field_1, field_2, field_3)
SELECT t2.field_a, t2.field_b, t2.field_c
FROM t2
ON DUPLICATE KEY UPDATE
t1.field_3 = t2.field_c'
SELECT * FROM t1; SELECT * FROM t1;
id field_1 field_2 field_3 id field_1 field_2 field_3
drop table t1, t2; drop table t1, t2;
......
...@@ -38,8 +38,8 @@ load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; ...@@ -38,8 +38,8 @@ load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
set global sql_slave_skip_counter=1; set global sql_slave_skip_counter=1;
start slave; start slave;
show slave status; show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1797 # # master-bin.000001 Yes Yes # 0 0 1797 # None 0 No # No # 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1797 # # master-bin.000001 Yes Yes # 0 0 1797 # None 0 No # No 0 0
set sql_log_bin=0; set sql_log_bin=0;
delete from t1; delete from t1;
set sql_log_bin=1; set sql_log_bin=1;
...@@ -48,8 +48,8 @@ stop slave; ...@@ -48,8 +48,8 @@ stop slave;
change master to master_user='test'; change master to master_user='test';
change master to master_user='root'; change master to master_user='root';
show slave status; show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1832 # # master-bin.000001 No No # 0 0 1832 # None 0 No # No # 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1832 # # master-bin.000001 No No # 0 0 1832 # None 0 No # No 0 0
set global sql_slave_skip_counter=1; set global sql_slave_skip_counter=1;
start slave; start slave;
set sql_log_bin=0; set sql_log_bin=0;
...@@ -59,8 +59,8 @@ load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; ...@@ -59,8 +59,8 @@ load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
stop slave; stop slave;
reset slave; reset slave;
show slave status; show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No # 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No 0 0
reset master; reset master;
create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
unique(day)) engine=MyISAM; unique(day)) engine=MyISAM;
......
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;
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1,10);
SHOW SLAVE STATUS;
Slave_IO_State #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 290
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 290
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE t1;
SHOW SLAVE STATUS;
Slave_IO_State #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 465
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes
Slave_SQL_Running No
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1589
Last_Error Fatal error: Not enough memory
Skip_Counter 0
Exec_Master_Log_Pos 325
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1589
Last_SQL_Error Fatal error: Not enough memory
...@@ -7,27 +7,171 @@ start slave; ...@@ -7,27 +7,171 @@ start slave;
show master status; show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 106 <Binlog_Ignore_DB> master-bin.000001 106 <Binlog_Ignore_DB>
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes 0 0 106 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 106
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 106
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
stop slave; stop slave;
change master to master_log_pos=75; change master to master_log_pos=75;
start slave; start slave;
stop slave; stop slave;
change master to master_log_pos=75; change master to master_log_pos=75;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 75 # # master-bin.000001 No No 0 0 75 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 75
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running No
Slave_SQL_Running No
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 75
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave; start slave;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 75 # # master-bin.000001 No Yes 0 0 75 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 75
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running No
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 75
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
stop slave; stop slave;
change master to master_log_pos=178; change master to master_log_pos=178;
start slave; start slave;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 178 # # master-bin.000001 # Yes 0 0 178 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 178
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running No
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 178
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
show master status; show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 106 <Binlog_Ignore_DB> master-bin.000001 106 <Binlog_Ignore_DB>
......
...@@ -175,6 +175,10 @@ Master_SSL_Cipher ...@@ -175,6 +175,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master <Seconds_Behind_Master> Seconds_Behind_Master <Seconds_Behind_Master>
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno <Last_SQL_Errno>
Last_SQL_Error <Last_SQL_Error>
set GLOBAL slave_transaction_retries=10; set GLOBAL slave_transaction_retries=10;
START SLAVE; START SLAVE;
select * from t1 order by nid; select * from t1 order by nid;
......
...@@ -52,6 +52,10 @@ Master_SSL_Cipher ...@@ -52,6 +52,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 0
Last_SQL_Error
SELECT * FROM t1 ORDER BY a; SELECT * FROM t1 ORDER BY a;
a b a b
1 2 1 2
...@@ -91,5 +95,9 @@ Master_SSL_Cipher ...@@ -91,5 +95,9 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 0
Last_SQL_Error
STOP SLAVE; STOP SLAVE;
DROP TABLE t1; DROP TABLE t1;
...@@ -73,7 +73,7 @@ Replicate_Ignore_Table ...@@ -73,7 +73,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 0 type mismatch - received type 252, test.t3 has type 3 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -88,6 +88,10 @@ Master_SSL_Cipher ...@@ -88,6 +88,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
*** Drop t3 *** *** Drop t3 ***
...@@ -131,7 +135,7 @@ Replicate_Ignore_Table ...@@ -131,7 +135,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 0 type mismatch - received type 246, test.t4 has type 3 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -146,6 +150,10 @@ Master_SSL_Cipher ...@@ -146,6 +150,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
*** Drop t4 *** *** Drop t4 ***
...@@ -189,7 +197,7 @@ Replicate_Ignore_Table ...@@ -189,7 +197,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 5 type mismatch - received type 4, test.t5 has type 246 Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -204,6 +212,10 @@ Master_SSL_Cipher ...@@ -204,6 +212,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
*** Drop t5 *** *** Drop t5 ***
...@@ -246,7 +258,7 @@ Replicate_Ignore_Table ...@@ -246,7 +258,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 3 type mismatch - received type 16, test.t6 has type 3 Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -261,6 +273,10 @@ Master_SSL_Cipher ...@@ -261,6 +273,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
*** Drop t6 *** *** Drop t6 ***
DROP TABLE t6; DROP TABLE t6;
...@@ -354,7 +370,7 @@ Replicate_Ignore_Table ...@@ -354,7 +370,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 2 type mismatch - received type 254, test.t10 has type 5 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -369,6 +385,10 @@ Master_SSL_Cipher ...@@ -369,6 +385,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
*** Drop t10 *** *** Drop t10 ***
...@@ -411,7 +431,7 @@ Replicate_Ignore_Table ...@@ -411,7 +431,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 2 type mismatch - received type 15, test.t11 has type 252 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -426,6 +446,10 @@ Master_SSL_Cipher ...@@ -426,6 +446,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
*** Drop t11 *** *** Drop t11 ***
...@@ -612,6 +636,10 @@ Master_SSL_Cipher ...@@ -612,6 +636,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1060
Last_SQL_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
*** Try to insert in master **** *** Try to insert in master ****
...@@ -729,7 +757,7 @@ Replicate_Ignore_Table ...@@ -729,7 +757,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 0 type mismatch - received type 8, test.t17 has type 2 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -744,6 +772,10 @@ Master_SSL_Cipher ...@@ -744,6 +772,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
** DROP table t17 *** ** DROP table t17 ***
......
...@@ -33,15 +33,15 @@ c1 c2 c3 ...@@ -33,15 +33,15 @@ c1 c2 c3
row3 C 3 row3 C 3
row4 D 4 row4 D 4
SHOW SLAVE STATUS; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 Yes Yes <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> No <Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 Yes Yes <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> No <Last_IO_Errno> <Last_IO_Error> 0
STOP SLAVE; STOP SLAVE;
CHANGE MASTER TO CHANGE MASTER TO
master_log_file = 'master-bin.000001', master_log_file = 'master-bin.000001',
master_log_pos = <the_pos> ; master_log_pos = <the_pos> ;
SHOW SLAVE STATUS; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 No No <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> No <Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 No No <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> No <Last_IO_Errno> <Last_IO_Error> 0
START SLAVE; START SLAVE;
SELECT * FROM t1 ORDER BY c3; SELECT * FROM t1 ORDER BY c3;
c1 c2 c3 c1 c2 c3
...@@ -68,6 +68,6 @@ SELECT * FROM t1; ...@@ -68,6 +68,6 @@ SELECT * FROM t1;
c1 c2 c3 c1 c2 c3
row2 new on slave 2 row2 new on slave 2
SHOW SLAVE STATUS; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 Yes Yes <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> No <Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 Yes Yes <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> <Last_IO_Errno> <Last_IO_Error> 0
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
...@@ -126,9 +126,45 @@ slave-bin.000002 # Table_map 2 # table_id: # (mysql.ndb_apply_status) ...@@ -126,9 +126,45 @@ slave-bin.000002 # Table_map 2 # table_id: # (mysql.ndb_apply_status)
slave-bin.000002 # Write_rows 2 # table_id: # slave-bin.000002 # Write_rows 2 # table_id: #
slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
slave-bin.000002 # Query 2 # COMMIT slave-bin.000002 # Query 2 # COMMIT
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 617 # # master-bin.000002 Yes Yes # 0 0 617 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000002
Read_Master_Log_Pos 617
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000002
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 617
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
show binlog events in 'slave-bin.000005' from 4; show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
DROP TABLE t1; DROP TABLE t1;
......
...@@ -72,8 +72,44 @@ master_log_file = 'master-bin.000001', ...@@ -72,8 +72,44 @@ master_log_file = 'master-bin.000001',
master_log_pos = <the_pos> ; master_log_pos = <the_pos> ;
START SLAVE; START SLAVE;
SHOW SLAVE STATUS; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State <Slave_IO_State>
<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 Yes Yes <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos <Read_Master_Log_Pos>
Relay_Log_File <Relay_Log_File>
Relay_Log_Pos <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_Ignore_Table>
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos <Exec_Master_Log_Pos>
Relay_Log_Space <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 <Seconds_Behind_Master>
Master_SSL_Verify_Server_Cert No
Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno 0
Last_SQL_Error
SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
hex(c1) hex(c2) c3 hex(c1) hex(c2) c3
1 1 row1 1 1 row1
......
...@@ -55,7 +55,11 @@ Master_SSL_Cert ...@@ -55,7 +55,11 @@ Master_SSL_Cert
Master_SSL_Cipher Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert #
Last_IO_Errno #
Last_IO_Error
Last_SQL_Errno 0
Last_SQL_Error
SHOW BINLOG EVENTS; SHOW BINLOG EVENTS;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
......
...@@ -5,7 +5,6 @@ reset slave; ...@@ -5,7 +5,6 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave; start slave;
SHOW SLAVE STATUS; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert
SHOW SLAVE HOSTS; SHOW SLAVE HOSTS;
Server_id Host Port Rpl_recovery_rank Master_id Server_id Host Port Rpl_recovery_rank Master_id
2 127.0.0.1 SLAVE_PORT 2 1 2 127.0.0.1 SLAVE_PORT 2 1
......
...@@ -26,9 +26,45 @@ n ...@@ -26,9 +26,45 @@ n
select * from t11; select * from t11;
ERROR 42S02: Table 'test.t11' doesn't exist ERROR 42S02: Table 'test.t11' doesn't exist
drop table if exists t1,t2,t11; drop table if exists t1,t2,t11;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 # # # master-bin.000001 Yes Yes test.t1 # 0 0 # # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos #
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 test.t1
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos #
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
create table t1 (ts timestamp); create table t1 (ts timestamp);
set one_shot time_zone='met'; set one_shot time_zone='met';
insert into t1 values('2005-08-12 00:00:00'); insert into t1 values('2005-08-12 00:00:00');
......
...@@ -14,9 +14,45 @@ create temporary table temp_table (a char(80) not null); ...@@ -14,9 +14,45 @@ create temporary table temp_table (a char(80) not null);
insert into temp_table values ("testing temporary tables"); insert into temp_table values ("testing temporary tables");
create table t1 (s text); create table t1 (s text);
insert into t1 values('Could not break slave'),('Tried hard'); insert into t1 values('Could not break slave'),('Tried hard');
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 556 # # master-bin.000001 Yes Yes # 0 0 556 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 60
Master_Log_File master-bin.000001
Read_Master_Log_Pos 556
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 556
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
select * from t1; select * from t1;
s s
Could not break slave Could not break slave
...@@ -58,9 +94,45 @@ show binary logs; ...@@ -58,9 +94,45 @@ show binary logs;
Log_name File_size Log_name File_size
master-bin.000003 415 master-bin.000003 415
insert into t2 values (65); insert into t2 values (65);
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 504 # # master-bin.000003 Yes Yes # 0 0 504 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 60
Master_Log_File master-bin.000003
Read_Master_Log_Pos 504
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000003
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 504
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
select * from t2; select * from t2;
m m
34 34
...@@ -86,9 +158,45 @@ master-bin.000005 2040 ...@@ -86,9 +158,45 @@ master-bin.000005 2040
select * from t4; select * from t4;
a a
testing temporary tables part 2 testing temporary tables part 2
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2040 # # master-bin.000005 Yes Yes # 0 0 2040 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 60
Master_Log_File master-bin.000005
Read_Master_Log_Pos 2040
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000005
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 2040
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
lock tables t3 read; lock tables t3 read;
select count(*) from t3 where n >= 4; select count(*) from t3 where n >= 4;
count(*) count(*)
......
...@@ -17,14 +17,14 @@ a ...@@ -17,14 +17,14 @@ a
0 0
drop table t1; drop table t1;
insert into t1 values (1); insert into t1 values (1);
show slave status; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
Master_Port MASTER_MYPORT Master_Port MASTER_PORT
Connect_Retry 1 Connect_Retry 1
Master_Log_File master-bin.000001 Master_Log_File master-bin.000001
Read_Master_Log_Pos # Read_Master_Log_Pos 597
Relay_Log_File # Relay_Log_File #
Relay_Log_Pos # Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001 Relay_Master_Log_File master-bin.000001
...@@ -33,7 +33,7 @@ Slave_SQL_Running No ...@@ -33,7 +33,7 @@ Slave_SQL_Running No
Replicate_Do_DB Replicate_Do_DB
Replicate_Ignore_DB Replicate_Ignore_DB
Replicate_Do_Table Replicate_Do_Table
Replicate_Ignore_Table test.t2 Replicate_Ignore_Table #
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1146 Last_Errno 1146
...@@ -52,4 +52,8 @@ Master_SSL_Cipher ...@@ -52,4 +52,8 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1146
Last_SQL_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
drop table t1, t2; drop table t1, t2;
...@@ -91,9 +91,45 @@ slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 ...@@ -91,9 +91,45 @@ slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM
slave-bin.000002 # Table_map 1 # table_id: # (test.t2) slave-bin.000002 # Table_map 1 # table_id: # (test.t2)
slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 377 # # master-bin.000002 Yes Yes # 0 0 377 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000002
Read_Master_Log_Pos 377
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000002
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 377
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
show binlog events in 'slave-bin.000005' from 4; show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
DROP TABLE t1; DROP TABLE t1;
......
...@@ -99,9 +99,45 @@ slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=InnoDB ...@@ -99,9 +99,45 @@ slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=InnoDB
slave-bin.000002 # Table_map 1 # table_id: # (test.t2) slave-bin.000002 # Table_map 1 # table_id: # (test.t2)
slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
slave-bin.000002 # Xid 1 # COMMIT /* XID */ slave-bin.000002 # Xid 1 # COMMIT /* XID */
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 404 # # master-bin.000002 Yes Yes # 0 0 404 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000002
Read_Master_Log_Pos 404
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000002
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 404
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
show binlog events in 'slave-bin.000005' from 4; show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
DROP TABLE t1; DROP TABLE t1;
......
...@@ -23,7 +23,7 @@ select @@global.max_relay_log_size; ...@@ -23,7 +23,7 @@ select @@global.max_relay_log_size;
@@global.max_relay_log_size @@global.max_relay_log_size
4096 4096
start slave; start slave;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
...@@ -58,6 +58,10 @@ Master_SSL_Cipher ...@@ -58,6 +58,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
# #
# Test 2 # Test 2
# #
...@@ -67,7 +71,7 @@ set global max_relay_log_size=(5*4096); ...@@ -67,7 +71,7 @@ set global max_relay_log_size=(5*4096);
select @@global.max_relay_log_size; select @@global.max_relay_log_size;
@@global.max_relay_log_size 20480 @@global.max_relay_log_size 20480
start slave; start slave;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
...@@ -102,6 +106,10 @@ Master_SSL_Cipher ...@@ -102,6 +106,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
# #
# Test 3: max_relay_log_size = 0 # Test 3: max_relay_log_size = 0
# #
...@@ -111,7 +119,7 @@ set global max_relay_log_size=0; ...@@ -111,7 +119,7 @@ set global max_relay_log_size=0;
select @@global.max_relay_log_size; select @@global.max_relay_log_size;
@@global.max_relay_log_size 0 @@global.max_relay_log_size 0
start slave; start slave;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
...@@ -146,13 +154,17 @@ Master_SSL_Cipher ...@@ -146,13 +154,17 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
# #
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
# #
stop slave; stop slave;
reset slave; reset slave;
flush logs; flush logs;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
...@@ -187,6 +199,10 @@ Master_SSL_Cipher ...@@ -187,6 +199,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
# #
# Test 5 # Test 5
# #
...@@ -194,7 +210,7 @@ reset slave; ...@@ -194,7 +210,7 @@ reset slave;
start slave; start slave;
flush logs; flush logs;
create table t1 (a int); create table t1 (a int);
show slave status; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
...@@ -229,12 +245,16 @@ Master_SSL_Cipher ...@@ -229,12 +245,16 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
# #
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
# #
flush logs; flush logs;
drop table t1; drop table t1;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
...@@ -269,6 +289,10 @@ Master_SSL_Cipher ...@@ -269,6 +289,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
flush logs; flush logs;
show master status; show master status;
File master-bin.000002 File master-bin.000002
......
...@@ -4,22 +4,166 @@ reset master; ...@@ -4,22 +4,166 @@ reset master;
reset slave; reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave; start slave;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 106
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 106
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
stop slave; stop slave;
change master to master_user='test'; change master to master_user='test';
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 No No # 0 0 106 # None 0 No # No Master_Host 127.0.0.1
Master_User test
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 106
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running No
Slave_SQL_Running No
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 106
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
reset slave; reset slave;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File
Read_Master_Log_Pos 4
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File
Slave_IO_Running No
Slave_SQL_Running No
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 0
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave; start slave;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 106
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 106
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
stop slave; stop slave;
reset slave; reset slave;
start slave; start slave;
......
...@@ -122,7 +122,7 @@ Replicate_Do_Table ...@@ -122,7 +122,7 @@ Replicate_Do_Table
Replicate_Ignore_Table Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1105 Last_Errno 1364
Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
...@@ -138,6 +138,10 @@ Master_SSL_Cipher ...@@ -138,6 +138,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1364
Last_SQL_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
INSERT INTO t9 VALUES (2); INSERT INTO t9 VALUES (2);
...@@ -162,7 +166,7 @@ Replicate_Ignore_Table ...@@ -162,7 +166,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns Last_Error Table definition on master and slave does not match: Table width mismatch - received 2 columns, test.t2 has 1 columns
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -177,6 +181,10 @@ Master_SSL_Cipher ...@@ -177,6 +181,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Table width mismatch - received 2 columns, test.t2 has 1 columns
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
INSERT INTO t9 VALUES (4); INSERT INTO t9 VALUES (4);
...@@ -201,7 +209,7 @@ Replicate_Ignore_Table ...@@ -201,7 +209,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -216,6 +224,10 @@ Master_SSL_Cipher ...@@ -216,6 +224,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
INSERT INTO t9 VALUES (5); INSERT INTO t9 VALUES (5);
...@@ -240,7 +252,7 @@ Replicate_Ignore_Table ...@@ -240,7 +252,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4 Last_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -255,6 +267,10 @@ Master_SSL_Cipher ...@@ -255,6 +267,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
INSERT INTO t9 VALUES (6); INSERT INTO t9 VALUES (6);
...@@ -279,7 +295,7 @@ Replicate_Ignore_Table ...@@ -279,7 +295,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -294,6 +310,10 @@ Master_SSL_Cipher ...@@ -294,6 +310,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
INSERT INTO t9 VALUES (6); INSERT INTO t9 VALUES (6);
...@@ -332,6 +352,10 @@ Master_SSL_Cipher ...@@ -332,6 +352,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 0
Last_SQL_Error
INSERT INTO t7 VALUES (1),(2),(3); INSERT INTO t7 VALUES (1),(2),(3);
INSERT INTO t8 VALUES (1),(2),(3); INSERT INTO t8 VALUES (1),(2),(3);
SELECT * FROM t7 ORDER BY a; SELECT * FROM t7 ORDER BY a;
......
...@@ -122,7 +122,7 @@ Replicate_Do_Table ...@@ -122,7 +122,7 @@ Replicate_Do_Table
Replicate_Ignore_Table Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1105 Last_Errno 1364
Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
...@@ -138,6 +138,10 @@ Master_SSL_Cipher ...@@ -138,6 +138,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1364
Last_SQL_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
INSERT INTO t9 VALUES (2); INSERT INTO t9 VALUES (2);
...@@ -162,7 +166,7 @@ Replicate_Ignore_Table ...@@ -162,7 +166,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns Last_Error Table definition on master and slave does not match: Table width mismatch - received 2 columns, test.t2 has 1 columns
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -177,6 +181,10 @@ Master_SSL_Cipher ...@@ -177,6 +181,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Table width mismatch - received 2 columns, test.t2 has 1 columns
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
INSERT INTO t9 VALUES (4); INSERT INTO t9 VALUES (4);
...@@ -201,7 +209,7 @@ Replicate_Ignore_Table ...@@ -201,7 +209,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -216,6 +224,10 @@ Master_SSL_Cipher ...@@ -216,6 +224,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
INSERT INTO t9 VALUES (5); INSERT INTO t9 VALUES (5);
...@@ -240,7 +252,7 @@ Replicate_Ignore_Table ...@@ -240,7 +252,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4 Last_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -255,6 +267,10 @@ Master_SSL_Cipher ...@@ -255,6 +267,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
INSERT INTO t9 VALUES (6); INSERT INTO t9 VALUES (6);
...@@ -279,7 +295,7 @@ Replicate_Ignore_Table ...@@ -279,7 +295,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1523 Last_Errno 1523
Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -294,6 +310,10 @@ Master_SSL_Cipher ...@@ -294,6 +310,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 1523
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
INSERT INTO t9 VALUES (6); INSERT INTO t9 VALUES (6);
...@@ -332,6 +352,10 @@ Master_SSL_Cipher ...@@ -332,6 +352,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 0
Last_SQL_Error
INSERT INTO t7 VALUES (1),(2),(3); INSERT INTO t7 VALUES (1),(2),(3);
INSERT INTO t8 VALUES (1),(2),(3); INSERT INTO t8 VALUES (1),(2),(3);
SELECT * FROM t7 ORDER BY a; SELECT * FROM t7 ORDER BY a;
......
...@@ -19,23 +19,23 @@ n ...@@ -19,23 +19,23 @@ n
2 2
3 3
4 4
SHOW SLAVE STATUS;; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
Master_Port MASTER_MYPORT Master_Port MASTER_PORT
Connect_Retry 1 Connect_Retry 1
Master_Log_File master-bin.000001 Master_Log_File master-bin.000001
Read_Master_Log_Pos 744 Read_Master_Log_Pos 744
Relay_Log_File slave-relay-bin.000004 Relay_Log_File #
Relay_Log_Pos # Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001 Relay_Master_Log_File master-bin.000001
Slave_IO_Running # Slave_IO_Running Yes
Slave_SQL_Running No Slave_SQL_Running No
Replicate_Do_DB Replicate_Do_DB
Replicate_Ignore_DB Replicate_Ignore_DB
Replicate_Do_Table Replicate_Do_Table
Replicate_Ignore_Table Replicate_Ignore_Table #
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 0 Last_Errno 0
...@@ -54,6 +54,10 @@ Master_SSL_Cipher ...@@ -54,6 +54,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
select * from t1; select * from t1;
n n
...@@ -61,23 +65,23 @@ n ...@@ -61,23 +65,23 @@ n
2 2
3 3
4 4
SHOW SLAVE STATUS;; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
Master_Port MASTER_MYPORT Master_Port MASTER_PORT
Connect_Retry 1 Connect_Retry 1
Master_Log_File master-bin.000001 Master_Log_File master-bin.000001
Read_Master_Log_Pos 744 Read_Master_Log_Pos 744
Relay_Log_File slave-relay-bin.000004 Relay_Log_File #
Relay_Log_Pos # Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001 Relay_Master_Log_File master-bin.000001
Slave_IO_Running # Slave_IO_Running Yes
Slave_SQL_Running No Slave_SQL_Running No
Replicate_Do_DB Replicate_Do_DB
Replicate_Ignore_DB Replicate_Ignore_DB
Replicate_Do_Table Replicate_Do_Table
Replicate_Ignore_Table Replicate_Ignore_Table #
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 0 Last_Errno 0
...@@ -96,28 +100,32 @@ Master_SSL_Cipher ...@@ -96,28 +100,32 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728; start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
select * from t2; select * from t2;
n n
1 1
2 2
SHOW SLAVE STATUS;; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
Master_Port MASTER_MYPORT Master_Port MASTER_PORT
Connect_Retry 1 Connect_Retry 1
Master_Log_File master-bin.000001 Master_Log_File master-bin.000001
Read_Master_Log_Pos 744 Read_Master_Log_Pos 744
Relay_Log_File slave-relay-bin.000004 Relay_Log_File #
Relay_Log_Pos # Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001 Relay_Master_Log_File master-bin.000001
Slave_IO_Running # Slave_IO_Running Yes
Slave_SQL_Running No Slave_SQL_Running No
Replicate_Do_DB Replicate_Do_DB
Replicate_Ignore_DB Replicate_Ignore_DB
Replicate_Do_Table Replicate_Do_Table
Replicate_Ignore_Table Replicate_Ignore_Table #
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 0 Last_Errno 0
...@@ -136,18 +144,22 @@ Master_SSL_Cipher ...@@ -136,18 +144,22 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave; start slave;
stop slave; stop slave;
start slave until master_log_file='master-bin.000001', master_log_pos=740; start slave until master_log_file='master-bin.000001', master_log_pos=740;
SHOW SLAVE STATUS;; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
Master_Port MASTER_MYPORT Master_Port MASTER_PORT
Connect_Retry 1 Connect_Retry 1
Master_Log_File master-bin.000001 Master_Log_File master-bin.000001
Read_Master_Log_Pos 744 Read_Master_Log_Pos 744
Relay_Log_File slave-relay-bin.000004 Relay_Log_File #
Relay_Log_Pos # Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001 Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes Slave_IO_Running Yes
...@@ -155,7 +167,7 @@ Slave_SQL_Running No ...@@ -155,7 +167,7 @@ Slave_SQL_Running No
Replicate_Do_DB Replicate_Do_DB
Replicate_Ignore_DB Replicate_Ignore_DB
Replicate_Do_Table Replicate_Do_Table
Replicate_Ignore_Table Replicate_Ignore_Table #
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 0 Last_Errno 0
...@@ -174,6 +186,10 @@ Master_SSL_Cipher ...@@ -174,6 +186,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave until master_log_file='master-bin', master_log_pos=561; start slave until master_log_file='master-bin', master_log_pos=561;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
......
...@@ -9,8 +9,44 @@ reset master; ...@@ -9,8 +9,44 @@ reset master;
stop slave; stop slave;
change master to master_port=SLAVE_PORT; change master to master_port=SLAVE_PORT;
show slave status; show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # # 0 0 0 106 None 0 No NULL No Master_Host 127.0.0.1
Master_User root
Master_Port SLAVE_PORT
Connect_Retry 1
Master_Log_File
Read_Master_Log_Pos 4
Relay_Log_File slave-relay-bin.000001
Relay_Log_Pos 4
Relay_Master_Log_File
Slave_IO_Running No
Slave_SQL_Running No
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 0
Relay_Log_Space 106
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 NULL
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave; start slave;
insert into t1 values (1); insert into t1 values (1);
show status like "slave_running"; show status like "slave_running";
......
...@@ -9,8 +9,44 @@ reset master; ...@@ -9,8 +9,44 @@ reset master;
stop slave; stop slave;
change master to master_port=SLAVE_PORT; change master to master_port=SLAVE_PORT;
show slave status; show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 106 None 0 No NULL No Master_Host 127.0.0.1
Master_User root
Master_Port SLAVE_PORT
Connect_Retry 1
Master_Log_File
Read_Master_Log_Pos 4
Relay_Log_File slave-relay-bin.000001
Relay_Log_Pos 4
Relay_Master_Log_File
Slave_IO_Running No
Slave_SQL_Running No
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 0
Relay_Log_Space 106
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 NULL
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave; start slave;
insert into t1 values (1); insert into t1 values (1);
select * from t1; select * from t1;
......
...@@ -72,6 +72,10 @@ Master_SSL_Cipher ...@@ -72,6 +72,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 0
Last_SQL_Error
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE; START SLAVE;
SELECT * FROM t1; SELECT * FROM t1;
...@@ -132,5 +136,9 @@ Master_SSL_Cipher ...@@ -132,5 +136,9 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 0
Last_SQL_Error
**** On Master **** **** On Master ****
DROP TABLE t1, t2; DROP TABLE t1, t2;
...@@ -53,6 +53,10 @@ Master_SSL_Cipher ...@@ -53,6 +53,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master NULL Seconds_Behind_Master NULL
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
drop table t1; drop table t1;
delete from mysql.user where user='rpl'; delete from mysql.user where user='rpl';
drop table t1; drop table t1;
...@@ -54,6 +54,10 @@ Master_SSL_Cipher ...@@ -54,6 +54,10 @@ Master_SSL_Cipher
Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
STOP SLAVE; STOP SLAVE;
select * from t1; select * from t1;
t t
...@@ -94,5 +98,9 @@ Master_SSL_Cipher ...@@ -94,5 +98,9 @@ Master_SSL_Cipher
Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
drop user replssl@localhost; drop user replssl@localhost;
drop table t1; drop table t1;
...@@ -53,6 +53,10 @@ Master_SSL_Cipher ...@@ -53,6 +53,10 @@ Master_SSL_Cipher
Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
stop slave; stop slave;
change master to master_user='root',master_password='', master_ssl=0; change master to master_user='root',master_password='', master_ssl=0;
start slave; start slave;
...@@ -93,6 +97,10 @@ Master_SSL_Cipher ...@@ -93,6 +97,10 @@ Master_SSL_Cipher
Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
stop slave; stop slave;
change master to change master to
master_host="localhost", master_host="localhost",
...@@ -143,4 +151,8 @@ Master_SSL_Cipher ...@@ -143,4 +151,8 @@ Master_SSL_Cipher
Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert Yes Master_SSL_Verify_Server_Cert Yes
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
drop table t1; drop table t1;
...@@ -89,9 +89,45 @@ Log_name Pos Event_type Server_id End_log_pos Info ...@@ -89,9 +89,45 @@ Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM
slave-bin.000002 # Query 1 # use `test`; insert into t2 values (1) slave-bin.000002 # Query 1 # use `test`; insert into t2 values (1)
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 392 # # master-bin.000002 Yes Yes # 0 0 392 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000002
Read_Master_Log_Pos 392
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000002
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 392
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
show binlog events in 'slave-bin.000005' from 4; show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
DROP TABLE t1; DROP TABLE t1;
......
...@@ -21,7 +21,7 @@ select @@global.max_relay_log_size; ...@@ -21,7 +21,7 @@ select @@global.max_relay_log_size;
@@global.max_relay_log_size @@global.max_relay_log_size
4096 4096
start slave; start slave;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
...@@ -56,6 +56,10 @@ Master_SSL_Cipher ...@@ -56,6 +56,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
# #
# Test 2 # Test 2
# #
...@@ -65,7 +69,7 @@ set global max_relay_log_size=(5*4096); ...@@ -65,7 +69,7 @@ set global max_relay_log_size=(5*4096);
select @@global.max_relay_log_size; select @@global.max_relay_log_size;
@@global.max_relay_log_size 20480 @@global.max_relay_log_size 20480
start slave; start slave;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
...@@ -100,6 +104,10 @@ Master_SSL_Cipher ...@@ -100,6 +104,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
# #
# Test 3: max_relay_log_size = 0 # Test 3: max_relay_log_size = 0
# #
...@@ -109,7 +117,7 @@ set global max_relay_log_size=0; ...@@ -109,7 +117,7 @@ set global max_relay_log_size=0;
select @@global.max_relay_log_size; select @@global.max_relay_log_size;
@@global.max_relay_log_size 0 @@global.max_relay_log_size 0
start slave; start slave;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
...@@ -144,13 +152,17 @@ Master_SSL_Cipher ...@@ -144,13 +152,17 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
# #
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
# #
stop slave; stop slave;
reset slave; reset slave;
flush logs; flush logs;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
...@@ -185,6 +197,10 @@ Master_SSL_Cipher ...@@ -185,6 +197,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
# #
# Test 5 # Test 5
# #
...@@ -192,7 +208,7 @@ reset slave; ...@@ -192,7 +208,7 @@ reset slave;
start slave; start slave;
flush logs; flush logs;
create table t1 (a int); create table t1 (a int);
show slave status; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
...@@ -227,12 +243,16 @@ Master_SSL_Cipher ...@@ -227,12 +243,16 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
# #
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
# #
flush logs; flush logs;
drop table t1; drop table t1;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
...@@ -267,6 +287,10 @@ Master_SSL_Cipher ...@@ -267,6 +287,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
flush logs; flush logs;
show master status; show master status;
File master-bin.000002 File master-bin.000002
......
...@@ -4,22 +4,166 @@ reset master; ...@@ -4,22 +4,166 @@ reset master;
reset slave; reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave; start slave;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 106
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 106
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
stop slave; stop slave;
change master to master_user='test'; change master to master_user='test';
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 No No # 0 0 106 # None 0 No # No Master_Host 127.0.0.1
Master_User test
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 106
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running No
Slave_SQL_Running No
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 106
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
reset slave; reset slave;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File
Read_Master_Log_Pos 4
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File
Slave_IO_Running No
Slave_SQL_Running No
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 0
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave; start slave;
show slave status; SHOW SLAVE STATUS;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 106
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 106
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 #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
stop slave; stop slave;
reset slave; reset slave;
start slave; start slave;
......
...@@ -23,19 +23,19 @@ SHOW SLAVE STATUS; ...@@ -23,19 +23,19 @@ SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
Master_Port MASTER_MYPORT Master_Port MASTER_PORT
Connect_Retry 1 Connect_Retry 1
Master_Log_File master-bin.000001 Master_Log_File master-bin.000001
Read_Master_Log_Pos 784 Read_Master_Log_Pos 784
Relay_Log_File slave-relay-bin.000004 Relay_Log_File #
Relay_Log_Pos # Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001 Relay_Master_Log_File master-bin.000001
Slave_IO_Running # Slave_IO_Running Yes
Slave_SQL_Running No Slave_SQL_Running No
Replicate_Do_DB Replicate_Do_DB
Replicate_Ignore_DB Replicate_Ignore_DB
Replicate_Do_Table Replicate_Do_Table
Replicate_Ignore_Table Replicate_Ignore_Table #
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 0 Last_Errno 0
...@@ -54,6 +54,10 @@ Master_SSL_Cipher ...@@ -54,6 +54,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
select * from t1; select * from t1;
n n
...@@ -65,19 +69,19 @@ SHOW SLAVE STATUS; ...@@ -65,19 +69,19 @@ SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
Master_Port MASTER_MYPORT Master_Port MASTER_PORT
Connect_Retry 1 Connect_Retry 1
Master_Log_File master-bin.000001 Master_Log_File master-bin.000001
Read_Master_Log_Pos 784 Read_Master_Log_Pos 784
Relay_Log_File slave-relay-bin.000004 Relay_Log_File #
Relay_Log_Pos # Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001 Relay_Master_Log_File master-bin.000001
Slave_IO_Running # Slave_IO_Running Yes
Slave_SQL_Running No Slave_SQL_Running No
Replicate_Do_DB Replicate_Do_DB
Replicate_Ignore_DB Replicate_Ignore_DB
Replicate_Do_Table Replicate_Do_Table
Replicate_Ignore_Table Replicate_Ignore_Table #
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 0 Last_Errno 0
...@@ -96,6 +100,10 @@ Master_SSL_Cipher ...@@ -96,6 +100,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746; start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746;
select * from t2; select * from t2;
n n
...@@ -105,19 +113,19 @@ SHOW SLAVE STATUS; ...@@ -105,19 +113,19 @@ SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
Master_Port MASTER_MYPORT Master_Port MASTER_PORT
Connect_Retry 1 Connect_Retry 1
Master_Log_File master-bin.000001 Master_Log_File master-bin.000001
Read_Master_Log_Pos 784 Read_Master_Log_Pos 784
Relay_Log_File slave-relay-bin.000004 Relay_Log_File #
Relay_Log_Pos # Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001 Relay_Master_Log_File master-bin.000001
Slave_IO_Running # Slave_IO_Running Yes
Slave_SQL_Running No Slave_SQL_Running No
Replicate_Do_DB Replicate_Do_DB
Replicate_Ignore_DB Replicate_Ignore_DB
Replicate_Do_Table Replicate_Do_Table
Replicate_Ignore_Table Replicate_Ignore_Table #
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 0 Last_Errno 0
...@@ -136,6 +144,10 @@ Master_SSL_Cipher ...@@ -136,6 +144,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave; start slave;
stop slave; stop slave;
start slave until master_log_file='master-bin.000001', master_log_pos=776; start slave until master_log_file='master-bin.000001', master_log_pos=776;
...@@ -143,11 +155,11 @@ SHOW SLAVE STATUS; ...@@ -143,11 +155,11 @@ SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
Master_User root Master_User root
Master_Port MASTER_MYPORT Master_Port MASTER_PORT
Connect_Retry 1 Connect_Retry 1
Master_Log_File master-bin.000001 Master_Log_File master-bin.000001
Read_Master_Log_Pos 784 Read_Master_Log_Pos 784
Relay_Log_File slave-relay-bin.000004 Relay_Log_File #
Relay_Log_Pos # Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001 Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes Slave_IO_Running Yes
...@@ -155,7 +167,7 @@ Slave_SQL_Running No ...@@ -155,7 +167,7 @@ Slave_SQL_Running No
Replicate_Do_DB Replicate_Do_DB
Replicate_Ignore_DB Replicate_Ignore_DB
Replicate_Do_Table Replicate_Do_Table
Replicate_Ignore_Table Replicate_Ignore_Table #
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 0 Last_Errno 0
...@@ -174,6 +186,10 @@ Master_SSL_Cipher ...@@ -174,6 +186,10 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
start slave until master_log_file='master-bin', master_log_pos=561; start slave until master_log_file='master-bin', master_log_pos=561;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
......
...@@ -25,6 +25,7 @@ flush logs; ...@@ -25,6 +25,7 @@ flush logs;
eval select eval select
(@a:=load_file("$MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output")) (@a:=load_file("$MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output"))
is not null; is not null;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
eval select eval select
@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%", @a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%",
......
...@@ -12,26 +12,18 @@ show master status; ...@@ -12,26 +12,18 @@ show master status;
save_master_pos; save_master_pos;
connection slave; connection slave;
reset slave; reset slave;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 23 # 33 #
show slave status;
change master to master_host='127.0.0.1'; change master to master_host='127.0.0.1';
# The following needs to be cleaned up when change master is fixed # The following needs to be cleaned up when change master is fixed
--replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 23 # 33 #
show slave status;
--replace_result $MASTER_MYPORT MASTER_PORT --replace_result $MASTER_MYPORT MASTER_PORT
eval change master to master_host='127.0.0.1',master_user='root', eval change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=$MASTER_MYPORT; master_password='',master_port=$MASTER_MYPORT;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 23 # 33 #
show slave status;
start slave; start slave;
sync_with_master; sync_with_master;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 23 # 33 #
show slave status;
connection master; connection master;
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
......
...@@ -18,13 +18,13 @@ save_master_pos; ...@@ -18,13 +18,13 @@ save_master_pos;
connection slave; connection slave;
--real_sleep 3 # wait for I/O thread to have read updates --real_sleep 3 # wait for I/O thread to have read updates
stop slave; stop slave;
--replace_result $MASTER_MYPORT MASTER_MYPORT --replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 7 # 8 # 9 # 23 # 33 # --replace_column 1 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
show slave status; query_vertical SHOW SLAVE STATUS;
change master to master_user='root'; change master to master_user='root';
--replace_result $MASTER_MYPORT MASTER_MYPORT --replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 7 # 8 # 9 # 23 # 33 # --replace_column 1 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
show slave status; query_vertical SHOW SLAVE STATUS;
start slave; start slave;
sync_with_master; sync_with_master;
select * from t1; select * from t1;
......
source include/master-slave.inc; source include/master-slave.inc;
--replace_column 1 # 8 # 9 # 16 # 23 # 33 # source include/show_slave_status.inc;
show slave status;
# #
# Load table should not succeed on the master as this is not a slave # Load table should not succeed on the master as this is not a slave
......
...@@ -45,6 +45,5 @@ sleep 5; ...@@ -45,6 +45,5 @@ sleep 5;
# Show status of slave # Show status of slave
# #
--replace_result $SLAVE_MYPORT SLAVE_PORT --replace_result $SLAVE_MYPORT SLAVE_PORT
--replace_column 1 # 8 # 9 # 16 # 23 # 33 # --replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 #
--vertical_results --query_vertical SHOW SLAVE STATUS
SHOW SLAVE STATUS;
--loose-debug=+d,LOAD_DATA_INFILE_has_fatal_error
source include/have_binlog_format_mixed_or_statement.inc;
source include/master-slave.inc;
# We do this little stunt to make sure that the slave has started
# before we stop it again.
connection master;
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1,10);
sync_slave_with_master;
source include/show_slave_status.inc;
# Now we feed it a load data infile, which should make it stop with a
# fatal error.
connection master;
LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE t1;
connection slave;
wait_for_slave_to_stop;
source include/show_slave_status.inc;
...@@ -14,9 +14,7 @@ source include/master-slave.inc; ...@@ -14,9 +14,7 @@ source include/master-slave.inc;
--replace_column 3 <Binlog_Ignore_DB> --replace_column 3 <Binlog_Ignore_DB>
show master status; show master status;
sync_slave_with_master; sync_slave_with_master;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 23 # 33 #
show slave status;
stop slave; stop slave;
change master to master_log_pos=75; change master to master_log_pos=75;
start slave; start slave;
...@@ -24,21 +22,15 @@ sleep 5; ...@@ -24,21 +22,15 @@ sleep 5;
stop slave; stop slave;
change master to master_log_pos=75; change master to master_log_pos=75;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 23 # 33 #
show slave status;
start slave; start slave;
sleep 5; sleep 5;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 23 # 33 #
show slave status;
stop slave; stop slave;
change master to master_log_pos=178; change master to master_log_pos=178;
start slave; start slave;
sleep 2; sleep 2;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 11 # 23 # 33 #
show slave status;
connection master; connection master;
--replace_column 3 <Binlog_Ignore_DB> --replace_column 3 <Binlog_Ignore_DB>
show master status; show master status;
......
...@@ -147,7 +147,7 @@ while ($1) ...@@ -147,7 +147,7 @@ while ($1)
{ {
--sleep 2 --sleep 2
--replace_result $MASTER_MYPORT MASTER_PORT --replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> --replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 34 <Last_IO_Errno> 35 <Last_IO_Error>
SHOW SLAVE STATUS; SHOW SLAVE STATUS;
STOP SLAVE; STOP SLAVE;
--exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT_SLAVE ../storage/ndb/test/ndbapi/bank/bankValidateAllGLs >> $NDB_TOOLS_OUTPUT --exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT_SLAVE ../storage/ndb/test/ndbapi/bank/bankValidateAllGLs >> $NDB_TOOLS_OUTPUT
......
...@@ -197,7 +197,7 @@ UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1; ...@@ -197,7 +197,7 @@ UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1;
--connection slave --connection slave
--echo **** On Slave **** --echo **** On Slave ****
--replace_result $MASTER_MYPORT MASTER_PORT --replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 19 <Last_Errno> 20 <Last_Error> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> --replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 19 <Last_Errno> 20 <Last_Error> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error> 37 <Last_SQL_Errno> 38 <Last_SQL_Error>
--query_vertical SHOW SLAVE STATUS; --query_vertical SHOW SLAVE STATUS;
# now set max retries high enough to succeed, and start slave again # now set max retries high enough to succeed, and start slave again
......
...@@ -43,7 +43,7 @@ SELECT * FROM t1 ORDER BY c3; ...@@ -43,7 +43,7 @@ SELECT * FROM t1 ORDER BY c3;
SELECT * FROM t1 ORDER BY c3; SELECT * FROM t1 ORDER BY c3;
--replace_result $MASTER_MYPORT MASTER_PORT --replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> --replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error>
SHOW SLAVE STATUS; SHOW SLAVE STATUS;
# stop slave and reset position to before the last changes # stop slave and reset position to before the last changes
...@@ -54,7 +54,7 @@ eval CHANGE MASTER TO ...@@ -54,7 +54,7 @@ eval CHANGE MASTER TO
master_log_pos = $the_pos ; master_log_pos = $the_pos ;
--replace_result $MASTER_MYPORT MASTER_PORT --replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> --replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error>
SHOW SLAVE STATUS; SHOW SLAVE STATUS;
# start the slave again # start the slave again
...@@ -107,7 +107,7 @@ COMMIT; ...@@ -107,7 +107,7 @@ COMMIT;
--connection slave --connection slave
SELECT * FROM t1; SELECT * FROM t1;
--replace_result $MASTER_MYPORT MASTER_PORT --replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> --replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 34 <Last_IO_Errno> 35 <Last_IO_Error>
SHOW SLAVE STATUS; SHOW SLAVE STATUS;
connection master; connection master;
......
...@@ -72,8 +72,8 @@ START SLAVE; ...@@ -72,8 +72,8 @@ START SLAVE;
--sync_slave_with_master --sync_slave_with_master
--connection slave --connection slave
--replace_result $MASTER_MYPORT MASTER_PORT --replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> --replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error>
SHOW SLAVE STATUS; query_vertical SHOW SLAVE STATUS;
SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1;
......
...@@ -21,7 +21,7 @@ SHOW BINLOG EVENTS; ...@@ -21,7 +21,7 @@ SHOW BINLOG EVENTS;
sync_slave_with_master; sync_slave_with_master;
--echo **** On Slave **** --echo **** On Slave ****
--replace_result $MASTER_MYPORT MASTER_PORT --replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 8 # 9 # 23 # 33 # --replace_column 1 # 8 # 9 # 23 # 33 # 34 # 35 #
--query_vertical SHOW SLAVE STATUS --query_vertical SHOW SLAVE STATUS
--replace_result $VERSION VERSION --replace_result $VERSION VERSION
--replace_column 2 # 5 # --replace_column 2 # 5 #
......
...@@ -13,9 +13,7 @@ sync_with_master; ...@@ -13,9 +13,7 @@ sync_with_master;
#discover slaves #discover slaves
connection master; connection master;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
SHOW SLAVE STATUS;
--replace_result $SLAVE_MYPORT SLAVE_PORT --replace_result $SLAVE_MYPORT SLAVE_PORT
SHOW SLAVE HOSTS; SHOW SLAVE HOSTS;
rpl_probe; rpl_probe;
......
...@@ -32,8 +32,8 @@ connection slave; ...@@ -32,8 +32,8 @@ connection slave;
sync_with_master; sync_with_master;
# show slave status, just to see of it prints replicate-do-table # show slave status, just to see of it prints replicate-do-table
--replace_result $MASTER_MYPORT MASTER_PORT --replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # --replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
show slave status; query_vertical SHOW SLAVE STATUS;
# #
# BUG#12542 # BUG#12542
......
...@@ -63,9 +63,7 @@ insert into temp_table values ("testing temporary tables"); ...@@ -63,9 +63,7 @@ insert into temp_table values ("testing temporary tables");
create table t1 (s text); create table t1 (s text);
insert into t1 values('Could not break slave'),('Tried hard'); insert into t1 values('Could not break slave'),('Tried hard');
sync_slave_with_master; sync_slave_with_master;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
show slave status;
select * from t1; select * from t1;
connection master; connection master;
flush logs; flush logs;
...@@ -125,9 +123,7 @@ purge master logs before (@time_for_purge); ...@@ -125,9 +123,7 @@ purge master logs before (@time_for_purge);
show binary logs; show binary logs;
insert into t2 values (65); insert into t2 values (65);
sync_slave_with_master; sync_slave_with_master;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
show slave status;
select * from t2; select * from t2;
# #
...@@ -157,9 +153,7 @@ connection slave; ...@@ -157,9 +153,7 @@ connection slave;
sync_with_master; sync_with_master;
select * from t4; select * from t4;
--replace_result $MASTER_MYPORT MASTER_PORT source include/show_slave_status.inc;
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
show slave status;
# because of concurrent insert, the table may not be up to date # because of concurrent insert, the table may not be up to date
# if we do not lock # if we do not lock
lock tables t3 read; lock tables t3 read;
......
...@@ -25,10 +25,8 @@ connection slave; ...@@ -25,10 +25,8 @@ connection slave;
# slave should have stopped because can't find table t1 # slave should have stopped because can't find table t1
wait_for_slave_to_stop; wait_for_slave_to_stop;
# see if we have a good error message: # see if we have a good error message:
--replace_result $MASTER_MYPORT MASTER_MYPORT --replace_column 7 #
--replace_column 1 # 7 # 8 # 9 # 23 # 33 # source include/show_slave_status.inc;
--vertical_results
show slave status;
# cleanup # cleanup
connection master; connection master;
......
...@@ -31,9 +31,7 @@ sleep 2; ...@@ -31,9 +31,7 @@ sleep 2;
wait_for_slave_to_stop; wait_for_slave_to_stop;
# here table should be still not deleted # here table should be still not deleted
select * from t1; select * from t1;
--replace_result $MASTER_MYPORT MASTER_MYPORT source include/show_slave_status.inc;
--replace_column 1 # 9 # 11 # 23 # 33 #
--query_vertical SHOW SLAVE STATUS;
# this should fail right after start # this should fail right after start
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
...@@ -41,18 +39,14 @@ start slave until master_log_file='master-no-such-bin.000001', master_log_pos=29 ...@@ -41,18 +39,14 @@ start slave until master_log_file='master-no-such-bin.000001', master_log_pos=29
select * from t1; select * from t1;
sleep 2; sleep 2;
wait_for_slave_to_stop; wait_for_slave_to_stop;
--replace_result $MASTER_MYPORT MASTER_MYPORT source include/show_slave_status.inc;
--replace_column 1 # 9 # 11 # 23 # 33 #
--query_vertical SHOW SLAVE STATUS;
# try replicate all up to and not including the second insert to t2; # try replicate all up to and not including the second insert to t2;
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728; start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
sleep 2; sleep 2;
wait_for_slave_to_stop; wait_for_slave_to_stop;
select * from t2; select * from t2;
--replace_result $MASTER_MYPORT MASTER_MYPORT source include/show_slave_status.inc;
--replace_column 1 # 9 # 11 # 23 # 33 #
--query_vertical SHOW SLAVE STATUS;
# clean up # clean up
start slave; start slave;
...@@ -67,9 +61,8 @@ start slave until master_log_file='master-bin.000001', master_log_pos=740; ...@@ -67,9 +61,8 @@ start slave until master_log_file='master-bin.000001', master_log_pos=740;
sleep 2; sleep 2;
wait_for_slave_to_stop; wait_for_slave_to_stop;
# here the sql slave thread should be stopped # here the sql slave thread should be stopped
--replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004 --replace_result bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004
--replace_column 1 # 9 # 23 # 33 # source include/show_slave_status.inc;
--query_vertical SHOW SLAVE STATUS;
#testing various error conditions #testing various error conditions
--error 1277 --error 1277
......
...@@ -13,8 +13,8 @@ stop slave; ...@@ -13,8 +13,8 @@ stop slave;
--replace_result $SLAVE_MYPORT SLAVE_PORT --replace_result $SLAVE_MYPORT SLAVE_PORT
eval change master to master_port=$SLAVE_MYPORT; eval change master to master_port=$SLAVE_MYPORT;
--replace_result $SLAVE_MYPORT SLAVE_PORT --replace_result $SLAVE_MYPORT SLAVE_PORT
--replace_column 16 # 18 # --replace_column 16 # 18 # 35 # 36 #
show slave status; query_vertical show slave status;
start slave; start slave;
insert into t1 values (1); insert into t1 values (1);
# can't MASTER_POS_WAIT(), it does not work in this weird setup # can't MASTER_POS_WAIT(), it does not work in this weird setup
......
...@@ -10,8 +10,8 @@ stop slave; ...@@ -10,8 +10,8 @@ stop slave;
--replace_result $SLAVE_MYPORT SLAVE_PORT --replace_result $SLAVE_MYPORT SLAVE_PORT
eval change master to master_port=$SLAVE_MYPORT; eval change master to master_port=$SLAVE_MYPORT;
--replace_result $SLAVE_MYPORT SLAVE_PORT --replace_result $SLAVE_MYPORT SLAVE_PORT
--replace_column 18 # --replace_column 18 # 35 # 36 #
show slave status; query_vertical show slave status;
start slave; start slave;
insert into t1 values (1); insert into t1 values (1);
save_master_pos; save_master_pos;
......
...@@ -42,7 +42,7 @@ start slave; ...@@ -42,7 +42,7 @@ start slave;
--replace_result $MASTER_MYPORT MASTER_MYPORT --replace_result $MASTER_MYPORT MASTER_MYPORT
# Column 1 is replaced, since the output can be either # Column 1 is replaced, since the output can be either
# "Connecting to master" or "Waiting for master update" # "Connecting to master" or "Waiting for master update"
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # --replace_column 1 # 7 # 8 # 9 # 22 # 23 # 35 # 36 #
--vertical_results --vertical_results
show slave status; show slave status;
......
...@@ -31,7 +31,7 @@ select * from t1; ...@@ -31,7 +31,7 @@ select * from t1;
# The slave is synced and waiting/reading from master # The slave is synced and waiting/reading from master
# SHOW SLAVE STATUS will show "Waiting for master to send event" # SHOW SLAVE STATUS will show "Waiting for master to send event"
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # --replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
query_vertical show slave status; query_vertical show slave status;
# Stop the slave, as reported in bug#21871 it would hang # Stop the slave, as reported in bug#21871 it would hang
...@@ -59,7 +59,7 @@ connection master; ...@@ -59,7 +59,7 @@ connection master;
insert into t1 values (NULL); insert into t1 values (NULL);
sync_slave_with_master; sync_slave_with_master;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # --replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
query_vertical show slave status; query_vertical show slave status;
connection master; connection master;
......
...@@ -45,7 +45,7 @@ select * from t1; ...@@ -45,7 +45,7 @@ select * from t1;
#checking show slave status #checking show slave status
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
--replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # --replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 35 # 36 #
query_vertical show slave status; query_vertical show slave status;
#checking if replication works without ssl also performing clean up #checking if replication works without ssl also performing clean up
...@@ -59,7 +59,7 @@ save_master_pos; ...@@ -59,7 +59,7 @@ save_master_pos;
connection slave; connection slave;
sync_with_master; sync_with_master;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
--replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # --replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 35 # 36 #
query_vertical show slave status; query_vertical show slave status;
# End of 4.1 tests # End of 4.1 tests
...@@ -89,7 +89,7 @@ select * from t1; ...@@ -89,7 +89,7 @@ select * from t1;
#checking show slave status #checking show slave status
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
--replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # --replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 35 # 36 #
query_vertical show slave status; query_vertical show slave status;
connection master; connection master;
......
...@@ -30,9 +30,7 @@ sleep 2; ...@@ -30,9 +30,7 @@ sleep 2;
wait_for_slave_to_stop; wait_for_slave_to_stop;
# here table should be still not deleted # here table should be still not deleted
select * from t1; select * from t1;
--replace_result $MASTER_MYPORT MASTER_MYPORT source include/show_slave_status.inc;
--replace_column 1 # 9 # 11 # 23 # 33 #
--query_vertical SHOW SLAVE STATUS
# this should fail right after start # this should fail right after start
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
...@@ -40,18 +38,14 @@ start slave until master_log_file='master-no-such-bin.000001', master_log_pos=29 ...@@ -40,18 +38,14 @@ start slave until master_log_file='master-no-such-bin.000001', master_log_pos=29
select * from t1; select * from t1;
sleep 2; sleep 2;
wait_for_slave_to_stop; wait_for_slave_to_stop;
--replace_result $MASTER_MYPORT MASTER_MYPORT source include/show_slave_status.inc;
--replace_column 1 # 9 # 11 # 23 # 33 #
--query_vertical SHOW SLAVE STATUS
# try replicate all up to and not including the second insert to t2; # try replicate all up to and not including the second insert to t2;
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746; start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746;
sleep 2; sleep 2;
wait_for_slave_to_stop; wait_for_slave_to_stop;
select * from t2; select * from t2;
--replace_result $MASTER_MYPORT MASTER_MYPORT source include/show_slave_status.inc;
--replace_column 1 # 9 # 11 # 23 # 33 #
--query_vertical SHOW SLAVE STATUS
# clean up # clean up
start slave; start slave;
...@@ -66,9 +60,8 @@ start slave until master_log_file='master-bin.000001', master_log_pos=776; ...@@ -66,9 +60,8 @@ start slave until master_log_file='master-bin.000001', master_log_pos=776;
sleep 2; sleep 2;
wait_for_slave_to_stop; wait_for_slave_to_stop;
# here the sql slave thread should be stopped # here the sql slave thread should be stopped
--replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004 --replace_result bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004
--replace_column 1 # 9 # 23 # 33 # source include/show_slave_status.inc;
--query_vertical SHOW SLAVE STATUS
#testing various error conditions #testing various error conditions
--error 1277 --error 1277
......
...@@ -53,6 +53,7 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \ ...@@ -53,6 +53,7 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
ha_ndbcluster_binlog.h ha_ndbcluster_tables.h \ ha_ndbcluster_binlog.h ha_ndbcluster_tables.h \
ha_partition.h rpl_constants.h \ ha_partition.h rpl_constants.h \
opt_range.h protocol.h rpl_tblmap.h rpl_utility.h \ opt_range.h protocol.h rpl_tblmap.h rpl_utility.h \
rpl_reporting.h \
log.h sql_show.h rpl_rli.h rpl_mi.h \ log.h sql_show.h rpl_rli.h rpl_mi.h \
sql_select.h structs.h table.h sql_udf.h hash_filo.h \ sql_select.h structs.h table.h sql_udf.h hash_filo.h \
lex.h lex_symbol.h sql_acl.h sql_crypt.h \ lex.h lex_symbol.h sql_acl.h sql_crypt.h \
...@@ -100,6 +101,7 @@ mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \ ...@@ -100,6 +101,7 @@ mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \
sql_udf.cc sql_analyse.cc sql_analyse.h sql_cache.cc \ sql_udf.cc sql_analyse.cc sql_analyse.h sql_cache.cc \
slave.cc sql_repl.cc rpl_filter.cc rpl_tblmap.cc \ slave.cc sql_repl.cc rpl_filter.cc rpl_tblmap.cc \
rpl_utility.cc rpl_injector.cc rpl_rli.cc rpl_mi.cc \ rpl_utility.cc rpl_injector.cc rpl_rli.cc rpl_mi.cc \
rpl_reporting.cc \
sql_union.cc sql_derived.cc \ sql_union.cc sql_derived.cc \
client.c sql_client.cc mini_client_errors.c pack.c\ client.c sql_client.cc mini_client_errors.c pack.c\
stacktrace.c repl_failsafe.h repl_failsafe.cc \ stacktrace.c repl_failsafe.h repl_failsafe.cc \
......
This diff is collapsed.
...@@ -28,7 +28,8 @@ int init_strvar_from_file(char *var, int max_size, IO_CACHE *f, ...@@ -28,7 +28,8 @@ int init_strvar_from_file(char *var, int max_size, IO_CACHE *f,
const char *default_val); const char *default_val);
MASTER_INFO::MASTER_INFO() MASTER_INFO::MASTER_INFO()
:ssl(0), fd(-1), io_thd(0), inited(0), :Slave_reporting_capability("I/O"),
ssl(0), fd(-1), io_thd(0), inited(0),
abort_slave(0),slave_running(0), abort_slave(0),slave_running(0),
ssl_verify_server_cert(0), slave_run_id(0) ssl_verify_server_cert(0), slave_run_id(0)
{ {
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#ifdef HAVE_REPLICATION #ifdef HAVE_REPLICATION
#include "rpl_rli.h" #include "rpl_rli.h"
#include "rpl_reporting.h"
/***************************************************************************** /*****************************************************************************
...@@ -54,7 +55,7 @@ ...@@ -54,7 +55,7 @@
*****************************************************************************/ *****************************************************************************/
class MASTER_INFO class MASTER_INFO : public Slave_reporting_capability
{ {
public: public:
MASTER_INFO(); MASTER_INFO();
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "mysql_priv.h" #include "mysql_priv.h"
#include "rpl_rli.h"
#include "rpl_record.h" #include "rpl_record.h"
#include "slave.h" // Need to pull in slave_print_msg #include "slave.h" // Need to pull in slave_print_msg
...@@ -263,11 +264,11 @@ unpack_row(RELAY_LOG_INFO const *rli, ...@@ -263,11 +264,11 @@ unpack_row(RELAY_LOG_INFO const *rli,
if (event_type == WRITE_ROWS_EVENT && if (event_type == WRITE_ROWS_EVENT &&
((*field_ptr)->flags & mask) == mask) ((*field_ptr)->flags & mask) == mask)
{ {
slave_print_msg(ERROR_LEVEL, rli, ER_NO_DEFAULT_FOR_FIELD, rli->report(ERROR_LEVEL, ER_NO_DEFAULT_FOR_FIELD,
"Field `%s` of table `%s`.`%s` " "Field `%s` of table `%s`.`%s` "
"has no default value and cannot be NULL", "has no default value and cannot be NULL",
(*field_ptr)->field_name, table->s->db.str, (*field_ptr)->field_name, table->s->db.str,
table->s->table_name.str); table->s->table_name.str);
error = ER_NO_DEFAULT_FOR_FIELD; error = ER_NO_DEFAULT_FOR_FIELD;
} }
else else
......
#include "mysql_priv.h" #include "mysql_priv.h"
#include "rpl_rli.h"
#include "rpl_record_old.h" #include "rpl_record_old.h"
size_t size_t
...@@ -157,11 +158,11 @@ unpack_row_old(RELAY_LOG_INFO *rli, ...@@ -157,11 +158,11 @@ unpack_row_old(RELAY_LOG_INFO *rli,
if (event_type == WRITE_ROWS_EVENT && if (event_type == WRITE_ROWS_EVENT &&
((*field_ptr)->flags & mask) == mask) ((*field_ptr)->flags & mask) == mask)
{ {
slave_print_msg(ERROR_LEVEL, rli, ER_NO_DEFAULT_FOR_FIELD, rli->report(ERROR_LEVEL, ER_NO_DEFAULT_FOR_FIELD,
"Field `%s` of table `%s`.`%s` " "Field `%s` of table `%s`.`%s` "
"has no default value and cannot be NULL", "has no default value and cannot be NULL",
(*field_ptr)->field_name, table->s->db.str, (*field_ptr)->field_name, table->s->db.str,
table->s->table_name.str); table->s->table_name.str);
error = ER_NO_DEFAULT_FOR_FIELD; error = ER_NO_DEFAULT_FOR_FIELD;
} }
else else
......
#include "mysql_priv.h"
#include "rpl_reporting.h"
void
Slave_reporting_capability::report(loglevel level, int err_code,
const char *msg, ...) const
{
void (*report_function)(const char *, ...);
char buff[MAX_SLAVE_ERRMSG];
char *pbuff= buff;
uint pbuffsize= sizeof(buff);
va_list args;
va_start(args, msg);
switch (level)
{
case ERROR_LEVEL:
/*
It's an error, it must be reported in Last_error and Last_errno in SHOW
SLAVE STATUS.
*/
pbuff= m_last_error.message;
pbuffsize= sizeof(m_last_error.message);
m_last_error.number = err_code;
report_function= sql_print_error;
break;
case WARNING_LEVEL:
report_function= sql_print_warning;
break;
case INFORMATION_LEVEL:
report_function= sql_print_information;
break;
default:
DBUG_ASSERT(0); // should not come here
return; // don't crash production builds, just do nothing
}
my_vsnprintf(pbuff, pbuffsize, msg, args);
va_end(args);
/* If the msg string ends with '.', do not add a ',' it would be ugly */
report_function("Slave %s: %s%s Error_code: %d",
m_thread_name, pbuff,
(pbuff[0] && *(strend(pbuff)-1) == '.') ? "" : ",",
err_code);
}
#ifndef RPL_REPORTING_H
#define RPL_REPORTING_H
/**
Maximum size of an error message from a slave thread.
*/
#define MAX_SLAVE_ERRMSG 1024
/**
Mix-in to handle the message logging and reporting for relay log
info and master log info structures.
By inheriting from this class, the class is imbued with
capabilities to do slave reporting.
*/
class Slave_reporting_capability
{
public:
/**
Constructor.
@param thread_name Printable name of the slave thread that is reporting.
*/
Slave_reporting_capability(char const *thread_name)
: m_thread_name(thread_name)
{
}
/**
Writes a message and, if it's an error message, to Last_Error
(which will be displayed by SHOW SLAVE STATUS).
@param level The severity level
@param err_code The error code
@param msg The message (usually related to the error
code, but can contain more information), in
printf() format.
*/
void report(loglevel level, int err_code, const char *msg, ...) const
ATTRIBUTE_FORMAT(printf, 4, 5);
/**
Clear errors. They will not show up under <code>SHOW SLAVE
STATUS</code>.
*/
void clear_error() {
m_last_error.clear();
}
/**
Error information structure.
*/
class Error {
friend class Slave_reporting_capability;
public:
Error()
{
clear();
}
void clear()
{
number= 0;
message[0]= '\0';
}
/** Error code */
uint32 number;
/** Error message */
char message[MAX_SLAVE_ERRMSG];
};
Error const& last_error() const { return m_last_error; }
private:
/**
Last error produced by the I/O or SQL thread respectively.
*/
mutable Error m_last_error;
char const *const m_thread_name;
};
#endif // RPL_REPORTING_H
...@@ -30,11 +30,12 @@ int init_strvar_from_file(char *var, int max_size, IO_CACHE *f, ...@@ -30,11 +30,12 @@ int init_strvar_from_file(char *var, int max_size, IO_CACHE *f,
st_relay_log_info::st_relay_log_info() st_relay_log_info::st_relay_log_info()
:no_storage(FALSE), replicate_same_server_id(::replicate_same_server_id), :Slave_reporting_capability("SQL"),
no_storage(FALSE), replicate_same_server_id(::replicate_same_server_id),
info_fd(-1), cur_log_fd(-1), save_temporary_tables(0), info_fd(-1), cur_log_fd(-1), save_temporary_tables(0),
cur_log_old_open_count(0), group_master_log_pos(0), log_space_total(0), cur_log_old_open_count(0), group_master_log_pos(0), log_space_total(0),
ignore_log_space_limit(0), last_master_timestamp(0), slave_skip_counter(0), ignore_log_space_limit(0), last_master_timestamp(0), slave_skip_counter(0),
abort_pos_wait(0), slave_run_id(0), sql_thd(0), last_slave_errno(0), abort_pos_wait(0), slave_run_id(0), sql_thd(0),
inited(0), abort_slave(0), slave_running(0), until_condition(UNTIL_NONE), inited(0), abort_slave(0), slave_running(0), until_condition(UNTIL_NONE),
until_log_pos(0), retried_trans(0), until_log_pos(0), retried_trans(0),
tables_to_lock(0), tables_to_lock_count(0), tables_to_lock(0), tables_to_lock_count(0),
...@@ -44,7 +45,7 @@ st_relay_log_info::st_relay_log_info() ...@@ -44,7 +45,7 @@ st_relay_log_info::st_relay_log_info()
group_relay_log_name[0]= event_relay_log_name[0]= group_relay_log_name[0]= event_relay_log_name[0]=
group_master_log_name[0]= 0; group_master_log_name[0]= 0;
last_slave_error[0]= until_log_name[0]= ign_master_log_name_end[0]= 0; until_log_name[0]= ign_master_log_name_end[0]= 0;
bzero((char*) &info_file, sizeof(info_file)); bzero((char*) &info_file, sizeof(info_file));
bzero((char*) &cache_buf, sizeof(cache_buf)); bzero((char*) &cache_buf, sizeof(cache_buf));
cached_charset_invalidate(); cached_charset_invalidate();
...@@ -337,16 +338,6 @@ static int count_relay_log_space(RELAY_LOG_INFO* rli) ...@@ -337,16 +338,6 @@ static int count_relay_log_space(RELAY_LOG_INFO* rli)
} }
void st_relay_log_info::clear_slave_error()
{
DBUG_ENTER("clear_slave_error");
/* Clear the errors displayed by SHOW SLAVE STATUS */
last_slave_error[0]= 0;
last_slave_errno= 0;
DBUG_VOID_RETURN;
}
/* /*
Reset UNTIL condition for RELAY_LOG_INFO Reset UNTIL condition for RELAY_LOG_INFO
......
...@@ -16,9 +16,8 @@ ...@@ -16,9 +16,8 @@
#ifndef RPL_RLI_H #ifndef RPL_RLI_H
#define RPL_RLI_H #define RPL_RLI_H
#define MAX_SLAVE_ERRMSG 1024
#include "rpl_tblmap.h" #include "rpl_tblmap.h"
#include "rpl_reporting.h"
struct RPL_TABLE_LIST; struct RPL_TABLE_LIST;
...@@ -49,7 +48,7 @@ struct RPL_TABLE_LIST; ...@@ -49,7 +48,7 @@ struct RPL_TABLE_LIST;
*****************************************************************************/ *****************************************************************************/
typedef struct st_relay_log_info typedef struct st_relay_log_info : public Slave_reporting_capability
{ {
/** /**
Flags for the state of the replication. Flags for the state of the replication.
...@@ -186,7 +185,6 @@ typedef struct st_relay_log_info ...@@ -186,7 +185,6 @@ typedef struct st_relay_log_info
time_t last_master_timestamp; time_t last_master_timestamp;
void clear_slave_error();
void clear_until_condition(); void clear_until_condition();
/* /*
...@@ -200,11 +198,9 @@ typedef struct st_relay_log_info ...@@ -200,11 +198,9 @@ typedef struct st_relay_log_info
pthread_mutex_t log_space_lock; pthread_mutex_t log_space_lock;
pthread_cond_t log_space_cond; pthread_cond_t log_space_cond;
THD * sql_thd; THD * sql_thd;
int last_slave_errno;
#ifndef DBUG_OFF #ifndef DBUG_OFF
int events_till_abort; int events_till_abort;
#endif #endif
char last_slave_error[MAX_SLAVE_ERRMSG];
/* if not set, the value of other members of the structure are undefined */ /* if not set, the value of other members of the structure are undefined */
bool inited; bool inited;
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#include "rpl_utility.h" #include "rpl_utility.h"
#include "rpl_rli.h"
uint32 uint32
field_length_from_packed(enum_field_types const field_type, field_length_from_packed(enum_field_types const field_type,
...@@ -128,11 +129,13 @@ table_def::compatible_with(RELAY_LOG_INFO const *rli_arg, TABLE *table) ...@@ -128,11 +129,13 @@ table_def::compatible_with(RELAY_LOG_INFO const *rli_arg, TABLE *table)
{ {
DBUG_ASSERT(tsh->db.str && tsh->table_name.str); DBUG_ASSERT(tsh->db.str && tsh->table_name.str);
error= 1; error= 1;
slave_print_msg(ERROR_LEVEL, rli, ER_BINLOG_ROW_WRONG_TABLE_DEF, char buf[256];
"Table width mismatch - " my_snprintf(buf, sizeof(buf), "Table width mismatch - "
"received %u columns, %s.%s has %u columns", "received %u columns, %s.%s has %u columns",
(uint) size(), tsh->db.str, tsh->table_name.str, (uint) size(), tsh->db.str, tsh->table_name.str,
tsh->fields); tsh->fields);
rli->report(ERROR_LEVEL, ER_BINLOG_ROW_WRONG_TABLE_DEF,
ER(ER_BINLOG_ROW_WRONG_TABLE_DEF), buf);
} }
for (uint col= 0 ; col < cols_to_check ; ++col) for (uint col= 0 ; col < cols_to_check ; ++col)
...@@ -142,11 +145,13 @@ table_def::compatible_with(RELAY_LOG_INFO const *rli_arg, TABLE *table) ...@@ -142,11 +145,13 @@ table_def::compatible_with(RELAY_LOG_INFO const *rli_arg, TABLE *table)
DBUG_ASSERT(col < size() && col < tsh->fields); DBUG_ASSERT(col < size() && col < tsh->fields);
DBUG_ASSERT(tsh->db.str && tsh->table_name.str); DBUG_ASSERT(tsh->db.str && tsh->table_name.str);
error= 1; error= 1;
slave_print_msg(ERROR_LEVEL, rli, ER_BINLOG_ROW_WRONG_TABLE_DEF, char buf[256];
"Column %d type mismatch - " my_snprintf(buf, sizeof(buf), "Column %d type mismatch - "
"received type %d, %s.%s has type %d", "received type %d, %s.%s has type %d",
col, type(col), tsh->db.str, tsh->table_name.str, col, type(col), tsh->db.str, tsh->table_name.str,
table->field[col]->type()); table->field[col]->type());
rli->report(ERROR_LEVEL, ER_BINLOG_ROW_WRONG_TABLE_DEF,
ER(ER_BINLOG_ROW_WRONG_TABLE_DEF), buf);
} }
} }
......
...@@ -5843,8 +5843,8 @@ ER_BINLOG_ROW_LOGGING_FAILED ...@@ -5843,8 +5843,8 @@ ER_BINLOG_ROW_LOGGING_FAILED
eng "Writing one row to the row-based binary log failed" eng "Writing one row to the row-based binary log failed"
ger "Schreiben einer Zeilen ins zeilenbasierte Binrlog fehlgeschlagen" ger "Schreiben einer Zeilen ins zeilenbasierte Binrlog fehlgeschlagen"
ER_BINLOG_ROW_WRONG_TABLE_DEF ER_BINLOG_ROW_WRONG_TABLE_DEF
eng "Table definition on master and slave does not match" eng "Table definition on master and slave does not match: %s"
ger "Tabellendefinition auf Master und Slave stimmt nicht berein" ger "Tabellendefinition auf Master und Slave stimmt nicht berein: %s"
ER_BINLOG_ROW_RBR_TO_SBR ER_BINLOG_ROW_RBR_TO_SBR
eng "Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events" eng "Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events"
ger "Slave, die mit --log-slave-updates laufen, mssen zeilenbasiertes Loggen verwenden, um zeilenbasierte Binrlog-Ereignisse loggen zu knnen" ger "Slave, die mit --log-slave-updates laufen, mssen zeilenbasiertes Loggen verwenden, um zeilenbasierte Binrlog-Ereignisse loggen zu knnen"
...@@ -6062,3 +6062,13 @@ ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT ...@@ -6062,3 +6062,13 @@ ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT
ER_BINLOG_UNSAFE_STATEMENT ER_BINLOG_UNSAFE_STATEMENT
eng "Statement is not safe to log in statement format." eng "Statement is not safe to log in statement format."
swe "Detta r inte skert att logga i statement-format." swe "Detta r inte skert att logga i statement-format."
ER_SLAVE_FATAL_ERROR
eng "Fatal error: %s"
ER_SLAVE_RELAY_LOG_READ_FAILURE
eng "Relay log read failure: %s"
ER_SLAVE_RELAY_LOG_WRITE_FAILURE
eng "Relay log write failure: %s"
ER_SLAVE_CREATE_EVENT_FAILURE
eng "Failed to create %s"
ER_SLAVE_MASTER_COM_FAILURE
eng "Master command %s failed: %s"
This diff is collapsed.
...@@ -169,9 +169,6 @@ bool rpl_master_has_bug(RELAY_LOG_INFO *rli, uint bug_id); ...@@ -169,9 +169,6 @@ bool rpl_master_has_bug(RELAY_LOG_INFO *rli, uint bug_id);
const char *print_slave_db_safe(const char *db); const char *print_slave_db_safe(const char *db);
int check_expected_error(THD* thd, RELAY_LOG_INFO const *rli, int error_code); int check_expected_error(THD* thd, RELAY_LOG_INFO const *rli, int error_code);
void skip_load_data_infile(NET* net); void skip_load_data_infile(NET* net);
void slave_print_msg(enum loglevel level, RELAY_LOG_INFO const *rli,
int err_code, const char* msg, ...)
ATTRIBUTE_FORMAT(printf, 4, 5);
void end_slave(); /* clean up */ void end_slave(); /* clean up */
void clear_until_condition(RELAY_LOG_INFO* rli); void clear_until_condition(RELAY_LOG_INFO* rli);
......
...@@ -991,7 +991,7 @@ int reset_slave(THD *thd, MASTER_INFO* mi) ...@@ -991,7 +991,7 @@ int reset_slave(THD *thd, MASTER_INFO* mi)
Reset errors (the idea is that we forget about the Reset errors (the idea is that we forget about the
old master). old master).
*/ */
mi->rli.clear_slave_error(); mi->rli.clear_error();
mi->rli.clear_until_condition(); mi->rli.clear_until_condition();
// close master_info_file, relay_log_info_file, set mi->inited=rli->inited=0 // close master_info_file, relay_log_info_file, set mi->inited=rli->inited=0
...@@ -1263,7 +1263,7 @@ bool change_master(THD* thd, MASTER_INFO* mi) ...@@ -1263,7 +1263,7 @@ bool change_master(THD* thd, MASTER_INFO* mi)
pthread_mutex_lock(&mi->rli.data_lock); pthread_mutex_lock(&mi->rli.data_lock);
mi->rli.abort_pos_wait++; /* for MASTER_POS_WAIT() to abort */ mi->rli.abort_pos_wait++; /* for MASTER_POS_WAIT() to abort */
/* Clear the errors, for a clean start */ /* Clear the errors, for a clean start */
mi->rli.clear_slave_error(); mi->rli.clear_error();
mi->rli.clear_until_condition(); mi->rli.clear_until_condition();
/* /*
If we don't write new coordinates to disk now, then old will remain in If we don't write new coordinates to disk now, then old will remain in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment