mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Bug #49741 test files contain explicit references to bin/relay-log positions
Some of the test cases reference to binlog position and these position numbers are written into result explicitly. It is difficult to maintain if log event format changes. There are a couple of cases explicit position number appears, we handle them in different ways A. 'CHANGE MASTER ...' with MASTER_LOG_POS or/and RELAY_LOG_POS options Use --replace_result to mask them. B. 'SHOW BINLOG EVENT ...' Replaced by show_binlog_events.inc or wait_for_binlog_event.inc. show_binlog_events.inc file's function is enhanced by given $binlog_file and $binlog_limit. C. 'SHOW SLAVE STATUS', 'show_slave_status.inc' and 'show_slave_status2.inc' For the test cases just care a few items in the result of 'SHOW SLAVE STATUS', only the items related to each test case are showed. 'show_slave_status.inc' is rebuild, only the given items in $status_items will be showed. 'check_slave_is_running.inc' and 'check_slave_no_error.inc' and 'check_slave_param.inc' are auxiliary files helping to show running status and error information easily.
This commit is contained in:
@@ -140,45 +140,7 @@ set GLOBAL slave_transaction_retries=1;
|
||||
**** On Master ****
|
||||
UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1;
|
||||
**** On Slave ****
|
||||
SHOW SLAVE STATUS;;
|
||||
Slave_IO_State <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 <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 No
|
||||
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 <Last_Errno>
|
||||
Last_Error <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 <Last_SQL_Errno>
|
||||
Last_SQL_Error <Last_SQL_Error>
|
||||
Last_SQL_Error = Could not execute Write_rows event on table test.t1; Got temporary error 266 'Time-out in NDB, probably caused by deadlock' from NDB, Error_code: 1297; Lock wait timeout exceeded; try restarting transaction, Error_code: 1205; handler error HA_ERR_LOCK_WAIT_TIMEOUT; the event's master log master-bin.000001, end_log_pos 6834
|
||||
set GLOBAL slave_transaction_retries=10;
|
||||
include/start_slave.inc
|
||||
select * from t1 order by nid;
|
||||
|
||||
@@ -17,87 +17,11 @@ SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
1 2
|
||||
2 3
|
||||
show slave status;;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
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
|
||||
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
|
||||
Checking that both slave threads are running.
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
1 2
|
||||
2 3
|
||||
show slave status;;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port #
|
||||
Connect_Retry 60
|
||||
Master_Log_File slave-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File slave-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 #
|
||||
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
|
||||
Checking that both slave threads are running.
|
||||
STOP SLAVE;
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -14,45 +14,7 @@ INSERT INTO t1 VALUES (2,3);
|
||||
STOP SLAVE;
|
||||
CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=SLAVE_PORT,MASTER_USER="root";
|
||||
START SLAVE;
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port SLAVE_PORT
|
||||
Connect_Retry 60
|
||||
Master_Log_File slave-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File slave-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 #
|
||||
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
|
||||
Checking that both slave threads are running.
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
1 2
|
||||
@@ -63,43 +25,5 @@ SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
1 2
|
||||
2 3
|
||||
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 #
|
||||
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 #
|
||||
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
|
||||
Checking that both slave threads are running.
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -54,45 +54,7 @@ a b c
|
||||
3 4 QA TESTING
|
||||
*** Start Slave ***
|
||||
START SLAVE;
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
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 No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1535
|
||||
Last_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
|
||||
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 1535
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
@@ -121,47 +83,10 @@ INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TEST
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1522 ***
|
||||
********************************************
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
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 No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1535
|
||||
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
|
||||
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 1535
|
||||
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;
|
||||
START SLAVE;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
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;
|
||||
include/start_slave.inc
|
||||
*** Drop t3 ***
|
||||
DROP TABLE t3;
|
||||
*** Create t4 on slave ***
|
||||
@@ -183,47 +108,10 @@ INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'),
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1522 ***
|
||||
********************************************
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
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 No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1535
|
||||
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
|
||||
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 1535
|
||||
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;
|
||||
START SLAVE;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
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;
|
||||
include/start_slave.inc
|
||||
*** Drop t4 ***
|
||||
DROP TABLE t4;
|
||||
*** Create t5 on slave ***
|
||||
@@ -245,47 +133,10 @@ INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098),
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1522 ***
|
||||
********************************************
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
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 No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1535
|
||||
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
|
||||
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 1535
|
||||
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;
|
||||
START SLAVE;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
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;
|
||||
include/start_slave.inc
|
||||
*** Drop t5 ***
|
||||
DROP TABLE t5;
|
||||
*** Create t6 on slave ***
|
||||
@@ -306,45 +157,7 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1),
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1522 ***
|
||||
********************************************
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
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 No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1535
|
||||
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
|
||||
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 1535
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
|
||||
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;
|
||||
*** Drop t6 ***
|
||||
DROP TABLE t6;
|
||||
@@ -418,47 +231,10 @@ INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1522 ***
|
||||
********************************************
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
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 No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1535
|
||||
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
|
||||
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 1535
|
||||
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;
|
||||
START SLAVE;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
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;
|
||||
include/start_slave.inc
|
||||
*** Drop t10 ***
|
||||
DROP TABLE t10;
|
||||
*** Create t11 on slave ***
|
||||
@@ -479,47 +255,10 @@ INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1522 ***
|
||||
********************************************
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
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 No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1535
|
||||
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
|
||||
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 1535
|
||||
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;
|
||||
START SLAVE;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
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;
|
||||
include/start_slave.inc
|
||||
*** Drop t11 ***
|
||||
DROP TABLE t11;
|
||||
*** Create t12 on slave ***
|
||||
@@ -729,47 +468,10 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5;
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1060 ***
|
||||
********************************************
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
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 No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1060
|
||||
Last_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
|
||||
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 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=1;
|
||||
START SLAVE;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
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= 1;
|
||||
include/start_slave.inc
|
||||
*** Try to insert in master ****
|
||||
INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2);
|
||||
SELECT * FROM t15 ORDER BY c1;
|
||||
@@ -869,46 +571,9 @@ INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1522 ***
|
||||
********************************************
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
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 No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1535
|
||||
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
|
||||
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 1535
|
||||
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;
|
||||
START SLAVE;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
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;
|
||||
include/start_slave.inc
|
||||
** DROP table t17 ***
|
||||
DROP TABLE t17;
|
||||
|
||||
@@ -32,16 +32,11 @@ SELECT * FROM t1 ORDER BY c3;
|
||||
c1 c2 c3
|
||||
row3 C 3
|
||||
row4 D 4
|
||||
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 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 <Last_IO_Errno> <Last_IO_Error> 0
|
||||
Checking that both slave threads are running.
|
||||
STOP SLAVE;
|
||||
CHANGE MASTER TO
|
||||
master_log_file = 'master-bin.000001',
|
||||
master_log_pos = <the_pos> ;
|
||||
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 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 <Last_IO_Errno> <Last_IO_Error> 0
|
||||
START SLAVE;
|
||||
SELECT * FROM t1 ORDER BY c3;
|
||||
c1 c2 c3
|
||||
@@ -67,7 +62,5 @@ COMMIT;
|
||||
SELECT * FROM t1;
|
||||
c1 c2 c3
|
||||
row2 new on slave 2
|
||||
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 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> <Last_IO_Errno> <Last_IO_Error> 0
|
||||
Checking that both slave threads are running.
|
||||
DROP TABLE IF EXISTS t1;
|
||||
|
||||
@@ -7,7 +7,7 @@ start slave;
|
||||
include/stop_slave.inc
|
||||
reset master;
|
||||
reset slave;
|
||||
start slave;
|
||||
include/start_slave.inc
|
||||
create table t1(n int not null auto_increment primary key)ENGINE=NDB;
|
||||
insert into t1 values (NULL);
|
||||
drop table t1;
|
||||
@@ -16,34 +16,33 @@ load data infile 'LOAD_FILE' into table t1 ignore 1 lines;
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
69
|
||||
show binlog events;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
|
||||
master-bin.000001 # Query 1 # BEGIN
|
||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # COMMIT
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB
|
||||
master-bin.000001 # Query 1 # BEGIN
|
||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # COMMIT
|
||||
show binlog events from 106 limit 1;
|
||||
master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 # Write_rows # # table_id: #
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # use `test`; drop table t1
|
||||
master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=NDB
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 # Write_rows # # table_id: #
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
show binlog events from <binlog_start> limit 1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
|
||||
show binlog events from 106 limit 2;
|
||||
master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
|
||||
show binlog events from <binlog_start> limit 2;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
|
||||
master-bin.000001 # Query 1 # BEGIN
|
||||
show binlog events from 106 limit 2,1;
|
||||
master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
show binlog events from <binlog_start> limit 2,1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
flush logs;
|
||||
create table t3 (a int)ENGINE=NDB;
|
||||
select * from t1 order by 1 asc;
|
||||
@@ -211,17 +210,16 @@ master-bin.000001 # Write_rows # # table_id: #
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Rotate # # master-bin.000002;pos=4
|
||||
show binlog events in 'master-bin.000002';
|
||||
show binlog events in 'master-bin.000002' from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=NDB
|
||||
master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=NDB
|
||||
master-bin.000002 # Query 1 # BEGIN
|
||||
master-bin.000002 # Table_map 1 # table_id: # (test.t2)
|
||||
master-bin.000002 # Table_map 1 # table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000002 # Write_rows 1 # table_id: #
|
||||
master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000002 # Query 1 # COMMIT
|
||||
master-bin.000002 # Query # # use `test`; create table t3 (a int)ENGINE=NDB
|
||||
master-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=NDB
|
||||
master-bin.000002 # Query # # BEGIN
|
||||
master-bin.000002 # Table_map # # table_id: # (test.t2)
|
||||
master-bin.000002 # Table_map # # table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000002 # Write_rows # # table_id: #
|
||||
master-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000002 # Query # # COMMIT
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
master-bin.000001 #
|
||||
@@ -230,75 +228,35 @@ show binary logs;
|
||||
Log_name File_size
|
||||
slave-bin.000001 #
|
||||
slave-bin.000002 #
|
||||
show binlog events in 'slave-bin.000001' from 4;
|
||||
show binlog events from <binlog_start>;
|
||||
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 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
|
||||
slave-bin.000001 # Query 2 # BEGIN
|
||||
slave-bin.000001 # Table_map 2 # table_id: # (test.t1)
|
||||
slave-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status)
|
||||
slave-bin.000001 # Write_rows 2 # table_id: #
|
||||
slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Query 2 # COMMIT
|
||||
slave-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB
|
||||
slave-bin.000001 # Query 2 # BEGIN
|
||||
slave-bin.000001 # Table_map 2 # table_id: # (test.t1)
|
||||
slave-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status)
|
||||
slave-bin.000001 # Write_rows 2 # table_id: #
|
||||
slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Query 2 # COMMIT
|
||||
slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=NDB
|
||||
slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
|
||||
show binlog events in 'slave-bin.000002' from 4;
|
||||
slave-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
|
||||
slave-bin.000001 # Query # # BEGIN
|
||||
slave-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
slave-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
|
||||
slave-bin.000001 # Write_rows # # table_id: #
|
||||
slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Query # # COMMIT
|
||||
slave-bin.000001 # Query # # use `test`; drop table t1
|
||||
slave-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=NDB
|
||||
slave-bin.000001 # Query # # BEGIN
|
||||
slave-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
slave-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
|
||||
slave-bin.000001 # Write_rows # # table_id: #
|
||||
slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Query # # COMMIT
|
||||
slave-bin.000001 # Query # # use `test`; create table t3 (a int)ENGINE=NDB
|
||||
slave-bin.000001 # Rotate # # slave-bin.000002;pos=4
|
||||
show binlog events in 'slave-bin.000002' from <binlog_start>;
|
||||
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 # Query 1 # use `test`; create table t2 (n int)ENGINE=NDB
|
||||
slave-bin.000002 # Query 2 # BEGIN
|
||||
slave-bin.000002 # Table_map 2 # table_id: # (test.t2)
|
||||
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 1 # table_id: # flags: STMT_END_F
|
||||
slave-bin.000002 # Query 2 # COMMIT
|
||||
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.000002
|
||||
Read_Master_Log_Pos 623
|
||||
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 623
|
||||
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
|
||||
slave-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=NDB
|
||||
slave-bin.000002 # Query # # BEGIN
|
||||
slave-bin.000002 # Table_map # # table_id: # (test.t2)
|
||||
slave-bin.000002 # Table_map # # table_id: # (mysql.ndb_apply_status)
|
||||
slave-bin.000002 # Write_rows # # table_id: #
|
||||
slave-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
slave-bin.000002 # Query # # COMMIT
|
||||
Checking that both slave threads are running.
|
||||
show binlog events in 'slave-bin.000005' from 4;
|
||||
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -29,8 +29,8 @@ FROM mysql.ndb_binlog_index WHERE epoch = <the_epoch> ;
|
||||
106 master-bin.000001
|
||||
CHANGE MASTER TO
|
||||
master_port=<MASTER_PORT1>,
|
||||
master_log_file = 'master-bin.000001',
|
||||
master_log_pos = 106 ;
|
||||
master_log_file = 'MASTER_LOG_FILE',
|
||||
master_log_pos = MASTER_LOG_POS ;
|
||||
start slave;
|
||||
INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4);
|
||||
DELETE FROM t1 WHERE c3 = 1;
|
||||
|
||||
@@ -27,21 +27,21 @@ from mysql.ndb_apply_status;
|
||||
# since insert is done with transactional engine, expect a BEGIN
|
||||
# at <start_pos>
|
||||
|
||||
show binlog events from <start_pos> limit 1;
|
||||
show binlog events from <binlog_start> limit 1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 <start_pos> Query 1 # BEGIN
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
|
||||
# Now the insert, one step after
|
||||
|
||||
show binlog events from <start_pos> limit 1,1;
|
||||
show binlog events from <binlog_start> limit 1,1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; insert into t1 values (1,2)
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values (1,2)
|
||||
|
||||
# and the COMMIT should be at <end_pos>
|
||||
|
||||
show binlog events from <start_pos> limit 2,1;
|
||||
show binlog events from <binlog_start> limit 2,1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Xid 1 <end_pos> COMMIT /* XID */
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
|
||||
begin;
|
||||
insert into t1 values (2,3);
|
||||
@@ -52,18 +52,18 @@ select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos
|
||||
from mysql.ndb_apply_status;
|
||||
@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos
|
||||
<log_name> <start_pos> <end_pos>
|
||||
show binlog events from <start_pos> limit 1;
|
||||
show binlog events from <binlog_start> limit 1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 <start_pos> Query 1 # BEGIN
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
|
||||
show binlog events from <start_pos> limit 1,2;
|
||||
show binlog events from <binlog_start> limit 1,2;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values (2,3)
|
||||
master-bin.000001 # Query # # use `test`; insert into t2 values (3,4)
|
||||
|
||||
show binlog events from <start_pos> limit 3,1;
|
||||
show binlog events from <binlog_start> limit 3,1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Xid 1 <end_pos> COMMIT /* XID */
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
|
||||
DROP TABLE test.t1, test.t2;
|
||||
SHOW TABLES;
|
||||
|
||||
@@ -68,45 +68,7 @@ CHANGE MASTER TO
|
||||
master_log_file = 'master-bin.000001',
|
||||
master_log_pos = <the_pos> ;
|
||||
START SLAVE;
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State <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 <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
|
||||
Checking that both slave threads are running.
|
||||
SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
|
||||
hex(c1) hex(c2) c3
|
||||
1 1 row1
|
||||
|
||||
@@ -436,8 +436,7 @@ DELETE FROM t1;
|
||||
SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
|
||||
COUNT(*) 0
|
||||
set @@global.slave_exec_mode= default;
|
||||
Last_SQL_Error
|
||||
|
||||
Checking that both slave threads are running.
|
||||
SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
|
||||
COUNT(*) 0
|
||||
**** Test for BUG#37076 ****
|
||||
@@ -487,8 +486,7 @@ Comparing tables master:test.t2 and slave:test.t2
|
||||
[expecting slave to stop]
|
||||
INSERT INTO t3 VALUES (1, "", 1);
|
||||
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
|
||||
Last_SQL_Error
|
||||
Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.
|
||||
RESET MASTER;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
@@ -500,8 +498,7 @@ Comparing tables master:test.t4 and slave:test.t4
|
||||
[expecting slave to stop]
|
||||
INSERT INTO t5 VALUES (1, "", 1);
|
||||
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
|
||||
Last_SQL_Error
|
||||
Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.
|
||||
RESET MASTER;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
@@ -509,8 +506,7 @@ START SLAVE;
|
||||
[expecting slave to stop]
|
||||
INSERT INTO t6 VALUES (1, "", 1);
|
||||
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
|
||||
Last_SQL_Error
|
||||
Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.
|
||||
RESET MASTER;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
|
||||
@@ -27,18 +27,17 @@ SELECT * FROM t1 ORDER BY a,b;
|
||||
a b
|
||||
**** On Master ****
|
||||
DROP TABLE t1;
|
||||
SHOW BINLOG EVENTS;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4
|
||||
master-bin.000001 106 Query 1 223 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
|
||||
master-bin.000001 223 Query 1 287 BEGIN
|
||||
master-bin.000001 287 Table_map 1 330 table_id: # (test.t1)
|
||||
master-bin.000001 330 Table_map 1 392 table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 392 Write_rows 1 451 table_id: #
|
||||
master-bin.000001 451 Write_rows 1 498 table_id: # flags: STMT_END_F
|
||||
master-bin.000001 498 Query 1 563 COMMIT
|
||||
master-bin.000001 563 Query 1 643 use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 643 Query 1 719 use `test`; DROP TABLE t1
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 # Write_rows # # table_id: #
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
||||
**** On Master ****
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB;
|
||||
INSERT INTO t1 VALUES (1,1), (2,2);
|
||||
@@ -63,29 +62,28 @@ a b
|
||||
3 3
|
||||
**** On Master ****
|
||||
DROP TABLE t1;
|
||||
SHOW BINLOG EVENTS;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4
|
||||
master-bin.000001 106 Query 1 223 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
|
||||
master-bin.000001 223 Query 1 287 BEGIN
|
||||
master-bin.000001 287 Table_map 1 330 table_id: # (test.t1)
|
||||
master-bin.000001 330 Table_map 1 392 table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 392 Write_rows 1 451 table_id: #
|
||||
master-bin.000001 451 Write_rows 1 498 table_id: # flags: STMT_END_F
|
||||
master-bin.000001 498 Query 1 563 COMMIT
|
||||
master-bin.000001 563 Query 1 643 use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 643 Query 1 719 use `test`; DROP TABLE t1
|
||||
master-bin.000001 719 Query 1 836 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
|
||||
master-bin.000001 836 Query 1 900 BEGIN
|
||||
master-bin.000001 900 Table_map 1 943 table_id: # (test.t1)
|
||||
master-bin.000001 943 Table_map 1 1005 table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 1005 Write_rows 1 1064 table_id: #
|
||||
master-bin.000001 1064 Write_rows 1 1111 table_id: # flags: STMT_END_F
|
||||
master-bin.000001 1111 Query 1 1176 COMMIT
|
||||
master-bin.000001 1176 Query 1 1240 BEGIN
|
||||
master-bin.000001 1240 Table_map 1 1283 table_id: # (test.t1)
|
||||
master-bin.000001 1283 Table_map 1 1345 table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 1345 Write_rows 1 1404 table_id: #
|
||||
master-bin.000001 1404 Delete_rows 1 1443 table_id: # flags: STMT_END_F
|
||||
master-bin.000001 1443 Query 1 1508 COMMIT
|
||||
master-bin.000001 1508 Query 1 1584 use `test`; DROP TABLE t1
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 # Write_rows # # table_id: #
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 # Write_rows # # table_id: #
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 # Write_rows # # table_id: #
|
||||
master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
||||
|
||||
@@ -191,10 +191,11 @@ connection slave;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
|
||||
# Replication should have stopped, since max retries were not enough.
|
||||
# verify with show slave status
|
||||
--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> 35 <Last_IO_Errno> 36 <Last_IO_Error> 37 <Last_SQL_Errno> 38 <Last_SQL_Error>
|
||||
--query_vertical SHOW SLAVE STATUS;
|
||||
# verify with show slave status
|
||||
# 1205 = ER_LOCK_WAIT_TIMEOUT
|
||||
--let $slave_sql_errno= 1205
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error.inc
|
||||
|
||||
# now set max retries high enough to succeed, and start slave again
|
||||
set GLOBAL slave_transaction_retries=10;
|
||||
|
||||
@@ -16,9 +16,7 @@ START SLAVE;
|
||||
--connection slave
|
||||
CREATE TABLE t1 (a int key, b int) ENGINE=ndb;
|
||||
#CREATE TABLE t2 (a int key, b int) ENGINE=ndb;
|
||||
--save_master_pos
|
||||
--connection master
|
||||
--sync_with_master
|
||||
sync_slave_with_master master;
|
||||
# now we should have a table on the master as well
|
||||
SHOW TABLES;
|
||||
|
||||
@@ -30,25 +28,19 @@ INSERT INTO t1 VALUES (2,3);
|
||||
|
||||
# ensure data has propagated both ways
|
||||
--connection slave
|
||||
--save_master_pos
|
||||
--connection master
|
||||
--sync_with_master
|
||||
sync_slave_with_master master;
|
||||
--sync_slave_with_master
|
||||
|
||||
# connect to slave and ensure data it there.
|
||||
--connection slave
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
#SELECT * FROM t2 ORDER BY a;
|
||||
# BUG#34654 Last_IO_Errno is not reset - Mask columns 35 and 36
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
||||
--query_vertical show slave status;
|
||||
source include/check_slave_is_running.inc;
|
||||
# connect to master and ensure data it there.
|
||||
--connection master
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
#SELECT * FROM t2 ORDER BY a;
|
||||
# BUG#34654 Last_IO_Errno is not reset - Mask columns 35 and 36
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
||||
--query_vertical show slave status;
|
||||
source include/check_slave_is_running.inc;
|
||||
|
||||
# stop replication on "master" as not to replicate
|
||||
# shutdown circularly, eg drop table
|
||||
|
||||
@@ -38,9 +38,7 @@ eval CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=$SLAVE_MYPORT,MASTER_U
|
||||
START SLAVE;
|
||||
|
||||
connection slave;
|
||||
save_master_pos;
|
||||
connection master;
|
||||
sync_with_master;
|
||||
sync_slave_with_master master;
|
||||
|
||||
# The statement is disabled since it cannot reliably show the same
|
||||
# info all the time. Use it for debug purposes.
|
||||
@@ -48,9 +46,7 @@ sync_with_master;
|
||||
#SHOW BINLOG EVENTS;
|
||||
|
||||
# Check that there is no error in replication
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
||||
query_vertical SHOW SLAVE STATUS;
|
||||
source include/check_slave_is_running.inc;
|
||||
|
||||
# Check that we have the data on the master
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
@@ -75,9 +71,7 @@ sync_with_master;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
|
||||
# Check that there is no error in replication
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
||||
query_vertical SHOW SLAVE STATUS;
|
||||
source include/check_slave_is_running.inc;
|
||||
|
||||
-- connection master
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -39,12 +39,9 @@ SELECT * FROM t1 ORDER BY c3;
|
||||
|
||||
# check that we have it on the slave
|
||||
--sync_slave_with_master
|
||||
--connection slave
|
||||
SELECT * FROM t1 ORDER BY c3;
|
||||
|
||||
--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> 35 <Last_IO_Errno> 36 <Last_IO_Error>
|
||||
SHOW SLAVE STATUS;
|
||||
source include/check_slave_is_running.inc;
|
||||
|
||||
# stop slave and reset position to before the last changes
|
||||
STOP SLAVE;
|
||||
@@ -53,9 +50,7 @@ eval CHANGE MASTER TO
|
||||
master_log_file = '$the_file',
|
||||
master_log_pos = $the_pos ;
|
||||
|
||||
--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> 35 <Last_IO_Errno> 36 <Last_IO_Error>
|
||||
SHOW SLAVE STATUS;
|
||||
source include/check_slave_no_error.inc;
|
||||
|
||||
# start the slave again
|
||||
# -> same events should have been applied again
|
||||
@@ -67,7 +62,6 @@ START SLAVE;
|
||||
--connection master
|
||||
SELECT * FROM t1 ORDER BY c3;
|
||||
--sync_slave_with_master
|
||||
--connection slave
|
||||
SELECT * FROM t1 ORDER BY c3;
|
||||
|
||||
STOP SLAVE;
|
||||
@@ -106,9 +100,7 @@ COMMIT;
|
||||
--sync_slave_with_master
|
||||
--connection slave
|
||||
SELECT * FROM t1;
|
||||
--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> 34 <Last_IO_Errno> 35 <Last_IO_Error>
|
||||
SHOW SLAVE STATUS;
|
||||
source include/check_slave_is_running.inc;
|
||||
|
||||
connection master;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
|
||||
@@ -39,7 +39,7 @@ let $the_file= `SELECT @the_file` ;
|
||||
|
||||
# now connect the slave to the _other_ "master"
|
||||
connection slave;
|
||||
--replace_result $MASTER_MYPORT1 <MASTER_PORT1>
|
||||
--replace_result $MASTER_MYPORT1 <MASTER_PORT1> $the_pos MASTER_LOG_POS $the_file MASTER_LOG_FILE
|
||||
eval CHANGE MASTER TO
|
||||
master_port=$MASTER_MYPORT1,
|
||||
master_log_file = '$the_file',
|
||||
|
||||
@@ -70,10 +70,7 @@ START SLAVE;
|
||||
#
|
||||
--connection master
|
||||
--sync_slave_with_master
|
||||
--connection slave
|
||||
--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> 35 <Last_IO_Errno> 36 <Last_IO_Error>
|
||||
query_vertical SHOW SLAVE STATUS;
|
||||
--source include/check_slave_is_running.inc
|
||||
|
||||
SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
|
||||
SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1;
|
||||
@@ -85,7 +82,6 @@ SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1;
|
||||
--connection master
|
||||
DROP DATABASE ndbsynctest;
|
||||
--sync_slave_with_master
|
||||
--connection slave
|
||||
STOP SLAVE;
|
||||
|
||||
#
|
||||
|
||||
@@ -39,10 +39,7 @@ SELECT * FROM t1 ORDER BY a,b;
|
||||
--echo **** On Master ****
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
let SERVER_VERSION=`select version()`;
|
||||
--replace_regex /\/\* xid=[0-9]+ \*\//\/* xid= *\// /table_id: [0-9]+/table_id: #/
|
||||
--replace_result $SERVER_VERSION SERVER_VERSION
|
||||
SHOW BINLOG EVENTS;
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
--echo **** On Master ****
|
||||
connection master;
|
||||
@@ -64,8 +61,6 @@ SELECT * FROM t1 ORDER BY a,b;
|
||||
--echo **** On Master ****
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
--replace_result $SERVER_VERSION SERVER_VERSION
|
||||
SHOW BINLOG EVENTS;
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
-- source include/master-slave-end.inc
|
||||
|
||||
Reference in New Issue
Block a user