Add extra checks of Last_errno in SHOW SLAVE STATUS for extra
diagnostics
This commit is contained in:
parent
4cefad6ed0
commit
d4eea5b164
@ -5,12 +5,15 @@ 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;
|
||||||
RESET MASTER;
|
RESET MASTER;
|
||||||
|
Last errno after reset master on slave: 0
|
||||||
CHANGE MASTER TO master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root";
|
CHANGE MASTER TO master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root";
|
||||||
START SLAVE;
|
START SLAVE;
|
||||||
|
Last errno after start slave: 0
|
||||||
CREATE TABLE t1 (a int key, b int) ENGINE=ndb;
|
CREATE TABLE t1 (a int key, b int) ENGINE=ndb;
|
||||||
SHOW TABLES;
|
SHOW TABLES;
|
||||||
Tables_in_test
|
Tables_in_test
|
||||||
t1
|
t1
|
||||||
|
Last errno after table on both: 0
|
||||||
INSERT INTO t1 VALUES (1,2);
|
INSERT INTO t1 VALUES (1,2);
|
||||||
INSERT INTO t1 VALUES (2,3);
|
INSERT INTO t1 VALUES (2,3);
|
||||||
SELECT * FROM t1 ORDER BY a;
|
SELECT * FROM t1 ORDER BY a;
|
||||||
|
@ -5,11 +5,22 @@
|
|||||||
|
|
||||||
--connection slave
|
--connection slave
|
||||||
RESET MASTER;
|
RESET MASTER;
|
||||||
|
|
||||||
|
# Check Last_errno
|
||||||
|
let $the_last_errno= query_get_value(SHOW SLAVE STATUS, Last_Errno, 1);
|
||||||
|
echo Last errno after reset master on slave: $the_last_errno;
|
||||||
|
|
||||||
--connection master
|
--connection master
|
||||||
|
|
||||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||||
--eval CHANGE MASTER TO master_host="127.0.0.1",master_port=$SLAVE_MYPORT,master_user="root"
|
--eval CHANGE MASTER TO master_host="127.0.0.1",master_port=$SLAVE_MYPORT,master_user="root"
|
||||||
START SLAVE;
|
START SLAVE;
|
||||||
|
|
||||||
|
|
||||||
|
# Check Last_errno
|
||||||
|
let $the_last_errno= query_get_value(SHOW SLAVE STATUS, Last_Errno, 1);
|
||||||
|
echo Last errno after start slave: $the_last_errno;
|
||||||
|
|
||||||
# create the table on the "slave"
|
# create the table on the "slave"
|
||||||
--connection slave
|
--connection slave
|
||||||
CREATE TABLE t1 (a int key, b int) ENGINE=ndb;
|
CREATE TABLE t1 (a int key, b int) ENGINE=ndb;
|
||||||
@ -20,6 +31,10 @@ CREATE TABLE t1 (a int key, b int) ENGINE=ndb;
|
|||||||
# now we should have a table on the master as well
|
# now we should have a table on the master as well
|
||||||
SHOW TABLES;
|
SHOW TABLES;
|
||||||
|
|
||||||
|
# Check Last_errno
|
||||||
|
let $the_last_errno= query_get_value(SHOW SLAVE STATUS, Last_Errno, 1);
|
||||||
|
echo Last errno after table on both: $the_last_errno;
|
||||||
|
|
||||||
# insert some values on the slave and master
|
# insert some values on the slave and master
|
||||||
--connection master
|
--connection master
|
||||||
INSERT INTO t1 VALUES (1,2);
|
INSERT INTO t1 VALUES (1,2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user