mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Merged BUG#49978 from 5.1-bugteam to 5.5-bugteam.
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
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 (n int);
|
||||
insert into t1 values(1);
|
||||
stop slave;
|
||||
start slave;
|
||||
insert into t1 values(2);
|
||||
select * from t1;
|
||||
n
|
||||
1
|
||||
2
|
||||
drop table t1;
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
create table t1 (n int not null auto_increment primary key);
|
||||
insert into t1 values(NULL);
|
||||
insert into t1 values(2);
|
||||
@@ -12,3 +8,4 @@ n
|
||||
1
|
||||
2
|
||||
drop table t1;
|
||||
include/rpl_end.inc
|
15
mysql-test/suite/rpl/r/rpl_000011.result
Normal file
15
mysql-test/suite/rpl/r/rpl_000011.result
Normal file
@@ -0,0 +1,15 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
create table t1 (n int);
|
||||
insert into t1 values(1);
|
||||
stop slave;
|
||||
include/wait_for_slave_to_stop.inc
|
||||
start slave;
|
||||
include/wait_for_slave_to_start.inc
|
||||
insert into t1 values(2);
|
||||
select * from t1;
|
||||
n
|
||||
1
|
||||
2
|
||||
drop table t1;
|
||||
include/rpl_end.inc
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
create table t2(n int);
|
||||
create temporary table t1 (n int);
|
||||
insert into t1 values(1),(2),(3);
|
||||
@@ -26,3 +22,4 @@ Slave_open_temp_tables 0
|
||||
drop table if exists t1,t2;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
include/rpl_end.inc
|
@@ -1,11 +1,8 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
grant replication slave on *.* to replicate@localhost identified by 'aaaaaaaaaaaaaaab';
|
||||
grant replication slave on *.* to replicate@127.0.0.1 identified by 'aaaaaaaaaaaaaaab';
|
||||
start slave;
|
||||
drop table if exists t1;
|
||||
include/start_slave.inc
|
||||
create table t1(n int);
|
||||
insert into t1 values(24);
|
||||
select * from t1;
|
||||
@@ -13,4 +10,4 @@ n
|
||||
24
|
||||
drop table t1;
|
||||
delete from mysql.user where user="replicate";
|
||||
call mtr.force_restart();
|
||||
include/rpl_end.inc
|
@@ -1,11 +1,8 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
create table t1 (a int) engine=myisam;
|
||||
flush tables;
|
||||
drop table if exists t1;
|
||||
Warnings:
|
||||
Warning 2 Can't find file: 't1' (errno: 2)
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
DROP TABLE IF EXISTS test.t1;
|
||||
CREATE TABLE test.t1 (a VARCHAR(255), PRIMARY KEY(a));
|
||||
LOAD DATA INFILE '../../std_data/words2.dat' INTO TABLE test.t1;
|
||||
@@ -115,3 +111,4 @@ abasement
|
||||
abased
|
||||
abase
|
||||
DROP TABLE test.t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,10 +1,5 @@
|
||||
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;
|
||||
drop database if exists mysqltest;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
create database mysqltest;
|
||||
create table mysqltest.t1 ( n int);
|
||||
alter table mysqltest.t1 add m int;
|
||||
@@ -19,3 +14,4 @@ select * from mysqltest.t3;
|
||||
n
|
||||
45
|
||||
drop database mysqltest;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,12 +1,9 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
==== Verify that alter database does not stop replication ====
|
||||
create database temp_db;
|
||||
use temp_db;
|
||||
alter database collate latin1_bin;
|
||||
==== Clean up ====
|
||||
drop database temp_db;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
create table t1 (a int not null auto_increment,b int, primary key (a)) engine=myisam auto_increment=3;
|
||||
insert into t1 values (NULL,1),(NULL,2),(NULL,3);
|
||||
select * from t1;
|
||||
@@ -244,12 +240,7 @@ t1 CREATE TABLE `t1` (
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
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;
|
||||
include/rpl_reset.inc
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t2;
|
||||
CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=innodb;
|
||||
@@ -303,12 +294,13 @@ id
|
||||
INSERT INTO t1 VALUES(4);
|
||||
INSERT INTO t2 VALUES(4);
|
||||
FLUSH LOGS;
|
||||
Comparing tables master:test.t1 and slave:test.t1
|
||||
Comparing tables master:test.t2 and slave:test.t2
|
||||
include/diff_tables.inc [master:t1, slave:t1]
|
||||
include/diff_tables.inc [master:t2, slave:t2]
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
Comparing tables master:test.t1 and slave:test.t1
|
||||
Comparing tables master:test.t2 and slave:test.t2
|
||||
include/diff_tables.inc [master:t1, slave:t1]
|
||||
include/diff_tables.inc [master:t2, slave:t2]
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
SET SQL_MODE='';
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
drop database if exists test1;
|
||||
create database test1;
|
||||
use test1;
|
||||
@@ -44,4 +40,4 @@ id fname
|
||||
1 testtest 1
|
||||
2 test
|
||||
drop database test1;
|
||||
drop database test1;
|
||||
include/rpl_end.inc
|
||||
|
45
mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result
Normal file
45
mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result
Normal file
@@ -0,0 +1,45 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
==== Initialize ====
|
||||
SET @old_relay_log_purge= @@global.relay_log_purge;
|
||||
include/setup_fake_relay_log.inc
|
||||
Setting up fake replication from MYSQL_TEST_DIR/std_data/bug33029-slave-relay-bin.000001
|
||||
==== Test ====
|
||||
start slave sql_thread;
|
||||
include/wait_for_slave_param.inc [Exec_Master_Log_Pos]
|
||||
# Result on slave
|
||||
SELECT * FROM t1;
|
||||
id
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
SELECT * FROM t2;
|
||||
id
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
==== Clean up ====
|
||||
stop slave sql_thread;
|
||||
include/cleanup_fake_relay_log.inc
|
||||
DROP TABLE t1, t2;
|
||||
DROP PROCEDURE p1;
|
||||
DROP PROCEDURE p2;
|
||||
DROP FUNCTION f1;
|
||||
SET @@global.relay_log_purge= @old_relay_log_purge;
|
||||
include/rpl_end.inc
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
# Test case1: INVOKES A TRIGGER with after insert action
|
||||
create table t1(a int, b int) engine=innodb;
|
||||
create table t2(i1 int not null auto_increment, a int, primary key(i1)) engine=innodb;
|
||||
@@ -110,9 +106,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
commit;
|
||||
#Test if the results are consistent on master and slave
|
||||
#for 'INVOKES A TRIGGER with after insert action'
|
||||
Comparing tables master:test.t2 and slave:test.t2
|
||||
Comparing tables master:test.t4 and slave:test.t4
|
||||
Comparing tables master:test.t6 and slave:test.t6
|
||||
include/diff_tables.inc [master:t2, slave:t2]
|
||||
include/diff_tables.inc [master:t4, slave:t4]
|
||||
include/diff_tables.inc [master:t6, slave:t6]
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t3;
|
||||
@@ -226,9 +222,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
commit;
|
||||
#Test if the results are consistent on master and slave
|
||||
#for 'INVOKES A TRIGGER with before insert action'
|
||||
Comparing tables master:test.t2 and slave:test.t2
|
||||
Comparing tables master:test.t4 and slave:test.t4
|
||||
Comparing tables master:test.t6 and slave:test.t6
|
||||
include/diff_tables.inc [master:t2, slave:t2]
|
||||
include/diff_tables.inc [master:t4, slave:t4]
|
||||
include/diff_tables.inc [master:t6, slave:t6]
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t3;
|
||||
@@ -342,9 +338,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
commit;
|
||||
#Test if the results are consistent on master and slave
|
||||
#for 'INVOKES A TRIGGER with after update action'
|
||||
Comparing tables master:test.t2 and slave:test.t2
|
||||
Comparing tables master:test.t4 and slave:test.t4
|
||||
Comparing tables master:test.t6 and slave:test.t6
|
||||
include/diff_tables.inc [master:t2, slave:t2]
|
||||
include/diff_tables.inc [master:t4, slave:t4]
|
||||
include/diff_tables.inc [master:t6, slave:t6]
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t3;
|
||||
@@ -458,9 +454,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
commit;
|
||||
#Test if the results are consistent on master and slave
|
||||
#for 'INVOKES A TRIGGER with before update action'
|
||||
Comparing tables master:test.t2 and slave:test.t2
|
||||
Comparing tables master:test.t4 and slave:test.t4
|
||||
Comparing tables master:test.t6 and slave:test.t6
|
||||
include/diff_tables.inc [master:t2, slave:t2]
|
||||
include/diff_tables.inc [master:t4, slave:t4]
|
||||
include/diff_tables.inc [master:t6, slave:t6]
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t3;
|
||||
@@ -574,9 +570,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
commit;
|
||||
#Test if the results are consistent on master and slave
|
||||
#for 'INVOKES A TRIGGER with after delete action'
|
||||
Comparing tables master:test.t2 and slave:test.t2
|
||||
Comparing tables master:test.t4 and slave:test.t4
|
||||
Comparing tables master:test.t6 and slave:test.t6
|
||||
include/diff_tables.inc [master:t2, slave:t2]
|
||||
include/diff_tables.inc [master:t4, slave:t4]
|
||||
include/diff_tables.inc [master:t6, slave:t6]
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t3;
|
||||
@@ -690,9 +686,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
commit;
|
||||
#Test if the results are consistent on master and slave
|
||||
#for 'INVOKES A TRIGGER with before delete action'
|
||||
Comparing tables master:test.t2 and slave:test.t2
|
||||
Comparing tables master:test.t4 and slave:test.t4
|
||||
Comparing tables master:test.t6 and slave:test.t6
|
||||
include/diff_tables.inc [master:t2, slave:t2]
|
||||
include/diff_tables.inc [master:t4, slave:t4]
|
||||
include/diff_tables.inc [master:t6, slave:t6]
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t3;
|
||||
@@ -761,8 +757,8 @@ master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
commit;
|
||||
#Test if the results are consistent on master and slave
|
||||
#for 'CALLS A FUNCTION which INVOKES A TRIGGER with after insert action'
|
||||
Comparing tables master:test.t2 and slave:test.t2
|
||||
Comparing tables master:test.t3 and slave:test.t3
|
||||
include/diff_tables.inc [master:t2, slave:t2]
|
||||
include/diff_tables.inc [master:t3, slave:t3]
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
@@ -828,8 +824,8 @@ master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
commit;
|
||||
#Test if the results are consistent on master and slave
|
||||
#for 'CALLS A FUNCTION which INVOKES A TRIGGER with before insert action'
|
||||
Comparing tables master:test.t2 and slave:test.t2
|
||||
Comparing tables master:test.t3 and slave:test.t3
|
||||
include/diff_tables.inc [master:t2, slave:t2]
|
||||
include/diff_tables.inc [master:t3, slave:t3]
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
@@ -853,7 +849,7 @@ INSERT INTO v16(c1) VALUES (25), (26);
|
||||
commit;
|
||||
#Test if the results are consistent on master and slave
|
||||
#for 'INSERT DATA INTO VIEW WHICH INVOKES TRIGGERS'
|
||||
Comparing tables master:test.t3 and slave:test.t3
|
||||
include/diff_tables.inc [master:t3, slave:t3]
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t3;
|
||||
@@ -877,7 +873,7 @@ INSERT INTO v16(c1) VALUES (25), (26);
|
||||
commit;
|
||||
#Test if the results are consistent on master and slave
|
||||
#for 'INSERT DATA INTO VIEW WHICH INVOKES TRIGGERS'
|
||||
Comparing tables master:test.t3 and slave:test.t3
|
||||
include/diff_tables.inc [master:t3, slave:t3]
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t3;
|
||||
@@ -980,8 +976,8 @@ master-bin.000001 # Query # # use `test`; insert into t2(a,b) values(3,3)
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
#Test if the results are consistent on master and slave
|
||||
#for 'UPDATE MORE THAN ONE TABLES ON TOP-STATEMENT'
|
||||
Comparing tables master:test.t1 and slave:test.t1
|
||||
Comparing tables master:test.t2 and slave:test.t2
|
||||
include/diff_tables.inc [master:t1, slave:t1]
|
||||
include/diff_tables.inc [master:t2, slave:t2]
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
# Test case14: INSERT DATA INTO VIEW WHICH INVOLVED MORE THAN ONE TABLES
|
||||
@@ -1034,8 +1030,9 @@ master-bin.000001 # Query # # use `test`; INSERT INTO v15(c2) VALUES (25), (26)
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
#Test if the results are consistent on master and slave
|
||||
#for 'INSERT DATA INTO VIEW WHICH INVOLVED MORE THAN ONE TABLES'
|
||||
Comparing tables master:test.t1 and slave:test.t1
|
||||
Comparing tables master:test.t2 and slave:test.t2
|
||||
include/diff_tables.inc [master:t1, slave:t1]
|
||||
include/diff_tables.inc [master:t2, slave:t2]
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop view v15;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
SET @@session.binlog_direct_non_transactional_updates= FALSE;
|
||||
@@ -52,6 +48,7 @@ before call db1.p1()
|
||||
after call db1.p1()
|
||||
[on slave]
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_POS;
|
||||
include/wait_for_slave_sql_to_stop.inc
|
||||
#
|
||||
# If we got non-zero here, then we're suffering BUG#43263
|
||||
#
|
||||
@@ -92,6 +89,7 @@ executed db1.p2()
|
||||
after call db1.p2()
|
||||
[on slave]
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_POS;
|
||||
include/wait_for_slave_sql_to_stop.inc
|
||||
#
|
||||
# If we got non-zero here, then we're suffering BUG#43263
|
||||
#
|
||||
@@ -110,6 +108,7 @@ s
|
||||
before call db1.p1()
|
||||
executed db1.p2()
|
||||
START SLAVE;
|
||||
include/wait_for_slave_sql_to_start.inc
|
||||
#
|
||||
# SAVEPOINT and ROLLBACK TO have the same problem in BUG#43263
|
||||
# This was reported by BUG#50407
|
||||
@@ -178,3 +177,4 @@ a
|
||||
#
|
||||
DROP DATABASE db1;
|
||||
DROP DATABASE db2;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,37 +0,0 @@
|
||||
Setting up fake replication from MYSQL_TEST_DIR/std_data/bug33029-slave-relay-bin.000001
|
||||
start slave sql_thread;
|
||||
select MASTER_POS_WAIT('master-bin.000001', 3776);
|
||||
# Result on slave
|
||||
SELECT * FROM t1;
|
||||
id
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
SELECT * FROM t2;
|
||||
id
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
DROP PROCEDURE IF EXISTS p2;
|
||||
DROP FUNCTION IF EXISTS f1;
|
||||
DROP TRIGGER IF EXISTS tr1;
|
||||
stop slave sql_thread;
|
||||
Cleaning up after setup_fake_relay_log.inc
|
@@ -1,8 +1,15 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
call mtr.add_suppression('Found invalid event in binary log');
|
||||
==== Initialize ====
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
include/setup_fake_relay_log.inc
|
||||
Setting up fake replication from MYSQL_TEST_DIR/std_data/bug40482-bin.000001
|
||||
==== Test ====
|
||||
START SLAVE SQL_THREAD;
|
||||
include/wait_for_slave_sql_error.inc [errno=1594]
|
||||
Last_SQL_Error = Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.
|
||||
==== Clean up ====
|
||||
Cleaning up after setup_fake_relay_log.inc
|
||||
include/cleanup_fake_relay_log.inc
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
#######################################################################
|
||||
####################### PART 1: MASTER TESTS ##########################
|
||||
#######################################################################
|
||||
@@ -192,6 +188,7 @@ DELETE FROM t4;
|
||||
DELETE FROM t2;
|
||||
DROP TABLE t5;
|
||||
###################### TEST #11
|
||||
include/rpl_restart_server.inc [server_number=1]
|
||||
SET GLOBAL debug="+d,fault_injection_openning_index";
|
||||
FLUSH LOGS;
|
||||
ERROR HY000: Can't open file: 'master-bin.index' (errno: 1)
|
||||
@@ -204,6 +201,7 @@ INSERT INTO t2 VALUES ('aaaaa');
|
||||
DELETE FROM t4;
|
||||
DELETE FROM t2;
|
||||
DROP TABLE t5;
|
||||
include/rpl_restart_server.inc [server_number=1]
|
||||
###################### TEST #12
|
||||
SET GLOBAL debug="+d,fault_injection_new_file_rotate_event";
|
||||
FLUSH LOGS;
|
||||
@@ -217,6 +215,7 @@ INSERT INTO t2 VALUES ('aaaaa');
|
||||
DELETE FROM t4;
|
||||
DELETE FROM t2;
|
||||
DROP TABLE t5;
|
||||
include/rpl_restart_server.inc [server_number=1]
|
||||
SET GLOBAL debug= @old_debug;
|
||||
DROP TABLE t1, t2, t4;
|
||||
RESET MASTER;
|
||||
@@ -224,12 +223,7 @@ include/start_slave.inc
|
||||
#######################################################################
|
||||
####################### PART 2: SLAVE TESTS ###########################
|
||||
#######################################################################
|
||||
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;
|
||||
include/rpl_reset.inc
|
||||
call mtr.add_suppression("Slave I/O: Relay log write failure: could not queue event from master.*");
|
||||
call mtr.add_suppression("Error writing file .*");
|
||||
call mtr.add_suppression("Could not open .*");
|
||||
@@ -240,35 +234,45 @@ SET @old_debug=@@global.debug;
|
||||
include/stop_slave.inc
|
||||
SET GLOBAL debug="+d,error_unique_log_filename";
|
||||
START SLAVE io_thread;
|
||||
Last_IO_Error = Relay log write failure: could not queue event from master
|
||||
include/wait_for_slave_io_error.inc [errno=1595]
|
||||
Last_IO_Error = 'Relay log write failure: could not queue event from master'
|
||||
SET GLOBAL debug="-d,error_unique_log_filename";
|
||||
SET GLOBAL debug=@old_debug;
|
||||
include/rpl_restart_server.inc [server_number=2]
|
||||
###################### TEST #14
|
||||
SET @old_debug=@@global.debug;
|
||||
include/stop_slave.inc
|
||||
SET GLOBAL debug="+d,fault_injection_new_file_rotate_event";
|
||||
START SLAVE io_thread;
|
||||
Last_IO_Error = Relay log write failure: could not queue event from master
|
||||
include/wait_for_slave_io_error.inc [errno=1595]
|
||||
Last_IO_Error = 'Relay log write failure: could not queue event from master'
|
||||
SET GLOBAL debug="-d,fault_injection_new_file_rotate_event";
|
||||
SET GLOBAL debug=@old_debug;
|
||||
include/rpl_restart_server.inc [server_number=2]
|
||||
###################### TEST #15
|
||||
SET @old_debug=@@global.debug;
|
||||
include/stop_slave.inc
|
||||
SET GLOBAL debug="+d,fault_injection_registering_index";
|
||||
START SLAVE io_thread;
|
||||
Last_IO_Error = Relay log write failure: could not queue event from master
|
||||
include/wait_for_slave_io_error.inc [errno=1595]
|
||||
Last_IO_Error = 'Relay log write failure: could not queue event from master'
|
||||
SET GLOBAL debug="-d,fault_injection_registering_index";
|
||||
SET GLOBAL debug=@old_debug;
|
||||
include/rpl_restart_server.inc [server_number=2]
|
||||
###################### TEST #16
|
||||
SET @old_debug=@@global.debug;
|
||||
include/stop_slave.inc
|
||||
SET GLOBAL debug="+d,fault_injection_openning_index";
|
||||
START SLAVE io_thread;
|
||||
Last_IO_Error = Relay log write failure: could not queue event from master
|
||||
include/wait_for_slave_io_error.inc [errno=1595]
|
||||
Last_IO_Error = 'Relay log write failure: could not queue event from master'
|
||||
SET GLOBAL debug="-d,fault_injection_openning_index";
|
||||
SET GLOBAL debug=@old_debug;
|
||||
include/stop_slave.inc
|
||||
include/rpl_restart_server.inc [server_number=2]
|
||||
include/stop_slave_sql.inc
|
||||
Warnings:
|
||||
Note 1255 Slave already has been stopped
|
||||
SET GLOBAL debug=@old_debug;
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
include/start_slave.inc
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,10 +1,5 @@
|
||||
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;
|
||||
drop database if exists d1;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
create database d1;
|
||||
use d1;
|
||||
create table t (s1 int) engine=innodb;
|
||||
@@ -30,3 +25,4 @@ Grants for x@y
|
||||
GRANT USAGE ON *.* TO 'x'@'y'
|
||||
drop user x@y;
|
||||
drop database d1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,11 +0,0 @@
|
||||
drop table if exists t1;
|
||||
reset master;
|
||||
create table t1 (a int);
|
||||
insert into t1 values (1);
|
||||
flush logs;
|
||||
drop table t1;
|
||||
*** must be 1 ***
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
drop table t1;
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
DROP TABLE IF EXISTS test.t1;
|
||||
CREATE TABLE test.t1 (
|
||||
dummyKey INTEGER NOT NULL,
|
||||
@@ -136,3 +132,4 @@ hex(bit3)
|
||||
24
|
||||
35
|
||||
DROP TABLE IF EXISTS test.t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
DROP TABLE IF EXISTS test.t1;
|
||||
CREATE TABLE test.t1 (
|
||||
dummyKey INTEGER NOT NULL,
|
||||
@@ -167,3 +163,4 @@ a b
|
||||
DROP TABLE IF EXISTS test.t1;
|
||||
DROP TABLE IF EXISTS test.t2;
|
||||
DROP TABLE IF EXISTS test.t3;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
CREATE TABLE t1 (a INT, b INT, c INT);
|
||||
CREATE TABLE t2 (a INT, b INT, c INT);
|
||||
@@ -92,3 +88,4 @@ COUNT(*)
|
||||
0
|
||||
>>> Something was written to binary log <<<
|
||||
DROP TABLE t1,t2;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
==== Initialize ====
|
||||
[on master]
|
||||
CREATE TABLE tinnodb (a INT) ENGINE = INNODB;
|
||||
@@ -20,6 +16,7 @@ SELECT * FROM tinnodb ORDER BY a;
|
||||
a
|
||||
1
|
||||
[on slave]
|
||||
include/sync_slave_io_with_master.inc
|
||||
==== Verify results on slave ====
|
||||
include/stop_slave.inc
|
||||
SELECT "" AS Slave_IO_State;
|
||||
@@ -39,3 +36,4 @@ DROP TABLE tinnodb;
|
||||
set @@debug= @old_debug;
|
||||
[on slave]
|
||||
DROP TABLE tinnodb;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
SET @saved_slave_type_conversions = @@slave_type_conversions;
|
||||
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
|
||||
CREATE DATABASE track;
|
||||
@@ -70,3 +66,4 @@ event_id visit_id timestamp src data visits_events_id
|
||||
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
|
||||
DROP DATABASE track;
|
||||
End of 5.1 tests
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,7 +1,12 @@
|
||||
reset master;
|
||||
reset slave;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
call mtr.add_suppression("Failed during slave I/O thread initialization");
|
||||
include/stop_slave.inc
|
||||
reset slave;
|
||||
SET GLOBAL debug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init";
|
||||
start slave;
|
||||
Last_SQL_Error = Failed during slave thread initialization
|
||||
include/wait_for_slave_sql_error.inc [errno=1593]
|
||||
Last_SQL_Error = 'Failed during slave thread initialization'
|
||||
SET GLOBAL debug="";
|
||||
RESET SLAVE;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,6 +1,3 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
stop slave;
|
||||
SET @@debug="d,simulate_find_log_pos_error";
|
||||
reset slave;
|
||||
@@ -31,4 +27,6 @@ purge binary logs to 'master-bin.000001';
|
||||
ERROR HY000: Target log not found in binlog index
|
||||
SET @@debug="";
|
||||
purge binary logs to 'master-bin.000001';
|
||||
End of the tests
|
||||
==== clean up ====
|
||||
CHANGE MASTER TO MASTER_HOST = '127.0.0.1';
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,15 +1,12 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
create table t1(n int);
|
||||
select * from t1;
|
||||
n
|
||||
stop slave sql_thread;
|
||||
insert into t1 values(1);
|
||||
insert into t1 values(2);
|
||||
include/wait_for_slave_param.inc [Read_Master_Log_Pos]
|
||||
include/stop_slave.inc
|
||||
change master to master_user='root';
|
||||
start slave;
|
||||
@@ -18,12 +15,7 @@ n
|
||||
1
|
||||
2
|
||||
drop table t1;
|
||||
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;
|
||||
include/rpl_reset.inc
|
||||
create table t1 (a int);
|
||||
insert into t1 values (1);
|
||||
flush logs;
|
||||
@@ -32,6 +24,9 @@ include/stop_slave.inc
|
||||
delete from t1 where a=2;
|
||||
CHANGE MASTER TO relay_log_file='slave-relay-bin.000005', relay_log_pos=4;
|
||||
start slave sql_thread;
|
||||
include/wait_for_slave_sql_to_start.inc
|
||||
start slave io_thread;
|
||||
include/wait_for_slave_io_to_start.inc
|
||||
set global relay_log_purge=1;
|
||||
drop table t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,12 +1,6 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
set timestamp=1000000000;
|
||||
drop database if exists mysqltest2;
|
||||
drop database if exists mysqltest3;
|
||||
create database mysqltest2 character set latin2;
|
||||
set @@character_set_server=latin5;
|
||||
create database mysqltest3;
|
||||
@@ -141,3 +135,4 @@ primary key (`pk`)
|
||||
set @p=_latin1 'test';
|
||||
update t1 set pk='test' where pk=@p;
|
||||
drop table t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
drop table if exists t1;
|
||||
drop procedure if exists p1;
|
||||
create table t1 (a varchar(255) character set sjis);
|
||||
@@ -24,3 +20,4 @@ hex(a)
|
||||
965C
|
||||
drop table t1;
|
||||
drop procedure p1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,60 +1,10 @@
|
||||
*** Set up circular ring by schema A->B->C->D->A ***
|
||||
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;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
SET auto_increment_increment = 4;
|
||||
SET auto_increment_offset = 1;
|
||||
RESET MASTER;
|
||||
RESET SLAVE;
|
||||
CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_A_PORT,master_user='root',MASTER_LOG_FILE='MASTER_A_LOG_FILE';
|
||||
SET auto_increment_increment = 4;
|
||||
SET auto_increment_offset = 2;
|
||||
RESET MASTER;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_B_PORT,master_user='root',MASTER_LOG_FILE='MASTER_B_LOG_FILE';
|
||||
SET auto_increment_increment = 4;
|
||||
SET auto_increment_offset = 3;
|
||||
RESET MASTER;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_C_PORT,master_user='root',MASTER_LOG_FILE='MASTER_C_LOG_FILE';
|
||||
SET auto_increment_increment = 4;
|
||||
SET auto_increment_offset = 4;
|
||||
CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_D_PORT,master_user='root',MASTER_LOG_FILE='MASTER_D_LOG_FILE';
|
||||
SHOW VARIABLES LIKE 'auto_increment_%';
|
||||
Variable_name Value
|
||||
auto_increment_increment 4
|
||||
auto_increment_offset 1
|
||||
SHOW VARIABLES LIKE 'auto_increment_%';
|
||||
Variable_name Value
|
||||
auto_increment_increment 4
|
||||
auto_increment_offset 2
|
||||
SHOW VARIABLES LIKE 'auto_increment_%';
|
||||
Variable_name Value
|
||||
auto_increment_increment 4
|
||||
auto_increment_offset 3
|
||||
SHOW VARIABLES LIKE 'auto_increment_%';
|
||||
Variable_name Value
|
||||
auto_increment_increment 4
|
||||
auto_increment_offset 4
|
||||
1
|
||||
START SLAVE;
|
||||
START SLAVE;
|
||||
START SLAVE;
|
||||
START SLAVE;
|
||||
*** Set up circular replication on four servers ***
|
||||
include/rpl_init.inc [topology=1->2->3->4->1]
|
||||
|
||||
*** Preparing data ***
|
||||
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=MyISAM;
|
||||
CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB;
|
||||
include/rpl_sync.inc
|
||||
|
||||
*** Testing schema A->B->C->D->A ***
|
||||
|
||||
@@ -62,6 +12,7 @@ INSERT INTO t1(b,c) VALUES('A',1);
|
||||
INSERT INTO t1(b,c) VALUES('B',1);
|
||||
INSERT INTO t1(b,c) VALUES('C',1);
|
||||
INSERT INTO t1(b,c) VALUES('D',1);
|
||||
include/rpl_sync.inc
|
||||
SELECT 'Master A',a,b FROM t1 WHERE c = 1 ORDER BY a,b;
|
||||
Master A a b
|
||||
Master A 1 A
|
||||
@@ -95,6 +46,7 @@ SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
|
||||
include/start_slave.inc
|
||||
INSERT INTO t1 VALUES(6,'C',2);
|
||||
INSERT INTO t1(b,c) VALUES('B',2);
|
||||
include/wait_for_slave_sql_error.inc [errno=1062]
|
||||
INSERT INTO t1(b,c) VALUES('A',2);
|
||||
INSERT INTO t1(b,c) VALUES('D',2);
|
||||
|
||||
@@ -116,9 +68,9 @@ Master D a b
|
||||
Master D 8 D
|
||||
|
||||
* Reconfigure replication to schema A->B->D->A *
|
||||
STOP SLAVE;
|
||||
STOP SLAVE;
|
||||
CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_B_PORT,master_user='root',master_log_file='LOG_FILE',master_log_pos=LOG_POS;
|
||||
include/stop_slave_io.inc
|
||||
include/stop_slave.inc
|
||||
include/rpl_change_topology.inc [new topology=1->2->4->1,2->3]
|
||||
include/start_slave.inc
|
||||
|
||||
* Check data inserted before failure *
|
||||
@@ -145,6 +97,7 @@ Master D 8 D
|
||||
INSERT INTO t1(b,c) VALUES('A',3);
|
||||
INSERT INTO t1(b,c) VALUES('B',3);
|
||||
INSERT INTO t1(b,c) VALUES('D',3);
|
||||
include/rpl_sync.inc
|
||||
SELECT 'Master A',a,b FROM t1 WHERE c = 3 ORDER BY a,b;
|
||||
Master A a b
|
||||
Master A 9 A
|
||||
@@ -171,8 +124,9 @@ DELETE FROM t1 WHERE a = 6;
|
||||
START SLAVE;
|
||||
RESET MASTER;
|
||||
RESET SLAVE;
|
||||
CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_C_PORT,master_user='root',master_log_file='LOG_FILE',master_log_pos=LOG_POS;
|
||||
include/rpl_change_topology.inc [new topology=1->2->3->4->1]
|
||||
START SLAVE;
|
||||
include/rpl_sync.inc
|
||||
|
||||
* Check data inserted before restoring schema A->B->C->D->A *
|
||||
SELECT 'Master A',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b;
|
||||
@@ -213,6 +167,7 @@ INSERT INTO t1(b,c) VALUES('A',4);
|
||||
INSERT INTO t1(b,c) VALUES('B',4);
|
||||
INSERT INTO t1(b,c) VALUES('C',4);
|
||||
INSERT INTO t1(b,c) VALUES('D',4);
|
||||
include/rpl_sync.inc
|
||||
SELECT 'Master A',a,b FROM t1 WHERE c = 4 ORDER BY a,b;
|
||||
Master A a b
|
||||
Master A 13 A
|
||||
@@ -241,6 +196,7 @@ Master D 16 D
|
||||
* Transactions with commits *
|
||||
BEGIN;
|
||||
BEGIN;
|
||||
include/rpl_sync.inc
|
||||
SELECT 'Master A',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b;
|
||||
Master A b COUNT(*)
|
||||
Master A A 100
|
||||
@@ -269,6 +225,7 @@ Master D D 100
|
||||
* Transactions with rollbacks *
|
||||
BEGIN;
|
||||
BEGIN;
|
||||
include/rpl_sync.inc
|
||||
SELECT 'Master A',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b;
|
||||
Master A b COUNT(*)
|
||||
Master A B 100
|
||||
@@ -288,11 +245,4 @@ Master D D 100
|
||||
|
||||
*** Clean up ***
|
||||
DROP TABLE t1,t2;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,13 +1,10 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
DROP TABLE IF EXISTS t1;
|
||||
**** Testing WL#3228 changes. ****
|
||||
*** Create "wider" table on slave ***
|
||||
STOP SLAVE;
|
||||
include/wait_for_slave_to_stop.inc
|
||||
RESET SLAVE;
|
||||
SET @saved_slave_type_conversions = @@slave_type_conversions;
|
||||
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
|
||||
@@ -57,6 +54,7 @@ t LONGTEXT
|
||||
RESET MASTER;
|
||||
*** Start replication ***
|
||||
START SLAVE;
|
||||
include/wait_for_slave_to_start.inc
|
||||
*** Insert data on master and display it. ***
|
||||
INSERT INTO t1 () VALUES (
|
||||
17.567,
|
||||
@@ -180,3 +178,4 @@ t1 CREATE TABLE `t1` (
|
||||
*** Cleanup ***
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
CREATE TABLE t1 (a INT) ENGINE=innodb;
|
||||
begin;
|
||||
insert into t1 values(1);
|
||||
@@ -11,3 +7,4 @@ flush tables with read lock;
|
||||
commit;
|
||||
unlock tables;
|
||||
drop table t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
########################################################################
|
||||
# Environment
|
||||
@@ -118,11 +114,12 @@ master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 1' WHERE f = 'red'
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (1 * 10),"brown")
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
source include/diff_master_slave.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
include/rpl_diff.inc
|
||||
########################################################################
|
||||
# Cleanup
|
||||
########################################################################
|
||||
DROP TRIGGER tr;
|
||||
DROP TABLE t;
|
||||
DROP TABLE n;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
CREATE TABLE t1(c1 INT);
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
@@ -19,7 +15,7 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; /* 99999 --- */INSERT /*!INTO*/ /*!10000 t1 */ VALUES(10) /* 99999 ,(11)*/
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
Comparing tables master:test.t1 and slave:test.t1
|
||||
include/diff_tables.inc [master:t1,slave:t1]
|
||||
|
||||
# Case 2:
|
||||
# -----------------------------------------------------------------
|
||||
@@ -30,7 +26,7 @@ EXECUTE stmt;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(c1 INT);
|
||||
EXECUTE stmt;
|
||||
Comparing tables master:test.t1 and slave:test.t1
|
||||
include/diff_tables.inc [master:t1,slave:t1]
|
||||
|
||||
SET @value=62;
|
||||
PREPARE stmt FROM 'INSERT INTO /*!99999 blabla */ t1 VALUES(?) /*!99999 ,(63)*/';
|
||||
@@ -56,7 +52,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT)
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla */ t1 VALUES(62) /* 99999 ,(63)*/
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
Comparing tables master:test.t1 and slave:test.t1
|
||||
include/diff_tables.inc [master:t1,slave:t1]
|
||||
|
||||
# Case 3:
|
||||
# -----------------------------------------------------------------
|
||||
@@ -65,3 +61,4 @@ Comparing tables master:test.t1 and slave:test.t1
|
||||
SELECT c1 FROM /*!99999 t1 WHEREN;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/*!99999 t1 WHEREN' at line 1
|
||||
DROP TABLE t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
DROP DATABASE IF EXISTS mysqltest_prometheus;
|
||||
DROP DATABASE IF EXISTS mysqltest_sisyfos;
|
||||
DROP DATABASE IF EXISTS mysqltest_bob;
|
||||
@@ -60,3 +56,4 @@ t2
|
||||
DROP DATABASE IF EXISTS mysqltest_prometheus;
|
||||
DROP DATABASE IF EXISTS mysqltest_sisyfos;
|
||||
DROP DATABASE IF EXISTS mysqltest_bob;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
DROP DATABASE IF EXISTS mysqltest;
|
||||
CREATE DATABASE IF NOT EXISTS mysqltest;
|
||||
USE mysqltest;
|
||||
@@ -69,12 +65,7 @@ DROP TABLE t3;
|
||||
# After the worklog, it will insert nothing and the statement will not be
|
||||
# binlogged if the table already exists.
|
||||
# After the worklog, some bugs will disappear automotically.
|
||||
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;
|
||||
include/rpl_reset.inc
|
||||
|
||||
# Case 1: BUG#47132
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.*");
|
||||
@@ -126,3 +117,4 @@ show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1, t2;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
DROP DATABASE IF EXISTS mysqltest;
|
||||
CREATE TEMPORARY TABLE IF NOT EXISTS tmp(c1 int);
|
||||
CREATE TEMPORARY TABLE IF NOT EXISTS tmp(c1 int);
|
||||
@@ -19,3 +15,4 @@ master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS t
|
||||
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp
|
||||
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp
|
||||
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,12 +1,19 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
==== Initialize ====
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
include/setup_fake_relay_log.inc
|
||||
Setting up fake replication from MYSQL_TEST_DIR/suite/binlog/std_data/binlog_old_version_4_1.000001
|
||||
==== Test ====
|
||||
start slave sql_thread;
|
||||
include/wait_for_slave_param.inc [Exec_Master_Log_Pos]
|
||||
==== a prove that the fake has been processed successfully ====
|
||||
SELECT COUNT(*) - 17920 as zero FROM t3;
|
||||
zero
|
||||
0
|
||||
==== Clean up ====
|
||||
stop slave sql_thread;
|
||||
Cleaning up after setup_fake_relay_log.inc
|
||||
include/stop_slave_sql.inc
|
||||
include/cleanup_fake_relay_log.inc
|
||||
drop table t1, t3;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,26 +1,6 @@
|
||||
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;
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.*");
|
||||
|
||||
# On slave2
|
||||
# Connect slave2 to slave
|
||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=SLAVE_MYPORT;,
|
||||
MASTER_LOG_FILE='slave-bin.000001', MASTER_USER='root';
|
||||
START SLAVE;
|
||||
|
||||
# [On master]
|
||||
DROP VIEW IF EXISTS v_user;
|
||||
DROP VIEW IF EXISTS v_tables_priv;
|
||||
DROP VIEW IF EXISTS v_procs_priv;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
DROP PROCEDURE IF EXISTS my_grant;
|
||||
DROP PROCEDURE IF EXISTS my_revoke;
|
||||
DROP FUNCTION IF EXISTS my_user;
|
||||
DROP EVENT IF EXISTS e1;
|
||||
include/rpl_init.inc [topology=1->2->3]
|
||||
include/rpl_connect.inc [creating master]
|
||||
include/rpl_connect.inc [creating slave]
|
||||
CREATE TABLE t1(c1 char(100));
|
||||
CREATE VIEW test.v_user AS SELECT * FROM mysql.user WHERE User LIKE 'bug48321%';
|
||||
CREATE VIEW test.v_tables_priv AS SELECT * FROM mysql.tables_priv WHERE User LIKE 'bug48321%';
|
||||
@@ -42,76 +22,76 @@ ERROR HY000: String '01234567890123456789012345678901234567890123456789012345678
|
||||
# [On conn1]
|
||||
# Verify 'REVOKE ALL' statement
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM CURRENT_USER();
|
||||
Comparing tables master:test.v_user and slave:test.v_user
|
||||
Comparing tables master:test.v_user and slave2:test.v_user
|
||||
include/rpl_sync.inc
|
||||
include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user]
|
||||
|
||||
# Verify 'GRANT ... ON TABLE ...' statement
|
||||
GRANT CREATE, INSERT, SELECT ON TABLE test.t1 TO CURRENT_USER();
|
||||
Comparing tables master:test.v_tables_priv and slave:test.v_tables_priv
|
||||
Comparing tables master:test.v_tables_priv and slave2:test.v_tables_priv
|
||||
include/rpl_sync.inc
|
||||
include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv]
|
||||
|
||||
# Verify 'GRANT ... ON PROCEDURE...' statement
|
||||
GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO CURRENT_USER();
|
||||
Comparing tables master:test.v_procs_priv and slave:test.v_procs_priv
|
||||
Comparing tables master:test.v_procs_priv and slave2:test.v_procs_priv
|
||||
include/rpl_sync.inc
|
||||
include/diff_tables.inc [server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv]
|
||||
|
||||
# Verify 'GRANT ... ON *.* ...' statement
|
||||
GRANT ALL PRIVILEGES ON *.* TO CURRENT_USER() WITH GRANT OPTION;
|
||||
Comparing tables master:test.v_procs_priv and slave:test.v_procs_priv
|
||||
Comparing tables master:test.v_procs_priv and slave2:test.v_procs_priv
|
||||
include/rpl_sync.inc
|
||||
include/diff_tables.inc [server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv]
|
||||
|
||||
# Verify 'REVOKE ... ON TABLE ...' statement
|
||||
REVOKE CREATE, INSERT, SELECT ON TABLE t1 FROM CURRENT_USER();
|
||||
Comparing tables master:test.v_tables_priv and slave:test.v_tables_priv
|
||||
Comparing tables master:test.v_tables_priv and slave2:test.v_tables_priv
|
||||
include/rpl_sync.inc
|
||||
include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv]
|
||||
|
||||
# Verify 'REVOKE ... ON PROCEDURE...' statement
|
||||
REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM CURRENT_USER();
|
||||
Comparing tables master:test.v_procs_priv and slave:test.v_procs_priv
|
||||
Comparing tables master:test.v_procs_priv and slave2:test.v_procs_priv
|
||||
include/rpl_sync.inc
|
||||
include/diff_tables.inc [server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv]
|
||||
|
||||
# Verify 'REVOKE ... ON *.* ...' statement
|
||||
REVOKE ALL PRIVILEGES ON *.* FROM CURRENT_USER();
|
||||
Comparing tables master:test.v_user and slave:test.v_user
|
||||
Comparing tables master:test.v_user and slave2:test.v_user
|
||||
include/rpl_sync.inc
|
||||
include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user]
|
||||
|
||||
# Verify 'GRANT ...' statement in the procedure
|
||||
CREATE PROCEDURE my_grant()
|
||||
GRANT CREATE, INSERT, SELECT ON TABLE test.t1 TO CURRENT_USER();
|
||||
call my_grant;
|
||||
Comparing tables master:test.v_tables_priv and slave:test.v_tables_priv
|
||||
Comparing tables master:test.v_tables_priv and slave2:test.v_tables_priv
|
||||
include/rpl_sync.inc
|
||||
include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv]
|
||||
|
||||
# Verify 'REVOKE ... ON TABLE ...' statement in the procedure
|
||||
CREATE PROCEDURE my_revoke()
|
||||
REVOKE CREATE, INSERT, SELECT ON TABLE t1 FROM CURRENT_USER();
|
||||
call my_revoke;
|
||||
Comparing tables master:test.v_tables_priv and slave:test.v_tables_priv
|
||||
Comparing tables master:test.v_tables_priv and slave2:test.v_tables_priv
|
||||
include/rpl_sync.inc
|
||||
include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv]
|
||||
|
||||
# Verify 'RENAME USER ...' statement
|
||||
RENAME USER CURRENT_USER TO 'bug48321_2'@'localhost';
|
||||
Comparing tables master:test.v_user and slave:test.v_user
|
||||
Comparing tables master:test.v_user and slave2:test.v_user
|
||||
include/rpl_sync.inc
|
||||
include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user]
|
||||
|
||||
# Verify 'DROP USER ...' statement
|
||||
GRANT CREATE USER ON *.* TO 'bug48321_2'@'localhost';
|
||||
DROP USER CURRENT_USER();
|
||||
Comparing tables master:test.v_user and slave:test.v_user
|
||||
Comparing tables master:test.v_user and slave2:test.v_user
|
||||
include/rpl_sync.inc
|
||||
include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user]
|
||||
|
||||
# Verify 'ALTER EVENT...' statement
|
||||
CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT * FROM t1;
|
||||
# Explicitly assign CURRENT_USER() to definer
|
||||
ALTER DEFINER=CURRENT_USER() EVENT e1 ENABLE;
|
||||
Comparing tables master:test.v_event and slave:test.v_event
|
||||
Comparing tables master:test.v_event and slave2:test.v_event
|
||||
include/rpl_sync.inc
|
||||
include/diff_tables.inc [server_1:v_event, server_2:v_event, server_3:v_event]
|
||||
|
||||
# Session user will be set as definer, if the statement does not assign
|
||||
# a definer
|
||||
ALTER EVENT e1 ENABLE;
|
||||
Comparing tables master:test.v_event and slave:test.v_event
|
||||
Comparing tables master:test.v_event and slave2:test.v_event
|
||||
include/rpl_sync.inc
|
||||
include/diff_tables.inc [server_1:v_event, server_2:v_event, server_3:v_event]
|
||||
|
||||
# Verify that this patch does not affect the calling of CURRENT_USER()
|
||||
# in the other statements
|
||||
@@ -128,7 +108,7 @@ SELECT * FROM t1;
|
||||
c1
|
||||
@
|
||||
1234
|
||||
# [On slave2]
|
||||
# [On server_3]
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
@
|
||||
@@ -146,7 +126,7 @@ SELECT * FROM t1;
|
||||
c1
|
||||
@
|
||||
@
|
||||
# [On slave2]
|
||||
# [On server_3]
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
@
|
||||
@@ -160,7 +140,7 @@ c1
|
||||
# [On slave]
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
# [On slave2]
|
||||
# [On server_3]
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
# [On master]
|
||||
@@ -187,7 +167,7 @@ c1
|
||||
SELECT * FROM t2;
|
||||
c1
|
||||
@
|
||||
# [On slave2]
|
||||
# [On server_3]
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
@
|
||||
@@ -203,3 +183,4 @@ DROP PROCEDURE my_grant;
|
||||
DROP PROCEDURE my_revoke;
|
||||
DROP FUNCTION my_user;
|
||||
DROP EVENT e1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
*** Prepare tables and data ***
|
||||
CREATE TABLE t1 (a INT NOT NULL, KEY(a)) ENGINE=innodb;
|
||||
CREATE TABLE t2 (a INT) ENGINE=innodb;
|
||||
@@ -50,7 +46,7 @@ a
|
||||
SELECT * FROM t3;
|
||||
a
|
||||
3
|
||||
Checking that both slave threads are running.
|
||||
include/check_slave_is_running.inc
|
||||
|
||||
*** Test lock wait timeout ***
|
||||
include/stop_slave.inc
|
||||
@@ -61,6 +57,7 @@ SELECT * FROM t1 FOR UPDATE;
|
||||
a
|
||||
1
|
||||
START SLAVE;
|
||||
include/wait_for_slave_sql_error.inc [errno=1205]
|
||||
SELECT COUNT(*) FROM t2;
|
||||
COUNT(*)
|
||||
0
|
||||
@@ -74,7 +71,7 @@ SELECT * FROM t3;
|
||||
a
|
||||
3
|
||||
3
|
||||
Checking that both slave threads are running.
|
||||
include/check_slave_is_running.inc
|
||||
|
||||
*** Test lock wait timeout and purged relay logs ***
|
||||
SET @my_max_relay_log_size= @@global.max_relay_log_size;
|
||||
@@ -88,6 +85,7 @@ a
|
||||
1
|
||||
1
|
||||
START SLAVE;
|
||||
include/wait_for_slave_sql_error.inc [errno=1205]
|
||||
SELECT COUNT(*) FROM t2;
|
||||
COUNT(*)
|
||||
0
|
||||
@@ -103,9 +101,10 @@ a
|
||||
3
|
||||
3
|
||||
3
|
||||
Checking that both slave threads are running.
|
||||
include/check_slave_is_running.inc
|
||||
|
||||
*** Clean up ***
|
||||
DROP TABLE t1,t2,t3;
|
||||
SET global max_relay_log_size= @my_max_relay_log_size;
|
||||
End of 5.1 tests
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
create table t1 (a int, b int) engine=myisam;
|
||||
insert into t1 values(1,1);
|
||||
select * from t1;
|
||||
@@ -13,3 +9,4 @@ delete from t1;
|
||||
select * from t1;
|
||||
a b
|
||||
drop table t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
delete from mysql.user where user=_binary'rpl_do_grant';
|
||||
delete from mysql.db where user=_binary'rpl_do_grant';
|
||||
flush privileges;
|
||||
@@ -167,20 +163,10 @@ DROP FUNCTION upgrade_del_func;
|
||||
DROP FUNCTION upgrade_alter_func;
|
||||
DROP DATABASE bug42217_db;
|
||||
DROP USER 'create_rout_db'@'localhost';
|
||||
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;
|
||||
include/rpl_reset.inc
|
||||
USE test;
|
||||
######## BUG#49119 #######
|
||||
### i) test case from the 'how to repeat section'
|
||||
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(c1 INT);
|
||||
CREATE PROCEDURE p1() SELECT * FROM t1 |
|
||||
REVOKE EXECUTE ON PROCEDURE p1 FROM 'root'@'localhost';
|
||||
@@ -188,12 +174,7 @@ ERROR 42000: There is no such grant defined for user 'root' on host 'localhost'
|
||||
DROP TABLE t1;
|
||||
DROP PROCEDURE p1;
|
||||
### ii) Test case in which REVOKE partially succeeds
|
||||
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;
|
||||
include/rpl_reset.inc
|
||||
CREATE TABLE t1(c1 INT);
|
||||
CREATE PROCEDURE p1() SELECT * FROM t1 |
|
||||
CREATE USER 'user49119'@'localhost';
|
||||
@@ -250,12 +231,7 @@ GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION
|
||||
DROP TABLE t1;
|
||||
DROP PROCEDURE p1;
|
||||
DROP USER 'user49119'@'localhost';
|
||||
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;
|
||||
include/rpl_reset.inc
|
||||
grant all on *.* to foo@"1.2.3.4";
|
||||
revoke all privileges, grant option from "foo";
|
||||
ERROR HY000: Can't revoke all privileges for one or more of the requested users
|
||||
@@ -263,15 +239,11 @@ show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; grant all on *.* to foo@"1.2.3.4"
|
||||
master-bin.000001 # Query # # use `test`; revoke all privileges, grant option from "foo"
|
||||
include/check_slave_no_error.inc
|
||||
DROP USER foo@"1.2.3.4";
|
||||
|
||||
# Bug#27606 GRANT statement should be replicated with DEFINER information
|
||||
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;
|
||||
include/rpl_reset.inc
|
||||
GRANT SELECT, INSERT ON mysql.user TO user_bug27606@localhost;
|
||||
SELECT Grantor FROM mysql.tables_priv WHERE User='user_bug27606';
|
||||
Grantor
|
||||
@@ -287,4 +259,4 @@ SELECT Grantor FROM mysql.tables_priv WHERE User='user_bug27606';
|
||||
Grantor
|
||||
root@localhost
|
||||
DROP USER user_bug27606@localhost;
|
||||
"End of test"
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,10 +1,6 @@
|
||||
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;
|
||||
drop table if exists t1, t2;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
create table t1 (a int);
|
||||
drop table t1, t2;
|
||||
ERROR 42S02: Unknown table 't2'
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
drop database if exists mysqltest1;
|
||||
create database mysqltest1;
|
||||
create table mysqltest1.t1 (n int);
|
||||
@@ -34,4 +30,4 @@ n
|
||||
use test;
|
||||
drop table t1;
|
||||
drop database mysqltest1;
|
||||
include/stop_slave.inc
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,98 +0,0 @@
|
||||
RESET MASTER;
|
||||
DROP PROCEDURE IF EXISTS db_bug_13684.p;
|
||||
DROP FUNCTION IF EXISTS db_bug_13684.f;
|
||||
DROP TRIGGER IF EXISTS db_bug_13684.tr;
|
||||
DROP VIEW IF EXISTS db_bug_13684.v;
|
||||
DROP EVENT IF EXISTS db_bug_13684.e;
|
||||
DROP TABLE IF EXISTS db_bug_13684.t;
|
||||
DROP DATABASE IF EXISTS db_bug_13684;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; DROP PROCEDURE IF EXISTS db_bug_13684.p
|
||||
master-bin.000001 # Query # # use `test`; DROP FUNCTION IF EXISTS db_bug_13684.f
|
||||
master-bin.000001 # Query # # use `test`; DROP TRIGGER IF EXISTS db_bug_13684.tr
|
||||
master-bin.000001 # Query # # use `test`; DROP VIEW IF EXISTS db_bug_13684.v
|
||||
master-bin.000001 # Query # # use `test`; DROP EVENT IF EXISTS db_bug_13684.e
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `db_bug_13684`.`t` /* generated by server */
|
||||
master-bin.000001 # Query # # DROP DATABASE IF EXISTS db_bug_13684
|
||||
CREATE DATABASE db_bug_13684;
|
||||
CREATE TABLE db_bug_13684.t (a int);
|
||||
CREATE EVENT db_bug_13684.e
|
||||
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR
|
||||
DO
|
||||
UPDATE db_bug_13684.t SET a = a + 1;
|
||||
CREATE VIEW db_bug_13684.v
|
||||
AS SELECT * FROM db_bug_13684.t;
|
||||
CREATE TRIGGER db_bug_13684.tr BEFORE INSERT ON db_bug_13684.t
|
||||
FOR EACH ROW BEGIN
|
||||
END;
|
||||
CREATE PROCEDURE db_bug_13684.p (OUT p1 INT)
|
||||
BEGIN
|
||||
END;
|
||||
CREATE FUNCTION db_bug_13684.f (s CHAR(20))
|
||||
RETURNS CHAR(50) DETERMINISTIC
|
||||
RETURN s;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; DROP PROCEDURE IF EXISTS db_bug_13684.p
|
||||
master-bin.000001 # Query # # use `test`; DROP FUNCTION IF EXISTS db_bug_13684.f
|
||||
master-bin.000001 # Query # # use `test`; DROP TRIGGER IF EXISTS db_bug_13684.tr
|
||||
master-bin.000001 # Query # # use `test`; DROP VIEW IF EXISTS db_bug_13684.v
|
||||
master-bin.000001 # Query # # use `test`; DROP EVENT IF EXISTS db_bug_13684.e
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `db_bug_13684`.`t` /* generated by server */
|
||||
master-bin.000001 # Query # # DROP DATABASE IF EXISTS db_bug_13684
|
||||
master-bin.000001 # Query # # CREATE DATABASE db_bug_13684
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE db_bug_13684.t (a int)
|
||||
master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` EVENT db_bug_13684.e
|
||||
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR
|
||||
DO
|
||||
UPDATE db_bug_13684.t SET a = a + 1
|
||||
master-bin.000001 # Query # # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `db_bug_13684`.`v` AS SELECT * FROM db_bug_13684.t
|
||||
master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` TRIGGER db_bug_13684.tr BEFORE INSERT ON db_bug_13684.t
|
||||
FOR EACH ROW BEGIN
|
||||
END
|
||||
master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `db_bug_13684`.`p`(OUT p1 INT)
|
||||
BEGIN
|
||||
END
|
||||
master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `db_bug_13684`.`f`(s CHAR(20)) RETURNS char(50) CHARSET latin1
|
||||
DETERMINISTIC
|
||||
RETURN s
|
||||
DROP PROCEDURE IF EXISTS db_bug_13684.p;
|
||||
DROP FUNCTION IF EXISTS db_bug_13684.f;
|
||||
DROP TRIGGER IF EXISTS db_bug_13684.tr;
|
||||
DROP VIEW IF EXISTS db_bug_13684.v;
|
||||
DROP EVENT IF EXISTS db_bug_13684.e;
|
||||
DROP TABLE IF EXISTS db_bug_13684.t;
|
||||
DROP DATABASE IF EXISTS db_bug_13684;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; DROP PROCEDURE IF EXISTS db_bug_13684.p
|
||||
master-bin.000001 # Query # # use `test`; DROP FUNCTION IF EXISTS db_bug_13684.f
|
||||
master-bin.000001 # Query # # use `test`; DROP TRIGGER IF EXISTS db_bug_13684.tr
|
||||
master-bin.000001 # Query # # use `test`; DROP VIEW IF EXISTS db_bug_13684.v
|
||||
master-bin.000001 # Query # # use `test`; DROP EVENT IF EXISTS db_bug_13684.e
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `db_bug_13684`.`t` /* generated by server */
|
||||
master-bin.000001 # Query # # DROP DATABASE IF EXISTS db_bug_13684
|
||||
master-bin.000001 # Query # # CREATE DATABASE db_bug_13684
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE db_bug_13684.t (a int)
|
||||
master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` EVENT db_bug_13684.e
|
||||
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR
|
||||
DO
|
||||
UPDATE db_bug_13684.t SET a = a + 1
|
||||
master-bin.000001 # Query # # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `db_bug_13684`.`v` AS SELECT * FROM db_bug_13684.t
|
||||
master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` TRIGGER db_bug_13684.tr BEFORE INSERT ON db_bug_13684.t
|
||||
FOR EACH ROW BEGIN
|
||||
END
|
||||
master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `db_bug_13684`.`p`(OUT p1 INT)
|
||||
BEGIN
|
||||
END
|
||||
master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `db_bug_13684`.`f`(s CHAR(20)) RETURNS char(50) CHARSET latin1
|
||||
DETERMINISTIC
|
||||
RETURN s
|
||||
master-bin.000001 # Query # # use `test`; DROP PROCEDURE IF EXISTS db_bug_13684.p
|
||||
master-bin.000001 # Query # # use `test`; DROP FUNCTION IF EXISTS db_bug_13684.f
|
||||
master-bin.000001 # Query # # use `test`; DROP TRIGGER IF EXISTS db_bug_13684.tr
|
||||
master-bin.000001 # Query # # use `test`; DROP VIEW IF EXISTS db_bug_13684.v
|
||||
master-bin.000001 # Query # # use `test`; DROP EVENT IF EXISTS db_bug_13684.e
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `db_bug_13684`.`t` /* generated by server */
|
||||
master-bin.000001 # Query # # DROP DATABASE IF EXISTS db_bug_13684
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
create database if not exists mysqltest;
|
||||
use mysqltest;
|
||||
create temporary table mysqltest.t1 (n int)ENGINE=MyISAM;
|
||||
@@ -26,12 +22,7 @@ CREATE TEMPORARY TABLE tmp3 (a int);
|
||||
DROP TEMPORARY TABLE tmp3;
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
START SLAVE;
|
||||
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;
|
||||
include/rpl_reset.inc
|
||||
CREATE TABLE t1 ( i INT );
|
||||
SHOW STATUS LIKE 'Slave_open_temp_tables';
|
||||
Variable_name Value
|
||||
@@ -47,3 +38,4 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE t1 ( i INT )
|
||||
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE ttmp1 ( i INT )
|
||||
master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `ttmp1`
|
||||
DROP TABLE t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
drop table if exists t1, t2;
|
||||
drop view if exists v1, v2, v3, not_exist_view;
|
||||
create table t1 (a int);
|
||||
@@ -27,3 +23,4 @@ select * from v3;
|
||||
ERROR 42S02: Table 'test.v3' doesn't exist
|
||||
==== clean up ====
|
||||
drop table t1, t2, t3;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,12 +1,4 @@
|
||||
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;
|
||||
reset master;
|
||||
change master to master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root";
|
||||
include/start_slave.inc
|
||||
include/rpl_init.inc [topology=1->2->1]
|
||||
create table t1 (n int);
|
||||
include/stop_slave.inc
|
||||
create table t2 (n int);
|
||||
@@ -25,6 +17,7 @@ insert into t3 values(4);
|
||||
start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS;
|
||||
Warnings:
|
||||
Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
|
||||
include/wait_for_slave_sql_to_stop.inc
|
||||
show tables;
|
||||
Tables_in_test
|
||||
t1
|
||||
@@ -32,12 +25,14 @@ t2
|
||||
start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS;
|
||||
Warnings:
|
||||
Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
|
||||
include/wait_for_slave_sql_to_stop.inc
|
||||
select * from t3;
|
||||
n
|
||||
1
|
||||
start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS;
|
||||
Warnings:
|
||||
Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
|
||||
include/wait_for_slave_sql_to_stop.inc
|
||||
select * from t3;
|
||||
n
|
||||
1
|
||||
@@ -55,6 +50,5 @@ t3
|
||||
t4
|
||||
t5
|
||||
t6
|
||||
include/stop_slave.inc
|
||||
reset slave;
|
||||
drop table t1,t2,t3,t4,t5,t6;
|
||||
drop table t1, t2, t3, t4, t5, t6;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,10 +1,7 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
STOP SLAVE;
|
||||
include/wait_for_slave_to_stop.inc
|
||||
Master_Host = '127.0.0.1' (expected '127.0.0.1')
|
||||
CHANGE MASTER TO MASTER_HOST="";
|
||||
ERROR HY000: Incorrect arguments to MASTER_HOST
|
||||
@@ -14,3 +11,5 @@ Master_Host = 'foo' (expected 'foo')
|
||||
CHANGE MASTER TO MASTER_HOST="127.0.0.1";
|
||||
Master_Host = '127.0.0.1' (expected '127.0.0.1')
|
||||
START SLAVE;
|
||||
include/wait_for_slave_to_start.inc
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
create table t1 (a int primary key);
|
||||
create table t4 (a int primary key);
|
||||
insert into t1 values (1),(1);
|
||||
@@ -40,3 +36,4 @@ a
|
||||
3
|
||||
4
|
||||
DROP TABLE test.t4;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
SET @old_event_scheduler = @@global.event_scheduler;
|
||||
set global event_scheduler=1;
|
||||
DROP EVENT IF EXISTS test.justonce;
|
||||
@@ -167,3 +163,4 @@ DROP EVENT event44331_1;
|
||||
DROP EVENT event44331_2;
|
||||
DROP EVENT event44331_3;
|
||||
DROP EVENT event44331_4;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
|
||||
***********************************************************
|
||||
***********************************************************
|
||||
@@ -90,7 +86,7 @@ f1 f2 f3 f4
|
||||
27 27 27 next
|
||||
29 29 29 second
|
||||
30 30 30 next
|
||||
Checking that both slave threads are running.
|
||||
include/check_slave_is_running.inc
|
||||
|
||||
***** Testing Altering table def scenario *****
|
||||
|
||||
@@ -427,7 +423,7 @@ f1 f2 f3 f4
|
||||
|
||||
** Check slave status **
|
||||
|
||||
Checking that both slave threads are running.
|
||||
include/check_slave_is_running.inc
|
||||
|
||||
****************************************
|
||||
* columns in master at middle of table *
|
||||
@@ -463,10 +459,8 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
|
||||
*** Expect slave to fail with Error 1677 ***
|
||||
********************************************
|
||||
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)''
|
||||
|
||||
*** Drop t10 ***
|
||||
DROP TABLE t10;
|
||||
@@ -501,10 +495,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
|
||||
*** Expect slave to fail with Error 1677 ***
|
||||
********************************************
|
||||
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)''
|
||||
|
||||
*** Drop t11 ***
|
||||
DROP TABLE t11;
|
||||
@@ -615,7 +607,8 @@ c1 c3 hex(c4) c5 c6
|
||||
************
|
||||
* Bug30415 *
|
||||
************
|
||||
Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
|
||||
include/wait_for_slave_sql_error.inc [errno=1091]
|
||||
Last_SQL_Error = 'Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7''
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
|
||||
@@ -663,7 +656,8 @@ c1 hex(c4) c5 c6 c7 c2
|
||||
*** Expect slave to fail with Error 1054 ***
|
||||
********************************************
|
||||
|
||||
Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
|
||||
include/wait_for_slave_sql_error.inc [errno=1054]
|
||||
Last_SQL_Error = 'Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7''
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
|
||||
@@ -711,7 +705,8 @@ c1 hex(c4) c5 c6 c7
|
||||
*** BUG 30434 ***
|
||||
*****************
|
||||
|
||||
Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
|
||||
include/wait_for_slave_sql_error.inc [errno=1072]
|
||||
Last_SQL_Error = 'Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)''
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
|
||||
@@ -875,4 +870,4 @@ c1 hex(c4) c5
|
||||
2 6231623162316231 JOE
|
||||
3 6231623162316231 QA
|
||||
DROP TABLE t5;
|
||||
|
||||
include/rpl_end.inc
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
|
||||
***********************************************************
|
||||
***********************************************************
|
||||
@@ -90,7 +86,7 @@ f1 f2 f3 f4
|
||||
27 27 27 next
|
||||
29 29 29 second
|
||||
30 30 30 next
|
||||
Checking that both slave threads are running.
|
||||
include/check_slave_is_running.inc
|
||||
|
||||
***** Testing Altering table def scenario *****
|
||||
|
||||
@@ -427,7 +423,7 @@ f1 f2 f3 f4
|
||||
|
||||
** Check slave status **
|
||||
|
||||
Checking that both slave threads are running.
|
||||
include/check_slave_is_running.inc
|
||||
|
||||
****************************************
|
||||
* columns in master at middle of table *
|
||||
@@ -463,10 +459,8 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
|
||||
*** Expect slave to fail with Error 1677 ***
|
||||
********************************************
|
||||
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)''
|
||||
|
||||
*** Drop t10 ***
|
||||
DROP TABLE t10;
|
||||
@@ -501,10 +495,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
|
||||
*** Expect slave to fail with Error 1677 ***
|
||||
********************************************
|
||||
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)''
|
||||
|
||||
*** Drop t11 ***
|
||||
DROP TABLE t11;
|
||||
@@ -615,7 +607,8 @@ c1 c3 hex(c4) c5 c6
|
||||
************
|
||||
* Bug30415 *
|
||||
************
|
||||
Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
|
||||
include/wait_for_slave_sql_error.inc [errno=1091]
|
||||
Last_SQL_Error = 'Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7''
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
|
||||
@@ -663,7 +656,8 @@ c1 hex(c4) c5 c6 c7 c2
|
||||
*** Expect slave to fail with Error 1054 ***
|
||||
********************************************
|
||||
|
||||
Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
|
||||
include/wait_for_slave_sql_error.inc [errno=1054]
|
||||
Last_SQL_Error = 'Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7''
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
|
||||
@@ -711,7 +705,8 @@ c1 hex(c4) c5 c6 c7
|
||||
*** BUG 30434 ***
|
||||
*****************
|
||||
|
||||
Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
|
||||
include/wait_for_slave_sql_error.inc [errno=1072]
|
||||
Last_SQL_Error = 'Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)''
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
|
||||
@@ -875,4 +870,4 @@ c1 hex(c4) c5
|
||||
2 6231623162316231 JOE
|
||||
3 6231623162316231 QA
|
||||
DROP TABLE t5;
|
||||
|
||||
include/rpl_end.inc
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051");
|
||||
**** Diff Table Def Start ****
|
||||
*** On Slave ***
|
||||
@@ -57,7 +53,8 @@ a b c
|
||||
3 4 QA TESTING
|
||||
*** Start Slave ***
|
||||
START SLAVE;
|
||||
Last_SQL_Error = Column 2 of table 'test.t2' cannot be converted from type 'char(10)' to type 'char(5)'
|
||||
include/wait_for_slave_sql_error.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 2 of table 'test.t2' cannot be converted from type 'char(10)' to type 'char(5)''
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
@@ -86,10 +83,8 @@ INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TEST
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1677 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Column 0 of table 'test.t3' cannot be converted from type 'tinyblob' to type 'int(11)'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 0 of table 'test.t3' cannot be converted from type 'tinyblob' to type 'int(11)''
|
||||
*** Drop t3 ***
|
||||
DROP TABLE t3;
|
||||
*** Create t4 on slave ***
|
||||
@@ -111,10 +106,8 @@ INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'),
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1677 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Column 0 of table 'test.t4' cannot be converted from type 'decimal(8,2)' to type 'int(11)'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 0 of table 'test.t4' cannot be converted from type 'decimal(8,2)' to type 'int(11)''
|
||||
*** Drop t4 ***
|
||||
DROP TABLE t4;
|
||||
*** Create t5 on slave ***
|
||||
@@ -136,10 +129,8 @@ INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098),
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1677 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Column 1 of table 'test.t5' cannot be converted from type 'varchar(6)' to type 'char(5)'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 1 of table 'test.t5' cannot be converted from type 'varchar(6)' to type 'char(5)''
|
||||
*** Drop t5 ***
|
||||
DROP TABLE t5;
|
||||
*** Create t6 on slave ***
|
||||
@@ -160,12 +151,11 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1),
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1677 ***
|
||||
********************************************
|
||||
Last_SQL_Error = Column 1 of table 'test.t6' cannot be converted from type 'varchar(6)' to type 'char(5)'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
|
||||
include/wait_for_slave_sql_error.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 1 of table 'test.t6' cannot be converted from type 'varchar(6)' to type 'char(5)''
|
||||
*** Drop t6 ***
|
||||
include/rpl_reset.inc
|
||||
DROP TABLE t6;
|
||||
DROP TABLE t6;
|
||||
START SLAVE;
|
||||
**** Diff Table Def End ****
|
||||
**** Extra Colums Start ****
|
||||
*** Create t7 on slave ***
|
||||
@@ -240,6 +230,7 @@ a b c d e f g h i
|
||||
1 b1b1b1b1b1b1b1b1 Kyle 0000-00-00 00:00:00 0 NULL NULL
|
||||
2 b1b1b1b1b1b1b1b1 JOE 0000-00-00 00:00:00 0 NULL NULL
|
||||
3 b1b1b1b1b1b1b1b1 QA 0000-00-00 00:00:00 0 NULL NULL
|
||||
DROP TABLE t9;
|
||||
*** Create t10 on slave ***
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
@@ -258,10 +249,8 @@ INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1677 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Column 2 of table 'test.t10' cannot be converted from type 'char(5)' to type 'double'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 2 of table 'test.t10' cannot be converted from type 'char(5)' to type 'double''
|
||||
*** Drop t10 ***
|
||||
DROP TABLE t10;
|
||||
*** Create t11 on slave ***
|
||||
@@ -282,10 +271,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1677 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Column 2 of table 'test.t11' cannot be converted from type 'varchar(254)' to type 'int(11)'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 2 of table 'test.t11' cannot be converted from type 'varchar(254)' to type 'int(11)''
|
||||
*** Drop t11 ***
|
||||
DROP TABLE t11;
|
||||
*** Create t12 on slave ***
|
||||
@@ -442,6 +429,7 @@ c1 c4 c5 c6 c7
|
||||
4 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
|
||||
5 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
|
||||
6 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
|
||||
DROP TABLE t14a;
|
||||
*** connect to master and drop columns ***
|
||||
ALTER TABLE t14 DROP COLUMN c2;
|
||||
ALTER TABLE t14 DROP COLUMN c4;
|
||||
@@ -495,10 +483,8 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5;
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1060 ***
|
||||
********************************************
|
||||
--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
|
||||
include/wait_for_slave_sql_error_and_skip.inc [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''
|
||||
*** Try to insert in master ****
|
||||
INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2);
|
||||
SELECT * FROM t15 ORDER BY c1;
|
||||
@@ -598,9 +584,8 @@ INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1677 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Column 0 of table 'test.t17' cannot be converted from type 'bigint' to type 'smallint(6)'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 0 of table 'test.t17' cannot be converted from type 'bigint' to type 'smallint(6)''
|
||||
** DROP table t17 ***
|
||||
DROP TABLE t17;
|
||||
include/rpl_end.inc
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051");
|
||||
**** Diff Table Def Start ****
|
||||
*** On Slave ***
|
||||
@@ -57,7 +53,8 @@ a b c
|
||||
3 4 QA TESTING
|
||||
*** Start Slave ***
|
||||
START SLAVE;
|
||||
Last_SQL_Error = Column 2 of table 'test.t2' cannot be converted from type 'char(10)' to type 'char(5)'
|
||||
include/wait_for_slave_sql_error.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 2 of table 'test.t2' cannot be converted from type 'char(10)' to type 'char(5)''
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
@@ -86,10 +83,8 @@ INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TEST
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1677 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Column 0 of table 'test.t3' cannot be converted from type 'tinyblob' to type 'int(11)'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 0 of table 'test.t3' cannot be converted from type 'tinyblob' to type 'int(11)''
|
||||
*** Drop t3 ***
|
||||
DROP TABLE t3;
|
||||
*** Create t4 on slave ***
|
||||
@@ -111,10 +106,8 @@ INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'),
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1677 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Column 0 of table 'test.t4' cannot be converted from type 'decimal(8,2)' to type 'int(11)'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 0 of table 'test.t4' cannot be converted from type 'decimal(8,2)' to type 'int(11)''
|
||||
*** Drop t4 ***
|
||||
DROP TABLE t4;
|
||||
*** Create t5 on slave ***
|
||||
@@ -136,10 +129,8 @@ INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098),
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1677 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Column 1 of table 'test.t5' cannot be converted from type 'varchar(6)' to type 'char(5)'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 1 of table 'test.t5' cannot be converted from type 'varchar(6)' to type 'char(5)''
|
||||
*** Drop t5 ***
|
||||
DROP TABLE t5;
|
||||
*** Create t6 on slave ***
|
||||
@@ -160,12 +151,11 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1),
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1677 ***
|
||||
********************************************
|
||||
Last_SQL_Error = Column 1 of table 'test.t6' cannot be converted from type 'varchar(6)' to type 'char(5)'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
|
||||
include/wait_for_slave_sql_error.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 1 of table 'test.t6' cannot be converted from type 'varchar(6)' to type 'char(5)''
|
||||
*** Drop t6 ***
|
||||
include/rpl_reset.inc
|
||||
DROP TABLE t6;
|
||||
DROP TABLE t6;
|
||||
START SLAVE;
|
||||
**** Diff Table Def End ****
|
||||
**** Extra Colums Start ****
|
||||
*** Create t7 on slave ***
|
||||
@@ -240,6 +230,7 @@ a b c d e f g h i
|
||||
1 b1b1b1b1b1b1b1b1 Kyle 0000-00-00 00:00:00 0 NULL NULL
|
||||
2 b1b1b1b1b1b1b1b1 JOE 0000-00-00 00:00:00 0 NULL NULL
|
||||
3 b1b1b1b1b1b1b1b1 QA 0000-00-00 00:00:00 0 NULL NULL
|
||||
DROP TABLE t9;
|
||||
*** Create t10 on slave ***
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
@@ -258,10 +249,8 @@ INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1677 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Column 2 of table 'test.t10' cannot be converted from type 'char(5)' to type 'double'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 2 of table 'test.t10' cannot be converted from type 'char(5)' to type 'double''
|
||||
*** Drop t10 ***
|
||||
DROP TABLE t10;
|
||||
*** Create t11 on slave ***
|
||||
@@ -282,10 +271,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1677 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Column 2 of table 'test.t11' cannot be converted from type 'varchar(254)' to type 'int(11)'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 2 of table 'test.t11' cannot be converted from type 'varchar(254)' to type 'int(11)''
|
||||
*** Drop t11 ***
|
||||
DROP TABLE t11;
|
||||
*** Create t12 on slave ***
|
||||
@@ -442,6 +429,7 @@ c1 c4 c5 c6 c7
|
||||
4 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
|
||||
5 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
|
||||
6 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
|
||||
DROP TABLE t14a;
|
||||
*** connect to master and drop columns ***
|
||||
ALTER TABLE t14 DROP COLUMN c2;
|
||||
ALTER TABLE t14 DROP COLUMN c4;
|
||||
@@ -495,10 +483,8 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5;
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1060 ***
|
||||
********************************************
|
||||
--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
|
||||
include/wait_for_slave_sql_error_and_skip.inc [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''
|
||||
*** Try to insert in master ****
|
||||
INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2);
|
||||
SELECT * FROM t15 ORDER BY c1;
|
||||
@@ -598,9 +584,8 @@ INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1677 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Column 0 of table 'test.t17' cannot be converted from type 'bigint' to type 'smallint(6)'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 0 of table 'test.t17' cannot be converted from type 'bigint' to type 'smallint(6)''
|
||||
** DROP table t17 ***
|
||||
DROP TABLE t17;
|
||||
include/rpl_end.inc
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
CREATE TABLE t1 ( a int ) ENGINE=InnoDB;
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
@@ -23,3 +19,4 @@ a
|
||||
1
|
||||
commit;
|
||||
drop table t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
CREATE TABLE t1 (id int, a int);
|
||||
CREATE TABLE t2 (id int, b int);
|
||||
CREATE TABLE t3 (id int, c int);
|
||||
@@ -47,85 +43,53 @@ UPDATE t4 LEFT JOIN (t1, t6, t7) ON (t4.id=t1.id and t4.id=t6.id and t4.id=t7.id
|
||||
UPDATE t7 LEFT JOIN (t4, t1, t2) ON (t7.id=t4.id and t7.id=t1.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1;
|
||||
UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id) SET a=0, d=0, g=0, h=0 where t7.id=1;
|
||||
UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
|
||||
Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1''
|
||||
UPDATE t1 LEFT JOIN (t4, t7) ON (t1.id=t4.id and t1.id=t7.id) SET a=0 where t1.id=1;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7) ON (t1.id=t4.id and t1.id=t7.id) SET a=0 where t1.id=1'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
|
||||
Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7) ON (t1.id=t4.id and t1.id=t7.id) SET a=0 where t1.id=1''
|
||||
UPDATE t1 LEFT JOIN (t2, t4, t7) ON (t1.id=t2.id and t1.id=t4.id and t1.id=t7.id) SET a=0, b=0 where t1.id=1;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t4, t7) ON (t1.id=t2.id and t1.id=t4.id and t1.id=t7.id) SET a=0, b=0 where t1.id=1'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
|
||||
Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t4, t7) ON (t1.id=t2.id and t1.id=t4.id and t1.id=t7.id) SET a=0, b=0 where t1.id=1''
|
||||
UPDATE t1 LEFT JOIN (t2, t3, t7) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t7.id) SET a=0, b=0, c=0 where t1.id=1;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t3, t7) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t7.id) SET a=0, b=0, c=0 where t1.id=1'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
|
||||
Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t3, t7) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t7.id) SET a=0, b=0, c=0 where t1.id=1''
|
||||
UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET a=0, g=0 where t1.id=1;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET a=0, g=0 where t1.id=1'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
|
||||
Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET a=0, g=0 where t1.id=1''
|
||||
UPDATE t7 LEFT JOIN t1 ON (t1.id=t7.id) SET a=0, g=0 where t7.id=1;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN t1 ON (t1.id=t7.id) SET a=0, g=0 where t7.id=1'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
|
||||
Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN t1 ON (t1.id=t7.id) SET a=0, g=0 where t7.id=1''
|
||||
UPDATE t1 LEFT JOIN (t4, t5, t7) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t7.id) SET a=0, g=0 where t1.id=1;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t7) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t7.id) SET a=0, g=0 where t1.id=1'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
|
||||
Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t7) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t7.id) SET a=0, g=0 where t1.id=1''
|
||||
UPDATE t1 LEFT JOIN (t4, t7, t8) ON (t1.id=t4.id and t1.id=t7.id and t1.id=t8.id) SET a=0, g=0 where t1.id=1;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7, t8) ON (t1.id=t4.id and t1.id=t7.id and t1.id=t8.id) SET a=0, g=0 where t1.id=1'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
|
||||
Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7, t8) ON (t1.id=t4.id and t1.id=t7.id and t1.id=t8.id) SET a=0, g=0 where t1.id=1''
|
||||
UPDATE t1 LEFT JOIN (t7, t8, t9) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t9.id) SET a=0, g=0, h=0, i=0 where t1.id=1;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t7, t8, t9) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t9.id) SET a=0, g=0, h=0, i=0 where t1.id=1'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
|
||||
Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t7, t8, t9) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t9.id) SET a=0, g=0, h=0, i=0 where t1.id=1''
|
||||
UPDATE t7 LEFT JOIN (t1, t2, t3) ON (t7.id=t1.id and t7.id=t2.id and t7.id=t3.id) SET g=0, a=0, b=0, c=0 where t7.id=1;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t2, t3) ON (t7.id=t1.id and t7.id=t2.id and t7.id=t3.id) SET g=0, a=0, b=0, c=0 where t7.id=1'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
|
||||
Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t2, t3) ON (t7.id=t1.id and t7.id=t2.id and t7.id=t3.id) SET g=0, a=0, b=0, c=0 where t7.id=1''
|
||||
UPDATE t7 LEFT JOIN (t4, t5, t3) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t3.id) SET g=0, c=0 where t7.id=1;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t4, t5, t3) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t3.id) SET g=0, c=0 where t7.id=1'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
|
||||
Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t4, t5, t3) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t3.id) SET g=0, c=0 where t7.id=1''
|
||||
UPDATE t7 LEFT JOIN (t8, t9, t3) ON (t7.id=t8.id and t7.id=t9.id and t7.id=t3.id) SET g=0, h=0, i=0, c=0 where t7.id=1;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t8, t9, t3) ON (t7.id=t8.id and t7.id=t9.id and t7.id=t3.id) SET g=0, h=0, i=0, c=0 where t7.id=1'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
|
||||
Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t8, t9, t3) ON (t7.id=t8.id and t7.id=t9.id and t7.id=t3.id) SET g=0, h=0, i=0, c=0 where t7.id=1''
|
||||
UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0, d=0 where t1.id=1;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0, d=0 where t1.id=1'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
|
||||
Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0, d=0 where t1.id=1''
|
||||
UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET a=0, d=0, e=0, f=0 where t1.id=1;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET a=0, d=0, e=0, f=0 where t1.id=1'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
|
||||
Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET a=0, d=0, e=0, f=0 where t1.id=1''
|
||||
UPDATE t4 LEFT JOIN (t1, t5, t6) ON (t4.id=t1.id and t4.id=t5.id and t4.id=t6.id) SET a=0, e=0, f=0 where t4.id=1;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t4 LEFT JOIN (t1, t5, t6) ON (t4.id=t1.id and t4.id=t5.id and t4.id=t6.id) SET a=0, e=0, f=0 where t4.id=1'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
|
||||
Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t4 LEFT JOIN (t1, t5, t6) ON (t4.id=t1.id and t4.id=t5.id and t4.id=t6.id) SET a=0, e=0, f=0 where t4.id=1''
|
||||
UPDATE t7 LEFT JOIN (t1, t4, t2) ON (t7.id=t1.id and t7.id=t4.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t4, t2) ON (t7.id=t1.id and t7.id=t4.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
|
||||
Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t4, t2) ON (t7.id=t1.id and t7.id=t4.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1''
|
||||
[on slave]
|
||||
show tables like 't%';
|
||||
Tables_in_test (t%)
|
||||
@@ -149,3 +113,4 @@ id c
|
||||
3 3
|
||||
[on master]
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,20 +1,14 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
# Test if support 'flush error logs' statement.
|
||||
flush error logs;
|
||||
# Make sure binary logs was not be flushed
|
||||
# after execute 'flush error logs' statement.
|
||||
# Make sure relay logs was not be flushed
|
||||
# after execute 'flush error logs' statement.
|
||||
# Make sure the 'slave-relay-bin.000004' file does not
|
||||
# exist before execute 'flush relay logs' statement.
|
||||
# Test if support 'flush relay logs' statement.
|
||||
flush relay logs;
|
||||
# Check the 'slave-relay-bin.000004' file is created
|
||||
# Check the 'slave-relay-bin.000003' file is created
|
||||
# after executed 'flush relay logs' statement.
|
||||
# Make sure binary logs was not be flushed
|
||||
# after execute 'flush relay logs' statement.
|
||||
@@ -36,20 +30,21 @@ flush engine logs;
|
||||
flush binary logs;
|
||||
# Check the 'master-bin.000002' file is created
|
||||
# after executed 'flush binary logs' statement.
|
||||
# Make sure the 'slave-relay-bin.000007' file does not exist
|
||||
# Make sure the 'slave-relay-bin.000006' file does not exist
|
||||
# exist before execute 'flush error logs, relay logs' statement.
|
||||
# Test if support to combine all kinds of logs into one statement.
|
||||
flush error logs, relay logs;
|
||||
# Make sure binary logs was not be flushed
|
||||
# after execute 'flush error logs, relay logs' statement.
|
||||
# Check the 'slave-relay-bin.000007' file is created after
|
||||
# Check the 'slave-relay-bin.000006' file is created after
|
||||
# execute 'flush error logs, relay logs' statement.
|
||||
# Make sure the 'slave-relay-bin.000008' and 'slave-relay-bin.000009'
|
||||
# files do not exist before execute 'flush error logs, relay logs'
|
||||
# Make sure the 'slave-relay-bin.000007' and 'slave-relay-bin.000008'
|
||||
# files do not exist before execute 'flush error logs, relay logs'
|
||||
# statement.
|
||||
# Test if 'flush logs' statement works fine and flush all the logs.
|
||||
flush logs;
|
||||
# Check 'master-bin.000003' is created
|
||||
# after execute 'flush logs' statement.
|
||||
# Check the 'slave-relay-bin.000008' and 'slave-relay-bin.000009'
|
||||
# Check the 'slave-relay-bin.000007' and 'slave-relay-bin.000008'
|
||||
# files are created after execute 'flush logs' statement.
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,28 +1,16 @@
|
||||
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;
|
||||
include/rpl_init.inc [topology=1->2->1]
|
||||
show variables like 'relay_log%';
|
||||
Variable_name Value
|
||||
relay_log MYSQLD_DATADIR/relay-log
|
||||
relay_log
|
||||
relay_log_index
|
||||
relay_log_info_file relay-log.info
|
||||
relay_log_purge ON
|
||||
relay_log_recovery OFF
|
||||
relay_log_space_limit 0
|
||||
stop slave;
|
||||
change master to master_host='127.0.0.1',master_user='root',
|
||||
master_password='',master_port=MASTER_PORT;
|
||||
start slave;
|
||||
stop slave;
|
||||
change master to master_host='127.0.0.1',master_user='root',
|
||||
master_password='',master_port=SLAVE_PORT;
|
||||
include/start_slave.inc
|
||||
CREATE TABLE t1 (a INT KEY) ENGINE= MyISAM;
|
||||
INSERT INTO t1 VALUE(1);
|
||||
FLUSH LOGS;
|
||||
INSERT INTO t1 VALUE(2);
|
||||
Checking that both slave threads are running.
|
||||
Relay_Log_File relay-log.000003
|
||||
include/check_slave_is_running.inc
|
||||
Relay_Log_File = 'mysqld-relay-bin.000003'
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
CREATE TABLE t1 (a INT AUTO_INCREMENT KEY) ENGINE=INNODB;
|
||||
CREATE TABLE t2 (b INT AUTO_INCREMENT KEY, c INT, FOREIGN KEY(b) REFERENCES t1(a)) ENGINE=INNODB;
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
@@ -52,3 +48,4 @@ select count(*) from t1 /* must be zero */;
|
||||
count(*)
|
||||
0
|
||||
drop table t2,t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,10 +1,7 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
create table t1 (a int);
|
||||
create table t2 (a int);
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
create table t1(a varchar(100),
|
||||
b multipoint not null,
|
||||
c varchar(256));
|
||||
@@ -16,3 +12,4 @@ b geometrycollection default null,
|
||||
c decimal(10,0));
|
||||
insert into t2(c) values (null);
|
||||
drop table t1, t2;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
create table t1(n int);
|
||||
insert into t1 values(get_lock("lock",2));
|
||||
@@ -34,3 +30,4 @@ select is_free_lock(NULL);
|
||||
is_free_lock(NULL)
|
||||
NULL
|
||||
drop table t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,34 +1,33 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: .*");
|
||||
call mtr.add_suppression("Slave I/O: .* failed with error: Lost connection to MySQL server at 'reading initial communication packet'");
|
||||
call mtr.add_suppression("Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; .*");
|
||||
call mtr.add_suppression("Slave I/O thread .* register on master");
|
||||
stop slave;
|
||||
include/stop_slave.inc
|
||||
SET @@global.debug= "+d,'debug_lock.before_get_UNIX_TIMESTAMP'";
|
||||
start slave;
|
||||
include/start_slave.inc
|
||||
slave is going to hang in get_master_version_and_clock
|
||||
include/rpl_stop_server.inc [server_number=1]
|
||||
slave is unblocked
|
||||
SET DEBUG_SYNC='now SIGNAL signal.get_unix_timestamp';
|
||||
Check network error happened here
|
||||
include/wait_for_slave_io_error.inc [errno=1040, 1053, 2002, 2003, 2006, 2013]
|
||||
set @@global.debug = "-d,'debug_lock.before_get_UNIX_TIMESTAMP'";
|
||||
stop slave;
|
||||
include/rpl_start_server.inc [server_number=1]
|
||||
include/wait_for_slave_param.inc [Slave_IO_Running]
|
||||
include/stop_slave.inc
|
||||
SET @@global.debug= "+d,'debug_lock.before_get_SERVER_ID'";
|
||||
start slave;
|
||||
include/start_slave.inc
|
||||
slave is going to hang in get_master_version_and_clock
|
||||
include/rpl_stop_server.inc [server_number=1]
|
||||
slave is unblocked
|
||||
SET DEBUG_SYNC='now SIGNAL signal.get_server_id';
|
||||
Check network error happened here
|
||||
include/wait_for_slave_io_error.inc [errno=1040, 1053, 2002, 2003, 2006, 2013]
|
||||
set @@global.debug = "-d,'debug_lock.before_get_SERVER_ID'";
|
||||
include/rpl_start_server.inc [server_number=1]
|
||||
include/wait_for_slave_param.inc [Slave_IO_Running]
|
||||
set global debug= '';
|
||||
reset master;
|
||||
include/stop_slave.inc
|
||||
change master to master_port=SLAVE_PORT;
|
||||
start slave;
|
||||
*** must be having the replicate-same-server-id IO thread error ***
|
||||
Last_IO_Error = Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
**** On Master ****
|
||||
CREATE USER dummy@localhost;
|
||||
CREATE USER dummy1@localhost, dummy2@localhost;
|
||||
@@ -41,3 +37,4 @@ user host
|
||||
SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
|
||||
COUNT(*)
|
||||
0
|
||||
include/rpl_end.inc
|
||||
|
@@ -52,10 +52,12 @@ Variable_name Slave_heartbeat_period
|
||||
Value 0.500
|
||||
start slave;
|
||||
create table t1 (f1 int);
|
||||
include/check_slave_param.inc [Relay_Log_File]
|
||||
show status like 'Slave_heartbeat_period';;
|
||||
Variable_name Slave_heartbeat_period
|
||||
Value 0.500
|
||||
A heartbeat has been received by the slave
|
||||
drop table t1;
|
||||
set @@global.slave_net_timeout= @restore_slave_net_timeout;
|
||||
include/stop_slave.inc
|
||||
End of tests
|
||||
|
@@ -1,55 +1,33 @@
|
||||
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;
|
||||
|
||||
*** Preparing ***
|
||||
[on slave]
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1, MASTER_LOG_FILE='MASTER_BINLOG';
|
||||
include/start_slave.inc
|
||||
[on slave1]
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='MASTER_BINLOG';
|
||||
include/start_slave.inc
|
||||
|
||||
*** 2 slaves ***
|
||||
include/rpl_init.inc [topology=1->2,1->3]
|
||||
include/rpl_connect.inc [creating master]
|
||||
include/rpl_connect.inc [creating slave_1]
|
||||
include/rpl_connect.inc [creating slave_2]
|
||||
Slave has received heartbeat event
|
||||
Slave1 has received heartbeat event
|
||||
Slave has received more heartbeats than Slave1 (1 means 'yes'): 1
|
||||
slave_2 has received heartbeat event
|
||||
slave_1 has received more heartbeats than slave_2 (1 means 'yes'): 0
|
||||
|
||||
*** Master->data->Slave1->heartbeat->Slave: ***
|
||||
[on slave1]
|
||||
RESET MASTER;
|
||||
[on slave]
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=SLAVE1_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.2, MASTER_LOG_FILE='SLAVE1_BINLOG';
|
||||
include/start_slave.inc
|
||||
Slave has received heartbeat event
|
||||
include/rpl_stop_slaves.inc
|
||||
include/rpl_change_topology.inc [new topology=1->3->2]
|
||||
include/rpl_start_slaves.inc
|
||||
slave_1 has received heartbeat event
|
||||
[on master]
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10), c LONGTEXT);
|
||||
INSERT INTO t1 VALUES (1, 'on master', '');
|
||||
SHOW TABLES;
|
||||
Tables_in_test
|
||||
t1
|
||||
[on slave1]
|
||||
[on slave_2]
|
||||
SHOW TABLES;
|
||||
Tables_in_test
|
||||
t1
|
||||
[on slave]
|
||||
[on slave_1]
|
||||
SHOW TABLES;
|
||||
Tables_in_test
|
||||
[on master]
|
||||
creating updates on master and send to slave1 during 5 second
|
||||
[on slave]
|
||||
Slave has received heartbeats (1 means 'yes'): 1
|
||||
creating updates on master and send to slave_2 during 5 second
|
||||
[on slave_1]
|
||||
slave_1 has received heartbeats (1 means 'yes'): 0
|
||||
|
||||
*** Clean up ***
|
||||
DROP TABLE t1;
|
||||
|
||||
End of 6.0 test
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
|
||||
*** Preparing ***
|
||||
include/stop_slave.inc
|
||||
@@ -99,7 +95,7 @@ Slave_heartbeat_period 20.000
|
||||
*** Reload slave ***
|
||||
SET @@global.slave_net_timeout=50;
|
||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=30;
|
||||
Reload slave
|
||||
include/rpl_restart_server.inc [server_number=2]
|
||||
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
|
||||
Variable_name Value
|
||||
Slave_heartbeat_period 30.000
|
||||
@@ -189,19 +185,21 @@ include/start_slave.inc
|
||||
Heartbeat event received
|
||||
|
||||
*** Stopped IO thread ***
|
||||
STOP SLAVE IO_THREAD;
|
||||
include/stop_slave_io.inc
|
||||
Number of received heartbeat events while io thread stopped: 0
|
||||
|
||||
*** Started IO thread ***
|
||||
START SLAVE IO_THREAD;
|
||||
include/wait_for_slave_io_to_start.inc
|
||||
Heartbeat event received
|
||||
|
||||
*** Stopped SQL thread ***
|
||||
STOP SLAVE SQL_THREAD;
|
||||
include/stop_slave_sql.inc
|
||||
Heartbeat events are received while sql thread stopped (1 means 'yes'): 1
|
||||
|
||||
*** Started SQL thread ***
|
||||
START SLAVE SQL_THREAD;
|
||||
include/wait_for_slave_sql_to_start.inc
|
||||
Heartbeat event received
|
||||
|
||||
*** Stopped SQL thread by error ***
|
||||
@@ -259,21 +257,17 @@ Heartbeat events are received after reset of master (1 means 'yes'): 1
|
||||
*** Reload master ***
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1;
|
||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1, MASTER_CONNECT_RETRY = 5;
|
||||
include/start_slave.inc
|
||||
Heartbeat event received
|
||||
Reload master
|
||||
include/rpl_restart_server.inc [server_number=1]
|
||||
include/wait_for_slave_io_to_start.inc
|
||||
Heartbeat event received
|
||||
|
||||
*** Circular replication ***
|
||||
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;
|
||||
include/rpl_reset.inc
|
||||
include/stop_slave.inc
|
||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=SLAVE_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='SLAVE_BINLOG';
|
||||
include/rpl_change_topology.inc [new topology=1->2->1]
|
||||
include/start_slave.inc
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10));
|
||||
INSERT INTO t1 VALUES(1, 'on master');
|
||||
@@ -291,9 +285,6 @@ a b
|
||||
Heartbeat event received on master
|
||||
Heartbeat event received on slave
|
||||
*** Clean up ***
|
||||
include/stop_slave.inc
|
||||
DROP TABLE t1;
|
||||
include/stop_slave.inc
|
||||
SET @@global.slave_net_timeout=@restore_slave_net_timeout;
|
||||
|
||||
End of tests
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
|
||||
*** Heartbeat over SSL ***
|
||||
include/stop_slave.inc
|
||||
@@ -23,5 +19,10 @@ Master_SSL_Allowed: Yes
|
||||
Heartbeat event has received
|
||||
|
||||
*** Clean up ***
|
||||
|
||||
End of 6.0 test
|
||||
include/stop_slave.inc
|
||||
CHANGE MASTER TO
|
||||
MASTER_SSL=0,
|
||||
MASTER_SSL_CA='',
|
||||
MASTER_SSL_CERT='',
|
||||
MASTER_SSL_KEY='';
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032");
|
||||
call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
|
||||
call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
|
||||
@@ -33,8 +29,7 @@ SELECT * FROM t2 ORDER BY a;
|
||||
a
|
||||
-3
|
||||
-1
|
||||
Last_SQL_Error
|
||||
0
|
||||
include/check_slave_no_error.inc
|
||||
INSERT IGNORE INTO t1 VALUES (-2);
|
||||
INSERT IGNORE INTO t1 VALUES (-2);
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
@@ -47,8 +42,7 @@ a
|
||||
-3
|
||||
-2
|
||||
-1
|
||||
Last_SQL_Error
|
||||
0
|
||||
include/check_slave_no_error.inc
|
||||
UPDATE t1 SET a = 1 WHERE a = -1;
|
||||
UPDATE t2 SET a = 1 WHERE a = -1;
|
||||
UPDATE t1 SET a = 1 WHERE a = -1;
|
||||
@@ -71,7 +65,7 @@ SELECT * FROM t2 ORDER BY a;
|
||||
a
|
||||
-3
|
||||
1
|
||||
Last_SQL_Error
|
||||
0
|
||||
include/check_slave_no_error.inc
|
||||
DROP TABLE t1, t2;
|
||||
SET @@global.slave_exec_mode= @old_slave_exec_mode;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
delete from mysql.user where user=_binary'rpl_ignore_grant';
|
||||
delete from mysql.db where user=_binary'rpl_ignore_grant';
|
||||
flush privileges;
|
||||
@@ -35,3 +31,4 @@ flush privileges;
|
||||
delete from mysql.user where user=_binary'rpl_ignore_grant';
|
||||
delete from mysql.db where user=_binary'rpl_ignore_grant';
|
||||
flush privileges;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
|
||||
revoke select on *.* from 'user_foo'@'%';
|
||||
select select_priv from mysql.user where user='user_foo' /* master:must be N */;
|
||||
@@ -28,3 +24,4 @@ Y
|
||||
revoke select on *.* FROM 'user_foo';
|
||||
delete from mysql.user where user="user_foo";
|
||||
delete from mysql.user where user="user_foo";
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
**** Test case for BUG#16487 ****
|
||||
**** Master ****
|
||||
CREATE TABLE test.t4 (a int);
|
||||
@@ -142,4 +138,4 @@ HEX(word)
|
||||
SELECT * FROM tmptbl504451f4258$1;
|
||||
ERROR 42S02: Table 'test.tmptbl504451f4258$1' doesn't exist
|
||||
DROP TABLE t5;
|
||||
call mtr.force_restart();
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
use test;
|
||||
drop table if exists mysqltest_foo;
|
||||
drop table if exists mysqltest_bar;
|
||||
@@ -21,3 +17,4 @@ n m k
|
||||
4 15 55
|
||||
drop table mysqltest_foo,mysqltest_bar,t1;
|
||||
drop table mysqltest_foo,mysqltest_bar,t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
**** On Master ****
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
@@ -19,7 +15,8 @@ a
|
||||
2
|
||||
3
|
||||
4
|
||||
Last_SQL_Error = The incident LOST_EVENTS occured on the master. Message: <none>
|
||||
include/wait_for_slave_sql_error.inc [errno=1590]
|
||||
Last_SQL_Error = 'The incident LOST_EVENTS occured on the master. Message: <none>'
|
||||
**** On Slave ****
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
@@ -34,5 +31,6 @@ a
|
||||
2
|
||||
3
|
||||
4
|
||||
Checking that both slave threads are running.
|
||||
include/check_slave_is_running.inc
|
||||
DROP TABLE t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
set global max_connections=151;
|
||||
include/stop_slave.inc
|
||||
include/start_slave.inc
|
||||
@@ -25,6 +21,6 @@ set global init_connect="set @c=1";
|
||||
show variables like 'init_connect';
|
||||
Variable_name Value
|
||||
init_connect set @c=1
|
||||
include/stop_slave.inc
|
||||
set global init_connect= @my_global_init_connect;
|
||||
set global max_connections= default;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,19 +1,19 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
stop slave;
|
||||
reset slave;
|
||||
SET GLOBAL debug= "d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init";
|
||||
start slave;
|
||||
Reporting the following error: Failed during slave thread initialization
|
||||
include/wait_for_slave_sql_error.inc [errno=1593]
|
||||
Last_SQL_Error = 'Failed during slave thread initialization'
|
||||
call mtr.add_suppression("Failed during slave I/O thread initialization");
|
||||
SET GLOBAL debug= "";
|
||||
stop slave;
|
||||
reset slave;
|
||||
SET GLOBAL init_slave= "garbage";
|
||||
start slave;
|
||||
Reporting the following error: Slave SQL thread aborted. Can't execute init_slave query
|
||||
include/wait_for_slave_sql_error.inc [errno=1064]
|
||||
Last_SQL_Error = 'Slave SQL thread aborted. Can't execute init_slave query'
|
||||
SET GLOBAL init_slave= "";
|
||||
include/stop_slave_io.inc
|
||||
RESET SLAVE;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
use test;
|
||||
CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
|
||||
@@ -140,3 +136,4 @@ DROP PROCEDURE test.proc_byrange;
|
||||
DROP TABLE test.regular_tbl;
|
||||
DROP TABLE test.bykey_tbl;
|
||||
DROP TABLE test.byrange_tbl;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
use test;
|
||||
CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
|
||||
@@ -33,3 +29,4 @@ END|
|
||||
CALL test.proc_norm();
|
||||
DROP PROCEDURE test.proc_norm;
|
||||
DROP TABLE test.regular_tbl;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
==========MASTER==========
|
||||
show global variables like 'binlog_format%';
|
||||
Variable_name Value
|
||||
@@ -157,3 +153,4 @@ master-bin.000001 # Query # # use `test_rpl`; CREATE INDEX index2 on t2 (d)
|
||||
master-bin.000001 # Query # # use `test_rpl`; CREATE INDEX index3 on t2 (a, d)
|
||||
master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t2 DROP COLUMN d
|
||||
drop database test_rpl;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
==========MASTER==========
|
||||
show global variables like 'binlog_format%';
|
||||
Variable_name Value
|
||||
@@ -1102,3 +1098,4 @@ master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
drop database test_rpl;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,12 +1,8 @@
|
||||
#
|
||||
# Bug#20821: INSERT DELAYED fails to write some rows to binlog
|
||||
#
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
CREATE SCHEMA IF NOT EXISTS mysqlslap;
|
||||
USE mysqlslap;
|
||||
CREATE TABLE t1 (id INT, name VARCHAR(64));
|
||||
@@ -21,3 +17,4 @@ COUNT(*)
|
||||
#
|
||||
USE test;
|
||||
DROP SCHEMA mysqlslap;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,21 +1,14 @@
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
#
|
||||
# Setup
|
||||
#
|
||||
use test;
|
||||
drop table if exists t1, t2, t3;
|
||||
#
|
||||
# See if queries that use both auto_increment and LAST_INSERT_ID()
|
||||
# are replicated well
|
||||
#
|
||||
# We also check how the foreign_key_check variable is replicated
|
||||
#
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
SET @old_concurrent_insert= @@global.concurrent_insert;
|
||||
SET @@global.concurrent_insert= 0;
|
||||
create table t1(a int auto_increment, key(a)) engine=myisam;
|
||||
@@ -534,4 +527,4 @@ drop table t1, t2;
|
||||
drop procedure foo;
|
||||
SET @@global.concurrent_insert= @old_concurrent_insert;
|
||||
set @@session.sql_auto_is_null=default;
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
create table t1(a int auto_increment, primary key(a));
|
||||
create table t2(b int auto_increment, c int, primary key(b));
|
||||
insert into t1 values (1),(2),(3);
|
||||
@@ -74,3 +70,4 @@ SET FOREIGN_KEY_CHECKS=0;
|
||||
INSERT INTO t1 VALUES (1),(1);
|
||||
Got one of the listed errors
|
||||
drop table t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
CREATE TABLE t1 (
|
||||
a int unsigned not null auto_increment primary key,
|
||||
@@ -69,3 +65,4 @@ a b
|
||||
5 5
|
||||
6 6
|
||||
drop table t1, t2;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
create table t1 (n int not null primary key);
|
||||
insert into t1 values (1);
|
||||
create table t2 (n int);
|
||||
@@ -15,3 +11,4 @@ n
|
||||
1
|
||||
2
|
||||
drop table t1,t2;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
USE test;
|
||||
DROP VIEW IF EXISTS v1,v11;
|
||||
DROP TABLE IF EXISTS t1,t2,t3,t11,t12,t13;
|
||||
@@ -447,3 +443,4 @@ DROP FUNCTION IF EXISTS f1;
|
||||
DROP FUNCTION IF EXISTS f2;
|
||||
DROP EVENT IF EXISTS e1;
|
||||
DROP EVENT IF EXISTS e11;
|
||||
include/rpl_end.inc
|
||||
|
@@ -63,6 +63,4 @@ change master to master_host='127.0.0.1';
|
||||
Master-Host: 127.0.0.1
|
||||
change master to master_host='0:0:0:0:0:0:0:1';
|
||||
Master-Host: 0:0:0:0:0:0:0:1
|
||||
disconnect slave;
|
||||
disconnect master;
|
||||
connection default;
|
||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root';
|
||||
|
@@ -63,6 +63,4 @@ change master to master_host='127.0.0.1';
|
||||
Master-Host: 127.0.0.1
|
||||
change master to master_host='0:0:0:0:0:0:0:1';
|
||||
Master-Host: 0:0:0:0:0:0:0:1
|
||||
disconnect slave;
|
||||
disconnect master;
|
||||
connection default;
|
||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root';
|
||||
|
@@ -105,6 +105,4 @@ change master to master_host='127.0.0.1';
|
||||
Master-Host: 127.0.0.1
|
||||
change master to master_host='0:0000:0000:0:0000:FFFF:127.0.0.1';
|
||||
Master-Host: 0:0000:0000:0:0000:FFFF:127.0.0.1
|
||||
disconnect slave;
|
||||
disconnect master;
|
||||
connection default;
|
||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root';
|
||||
|
@@ -60,6 +60,4 @@ change master to master_host='127.0.0.1';
|
||||
Master-Host: 127.0.0.1
|
||||
change master to master_host='0:0:0:0:0:0:0:1';
|
||||
Master-Host: 0:0:0:0:0:0:0:1
|
||||
disconnect slave;
|
||||
disconnect master;
|
||||
connection default;
|
||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root';
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
DROP DATABASE IF EXISTS d1;
|
||||
DROP DATABASE IF EXISTS d2;
|
||||
DROP DATABASE IF EXISTS d3;
|
||||
@@ -59,62 +55,62 @@ CREATE VIEW v1 AS SELECT a FROM t1 WHERE a < 100;
|
||||
[on master1]
|
||||
CREATE DATABASE d2;
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
DROP DATABASE d1;
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
DROP DATABASE IF EXISTS d2;
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
CREATE EVENT e2
|
||||
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY
|
||||
DO INSERT INTO test.t1 VALUES (2);
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
DROP EVENT e1;
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
DROP EVENT IF EXISTS e2;
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
CREATE FUNCTION f2 () RETURNS INT DETERMINISTIC
|
||||
RETURN 1;
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
ALTER FUNCTION f1 SQL SECURITY INVOKER;
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
DROP FUNCTION f1;
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
CREATE PROCEDURE p2 (OUT rows INT)
|
||||
BEGIN
|
||||
SELECT COUNT(*) INTO rows FROM t2;
|
||||
END;
|
||||
//
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
ALTER PROCEDURE p1 SQL SECURITY INVOKER COMMENT 'return rows of table t1';
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
DROP PROCEDURE p1;
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
CREATE TABLE t2 (b int);
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
ALTER TABLE t1 ADD (d int);
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
RENAME TABLE t3 TO t4;
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
CREATE INDEX i2 on t1 (a);
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
DROP INDEX i1 on t1;
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
CREATE TABLE IF NOT EXISTS t4 (a int);
|
||||
CREATE TRIGGER tr2 BEFORE INSERT ON t4
|
||||
FOR EACH ROW BEGIN
|
||||
@@ -122,28 +118,28 @@ DELETE FROM t1 WHERE a=NEW.a;
|
||||
END;
|
||||
//
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
DROP TRIGGER tr1;
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
DROP TRIGGER IF EXISTS tr2;
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
CREATE VIEW v2 AS SELECT a FROM t1 WHERE a > 100;
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
DROP VIEW v1;
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
DROP VIEW IF EXISTS v2;
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
DROP TABLE t1;
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
DROP TABLE IF EXISTS t2;
|
||||
source include/kill_query.inc;
|
||||
source include/diff_master_slave.inc;
|
||||
include/rpl_diff.inc
|
||||
DROP DATABASE IF EXISTS d1;
|
||||
DROP DATABASE IF EXISTS d2;
|
||||
DROP DATABASE IF EXISTS d3;
|
||||
@@ -168,3 +164,4 @@ DROP PROCEDURE IF EXISTS p1;
|
||||
DROP PROCEDURE IF EXISTS p2;
|
||||
DROP PROCEDURE IF EXISTS p3;
|
||||
DROP PROCEDURE IF EXISTS p4;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT,
|
||||
UNIQUE(b));
|
||||
INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10;
|
||||
@@ -11,14 +7,17 @@ SELECT * FROM t1;
|
||||
a b
|
||||
1 10
|
||||
2 2
|
||||
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'
|
||||
include/wait_for_slave_sql_error.inc [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;
|
||||
a b
|
||||
stop slave;
|
||||
include/wait_for_slave_to_stop.inc
|
||||
reset slave;
|
||||
reset master;
|
||||
drop table t1;
|
||||
start slave;
|
||||
include/wait_for_slave_to_start.inc
|
||||
CREATE TABLE t1 (
|
||||
id bigint(20) unsigned NOT NULL auto_increment,
|
||||
field_1 int(10) unsigned NOT NULL,
|
||||
@@ -56,12 +55,16 @@ id field_1 field_2 field_3
|
||||
4 4 d 4d
|
||||
5 5 e 5e
|
||||
6 6 f 6f
|
||||
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)
|
||||
include/wait_for_slave_sql_error.inc [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'
|
||||
t1.field_3 = t2.field_c''
|
||||
SELECT * FROM t1;
|
||||
id field_1 field_2 field_3
|
||||
drop table t1, t2;
|
||||
drop table t1, t2;
|
||||
include/stop_slave_io.inc
|
||||
RESET SLAVE;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,10 +1,5 @@
|
||||
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;
|
||||
reset master;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
select last_insert_id();
|
||||
last_insert_id()
|
||||
0
|
||||
@@ -32,32 +27,27 @@ drop table t3;
|
||||
create table t1(a int, b int, unique(b));
|
||||
insert into t1 values(1,10);
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
set global sql_slave_skip_counter=1;
|
||||
start slave;
|
||||
Last_SQL_Errno=0
|
||||
Last_SQL_Error
|
||||
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
|
||||
include/check_slave_no_error.inc
|
||||
set sql_log_bin=0;
|
||||
delete from t1;
|
||||
set sql_log_bin=1;
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
stop slave;
|
||||
include/wait_for_slave_sql_error.inc [errno=1062]
|
||||
include/stop_slave_io.inc
|
||||
change master to master_user='test';
|
||||
change master to master_user='root';
|
||||
Last_SQL_Errno=0
|
||||
Last_SQL_Error
|
||||
|
||||
include/check_slave_no_error.inc
|
||||
set global sql_slave_skip_counter=1;
|
||||
start slave;
|
||||
set sql_log_bin=0;
|
||||
delete from t1;
|
||||
set sql_log_bin=1;
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
include/wait_for_slave_sql_error.inc [errno=1062]
|
||||
stop slave;
|
||||
reset slave;
|
||||
Last_SQL_Errno=0
|
||||
Last_SQL_Error
|
||||
|
||||
include/check_slave_no_error.inc
|
||||
reset master;
|
||||
create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
|
||||
unique(day)) engine=MyISAM;
|
||||
@@ -80,18 +70,14 @@ load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
|
||||
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
|
||||
'\n##\n' starting by '>' ignore 1 lines;
|
||||
ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
|
||||
include/wait_for_slave_sql_error.inc [errno=0]
|
||||
drop table t1, t2;
|
||||
drop table t1, t2;
|
||||
CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
|
||||
LOAD DATA INFILE "../../std_data/words.dat" INTO TABLE t1;
|
||||
ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY'
|
||||
DROP TABLE IF EXISTS t1;
|
||||
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;
|
||||
DROP TABLE t1;
|
||||
include/rpl_reset.inc
|
||||
drop database if exists b48297_db1;
|
||||
drop database if exists b42897_db2;
|
||||
create database b48297_db1;
|
||||
@@ -112,15 +98,10 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE t1;
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1;
|
||||
### disconnect and switch back to master connection
|
||||
use b48297_db1;
|
||||
Comparing tables master:b48297_db1.t1 and slave:b48297_db1.t1
|
||||
include/diff_tables.inc [master:b48297_db1.t1, slave:b48297_db1.t1]
|
||||
DROP DATABASE b48297_db1;
|
||||
DROP DATABASE b42897_db2;
|
||||
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;
|
||||
include/rpl_reset.inc
|
||||
use test;
|
||||
CREATE TABLE t1 (`key` TEXT, `text` TEXT);
|
||||
LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ',';
|
||||
@@ -132,3 +113,4 @@ Field 3 'Field 4'
|
||||
'Field 5' 'Field 6'
|
||||
Field 6 'Field 7'
|
||||
DROP TABLE t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
create table t1 (a varchar(10) character set utf8);
|
||||
load data infile '../../std_data/loaddata6.dat' into table t1;
|
||||
set @@character_set_database=koi8r;
|
||||
@@ -76,3 +72,4 @@ E4B880E4BA8CE4B889
|
||||
E59B9BE4BA94E585AD
|
||||
E4B883E585ABE4B99D
|
||||
DROP DATABASE mysqltest;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,14 +1,9 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
CREATE TABLE t1 (a INT, b INT);
|
||||
INSERT INTO t1 VALUES (1,10);
|
||||
LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Fatal error: Not enough memory
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1593]
|
||||
Last_SQL_Error = 'Fatal error: Not enough memory'
|
||||
DROP TABLE t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
drop database if exists mysqltest;
|
||||
USE test;
|
||||
CREATE TABLE t1(a INT, b INT, UNIQUE(b));
|
||||
@@ -38,3 +34,4 @@ COUNT(*)
|
||||
2
|
||||
DROP DATABASE mysqltest;
|
||||
DROP TABLE test.t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
==== Create a big file ====
|
||||
==== Load our big file into a table ====
|
||||
create table t2 (id int not null primary key auto_increment);
|
||||
@@ -31,3 +27,4 @@ count(*)
|
||||
==== Clean up ====
|
||||
[on master]
|
||||
drop table t2;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1,9 +1,5 @@
|
||||
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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
reset master;
|
||||
create table test.t1(a int, b int, unique(b));
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
|
||||
@@ -13,3 +9,4 @@ count(*)
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
drop table test.t1;
|
||||
include/rpl_end.inc
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user