mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge with MySQL 5.1.55
- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria" - Fixed wrong assert in Aria Now need to merge with latest xtradb before pushing sql/ha_partition.cc: Ensure that m_ordered_rec_buffer is not freed before close. sql/mysqld.cc: Changed to use opt_stack_trace instead of opt_pstack. Removed references to pstack sql/partition_element.h: Ensure that connect_string is initialized storage/maria/ma_key_recover.c: Fixed wrong assert
This commit is contained in:
@ -1,6 +1,4 @@
|
||||
#########################################
|
||||
# Author: Serge Kozlov skozlov@mysql.com
|
||||
# Date: 07/10/2006
|
||||
# Purpose: testing the replication in mixed mode
|
||||
# Requirements: define binlog format for mysqld as in example below:
|
||||
# ./mysql-test-run.pl --mysqld=--binlog-format=mixed
|
||||
@ -82,3 +80,4 @@ sync_slave_with_master;
|
||||
# the files your self to see what is not matching
|
||||
|
||||
--diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql
|
||||
--source include/rpl_end.inc
|
||||
|
@ -1,6 +1,4 @@
|
||||
#########################################
|
||||
# Author: Serge Kozlov skozlov@mysql.com
|
||||
# Date: 07/10/2006
|
||||
# Purpose: testing the replication in mixed mode
|
||||
# Requirements: define binlog format for mysqld as in example below:
|
||||
# ./mysql-test-run.pl --mysqld=--binlog-format=mixed
|
||||
@ -342,3 +340,4 @@ sync_slave_with_master;
|
||||
# the files your self to see what is not matching
|
||||
|
||||
--diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql
|
||||
--source include/rpl_end.inc
|
||||
|
@ -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
|
13
mysql-test/suite/rpl/r/rpl_000011.result
Normal file
13
mysql-test/suite/rpl/r/rpl_000011.result
Normal file
@ -0,0 +1,13 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
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;
|
||||
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,14 +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;
|
||||
stop slave;
|
||||
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;
|
||||
@ -16,3 +10,4 @@ n
|
||||
24
|
||||
drop table t1;
|
||||
delete from mysql.user where user="replicate";
|
||||
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:
|
||||
Error 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;
|
||||
@ -35,7 +30,8 @@ ALTER TABLE t1 CHANGE b c INT;
|
||||
ALTER TABLE t2 CHANGE b c VARCHAR(255);
|
||||
|
||||
INSERT INTO t1 (a) VALUES(2);
|
||||
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, t2;
|
||||
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,12 @@ 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='';
|
||||
@ -341,3 +332,21 @@ DROP TABLE slave_only;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t_ignored1;
|
||||
DROP TABLE t_ignored2;
|
||||
CREATE TABLE t1 (id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, data INT) ENGINE=innodb;
|
||||
BEGIN;
|
||||
# Set sql_mode with NO_AUTO_VALUE_ON_ZERO for allowing
|
||||
# zero to fill the auto_increment field.
|
||||
SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
|
||||
INSERT INTO t1(id,data) VALUES(0,2);
|
||||
# Resetting sql_mode without NO_AUTO_VALUE_ON_ZERO to
|
||||
# affect the execution of the transaction on slave.
|
||||
SET SQL_MODE=0;
|
||||
COMMIT;
|
||||
SELECT * FROM t1;
|
||||
id data
|
||||
0 2
|
||||
SELECT * FROM t1;
|
||||
id data
|
||||
0 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]
|
||||
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]
|
||||
DROP DATABASE IF EXISTS db1;
|
||||
DROP DATABASE IF EXISTS db2;
|
||||
CREATE DATABASE db1;
|
||||
@ -49,6 +45,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
|
||||
#
|
||||
@ -87,6 +84,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
|
||||
#
|
||||
@ -105,6 +103,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
|
||||
@ -167,3 +166,4 @@ a
|
||||
#
|
||||
DROP DATABASE db1;
|
||||
DROP DATABASE db2;
|
||||
include/rpl_end.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
|
||||
|
278
mysql-test/suite/rpl/r/rpl_binlog_errors.result
Normal file
278
mysql-test/suite/rpl/r/rpl_binlog_errors.result
Normal file
@ -0,0 +1,278 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
#######################################################################
|
||||
####################### PART 1: MASTER TESTS ##########################
|
||||
#######################################################################
|
||||
include/stop_slave.inc
|
||||
call mtr.add_suppression("Can't generate a unique log-filename");
|
||||
call mtr.add_suppression("Writing one row to the row-based binary log failed.*");
|
||||
call mtr.add_suppression("Error writing file .*");
|
||||
SET @old_debug= @@global.debug;
|
||||
SELECT repeat('x',8192) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data';
|
||||
SELECT repeat('x',10) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_46166-2.data';
|
||||
RESET MASTER;
|
||||
###################### TEST #1
|
||||
FLUSH LOGS;
|
||||
# assert: must show two binlogs
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
master-bin.000001 #
|
||||
master-bin.000002 #
|
||||
###################### TEST #2
|
||||
RESET MASTER;
|
||||
SET GLOBAL debug="+d,error_unique_log_filename";
|
||||
FLUSH LOGS;
|
||||
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
||||
|
||||
# assert: must show one binlog
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
master-bin.000001 #
|
||||
SET GLOBAL debug="";
|
||||
RESET MASTER;
|
||||
###################### TEST #3
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2 (a VARCHAR(16384)) Engine=InnoDB;
|
||||
CREATE TABLE t4 (a VARCHAR(16384));
|
||||
INSERT INTO t1 VALUES (1);
|
||||
RESET MASTER;
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
|
||||
# assert: must show two binlog
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
master-bin.000001 #
|
||||
master-bin.000002 #
|
||||
SET GLOBAL debug="-d,error_unique_log_filename";
|
||||
DELETE FROM t2;
|
||||
RESET MASTER;
|
||||
###################### TEST #4
|
||||
SET GLOBAL debug="+d,error_unique_log_filename";
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
|
||||
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
||||
|
||||
# assert: must show one entry
|
||||
SELECT count(*) FROM t2;
|
||||
count(*)
|
||||
1
|
||||
SET GLOBAL debug="-d,error_unique_log_filename";
|
||||
DELETE FROM t2;
|
||||
RESET MASTER;
|
||||
###################### TEST #5
|
||||
SET GLOBAL debug="+d,error_unique_log_filename";
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166-2.data' INTO TABLE t2;
|
||||
# assert: must show one entry
|
||||
SELECT count(*) FROM t2;
|
||||
count(*)
|
||||
1
|
||||
SET GLOBAL debug="-d,error_unique_log_filename";
|
||||
DELETE FROM t2;
|
||||
RESET MASTER;
|
||||
###################### TEST #6
|
||||
SET GLOBAL debug="+d,error_unique_log_filename";
|
||||
SET AUTOCOMMIT=0;
|
||||
INSERT INTO t2 VALUES ('muse');
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
|
||||
INSERT INTO t2 VALUES ('muse');
|
||||
COMMIT;
|
||||
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
||||
|
||||
# assert: must show three entries
|
||||
SELECT count(*) FROM t2;
|
||||
count(*)
|
||||
3
|
||||
SET AUTOCOMMIT= 1;
|
||||
SET GLOBAL debug="-d,error_unique_log_filename";
|
||||
DELETE FROM t2;
|
||||
RESET MASTER;
|
||||
###################### TEST #7
|
||||
SET GLOBAL debug="+d,error_unique_log_filename";
|
||||
SELECT count(*) FROM t4;
|
||||
count(*)
|
||||
0
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t4;
|
||||
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
||||
|
||||
# assert: must show 1 entry
|
||||
SELECT count(*) FROM t4;
|
||||
count(*)
|
||||
1
|
||||
### check that the incident event is written to the current log
|
||||
SET GLOBAL debug="-d,error_unique_log_filename";
|
||||
FLUSH LOGS;
|
||||
SHOW BINLOG EVENTS IN 'BINLOG_FILE' FROM <binlog_start> LIMIT 1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
BINLOG_FILE # Incident # # #1 (LOST_EVENTS)
|
||||
DELETE FROM t4;
|
||||
RESET MASTER;
|
||||
###################### TEST #8
|
||||
SET GLOBAL debug="+d,error_unique_log_filename";
|
||||
# must show 0 entries
|
||||
SELECT count(*) FROM t4;
|
||||
count(*)
|
||||
0
|
||||
SELECT count(*) FROM t2;
|
||||
count(*)
|
||||
0
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t4;
|
||||
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
||||
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
|
||||
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
||||
|
||||
INSERT INTO t2 VALUES ('aaa'), ('bbb'), ('ccc');
|
||||
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
||||
|
||||
# INFO: Count(*) Before Offending DELETEs
|
||||
# assert: must show 1 entry
|
||||
SELECT count(*) FROM t4;
|
||||
count(*)
|
||||
1
|
||||
# assert: must show 4 entries
|
||||
SELECT count(*) FROM t2;
|
||||
count(*)
|
||||
4
|
||||
DELETE FROM t4;
|
||||
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
||||
|
||||
DELETE FROM t2;
|
||||
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
||||
|
||||
# INFO: Count(*) After Offending DELETEs
|
||||
# assert: must show zero entries
|
||||
SELECT count(*) FROM t4;
|
||||
count(*)
|
||||
0
|
||||
SELECT count(*) FROM t2;
|
||||
count(*)
|
||||
0
|
||||
SET GLOBAL debug="-d,error_unique_log_filename";
|
||||
###################### TEST #9
|
||||
SET GLOBAL debug="+d,error_unique_log_filename";
|
||||
SET SQL_LOG_BIN=0;
|
||||
INSERT INTO t2 VALUES ('aaa'), ('bbb'), ('ccc'), ('ddd');
|
||||
INSERT INTO t4 VALUES ('eee'), ('fff'), ('ggg'), ('hhh');
|
||||
# assert: must show four entries
|
||||
SELECT count(*) FROM t2;
|
||||
count(*)
|
||||
4
|
||||
SELECT count(*) FROM t4;
|
||||
count(*)
|
||||
4
|
||||
DELETE FROM t2;
|
||||
DELETE FROM t4;
|
||||
# assert: must show zero entries
|
||||
SELECT count(*) FROM t2;
|
||||
count(*)
|
||||
0
|
||||
SELECT count(*) FROM t4;
|
||||
count(*)
|
||||
0
|
||||
SET SQL_LOG_BIN=1;
|
||||
SET GLOBAL debug="-d,error_unique_log_filename";
|
||||
###################### TEST #10
|
||||
call mtr.add_suppression("MSYQL_BIN_LOG::open failed to sync the index file.");
|
||||
call mtr.add_suppression("Could not open .*");
|
||||
RESET MASTER;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SET GLOBAL debug="+d,fault_injection_registering_index";
|
||||
FLUSH LOGS;
|
||||
ERROR HY000: Can't open file: 'master-bin.000002' (errno: 1)
|
||||
SET GLOBAL debug="-d,fault_injection_registering_index";
|
||||
SHOW BINARY LOGS;
|
||||
ERROR HY000: You are not using binary logging
|
||||
CREATE TABLE t5 (a INT);
|
||||
INSERT INTO t4 VALUES ('bbbbb');
|
||||
INSERT INTO t2 VALUES ('aaaaa');
|
||||
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)
|
||||
SET GLOBAL debug="-d,fault_injection_openning_index";
|
||||
RESET MASTER;
|
||||
ERROR HY000: Binlog closed, cannot RESET MASTER
|
||||
CREATE TABLE t5 (a INT);
|
||||
INSERT INTO t4 VALUES ('bbbbb');
|
||||
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;
|
||||
ERROR HY000: Can't open file: 'master-bin' (errno: 2)
|
||||
SET GLOBAL debug="-d,fault_injection_new_file_rotate_event";
|
||||
RESET MASTER;
|
||||
ERROR HY000: Binlog closed, cannot RESET MASTER
|
||||
CREATE TABLE t5 (a INT);
|
||||
INSERT INTO t4 VALUES ('bbbbb');
|
||||
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;
|
||||
include/start_slave.inc
|
||||
#######################################################################
|
||||
####################### PART 2: SLAVE TESTS ###########################
|
||||
#######################################################################
|
||||
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 .*");
|
||||
call mtr.add_suppression("MSYQL_BIN_LOG::open failed to sync the index file.");
|
||||
call mtr.add_suppression("Can't generate a unique log-filename .*");
|
||||
###################### TEST #13
|
||||
SET @old_debug=@@global.debug;
|
||||
include/stop_slave.inc
|
||||
SET GLOBAL debug="+d,error_unique_log_filename";
|
||||
START SLAVE io_thread;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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/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/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 d1;
|
||||
create database d1;
|
||||
use d1;
|
||||
@ -30,3 +26,4 @@ Grants for x@y
|
||||
GRANT USAGE ON *.* TO 'x'@'y'
|
||||
drop user x@y;
|
||||
drop database d1;
|
||||
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_binlog_cache_size = 4096;
|
||||
SET GLOBAL binlog_cache_size = 4096;
|
||||
CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
||||
@ -17,14 +13,11 @@ Got one of the listed errors
|
||||
*** Single statement on non-transactional table ***
|
||||
*** After WL#2687 the difference between STATEMENT/MIXED and ROW will not exist. ***
|
||||
Got one of the listed errors
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1590]
|
||||
*** Single statement on both transactional and non-transactional tables. ***
|
||||
*** After WL#2687 we will be able to change the order of the tables. ***
|
||||
Got one of the listed errors
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1590]
|
||||
TRUNCATE TABLE t1;
|
||||
TRUNCATE TABLE t2;
|
||||
TRUNCATE TABLE t3;
|
||||
@ -39,7 +32,7 @@ Got one of the listed errors
|
||||
BEGIN;
|
||||
Got one of the listed errors
|
||||
Got one of the listed errors
|
||||
source include/diff_master_slave.inc;
|
||||
include/diff_tables.inc [master:t1,slave:t1]
|
||||
########################################################################################
|
||||
# 3 - BEGIN - COMMIT
|
||||
########################################################################################
|
||||
@ -51,7 +44,7 @@ Got one of the listed errors
|
||||
Got one of the listed errors
|
||||
Got one of the listed errors
|
||||
COMMIT;
|
||||
source include/diff_master_slave.inc;
|
||||
include/diff_tables.inc [master:t1,slave:t1]
|
||||
########################################################################################
|
||||
# 4 - BEGIN - ROLLBACK
|
||||
########################################################################################
|
||||
@ -65,7 +58,7 @@ Got one of the listed errors
|
||||
ROLLBACK;
|
||||
Warnings:
|
||||
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||
source include/diff_master_slave.inc;
|
||||
include/diff_tables.inc [master:t1,slave:t1]
|
||||
########################################################################################
|
||||
# 5 - PROCEDURE
|
||||
########################################################################################
|
||||
@ -89,7 +82,7 @@ TRUNCATE TABLE t1;
|
||||
BEGIN;
|
||||
Got one of the listed errors
|
||||
ROLLBACK;
|
||||
source include/diff_master_slave.inc;
|
||||
include/diff_tables.inc [master:t1,slave:t1]
|
||||
########################################################################################
|
||||
# 6 - XID
|
||||
########################################################################################
|
||||
@ -104,7 +97,7 @@ ROLLBACK TO sv;
|
||||
Warnings:
|
||||
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||
COMMIT;
|
||||
source include/diff_master_slave.inc;
|
||||
include/diff_tables.inc [master:t1,slave:t1]
|
||||
########################################################################################
|
||||
# 7 - NON-TRANS TABLE
|
||||
########################################################################################
|
||||
@ -121,9 +114,7 @@ COMMIT;
|
||||
BEGIN;
|
||||
Got one of the listed errors
|
||||
COMMIT;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1590]
|
||||
########################################################################
|
||||
# 8 - Bug#55375(Regression Bug) Transaction bigger than
|
||||
# max_binlog_cache_size crashes slave
|
||||
@ -140,6 +131,7 @@ SET GLOBAL binlog_cache_size= ORIGINAL_VALUE;
|
||||
BEGIN;
|
||||
Repeat statement 'INSERT INTO t1 VALUES($n, repeat("a", 32))' 128 times
|
||||
COMMIT;
|
||||
include/wait_for_slave_sql_error.inc [errno=1197]
|
||||
SELECT count(*) FROM t1;
|
||||
count(*)
|
||||
0
|
||||
@ -159,6 +151,6 @@ DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t3;
|
||||
DROP TABLE IF EXISTS t4;
|
||||
DROP TABLE IF EXISTS t5;
|
||||
DROP TABLE IF EXISTS t6;
|
||||
DROP TABLE t5;
|
||||
DROP PROCEDURE p1;
|
||||
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]
|
||||
CREATE TABLE t1 (a INT, b INT, c INT);
|
||||
CREATE TABLE t2 (a INT, b INT, c INT);
|
||||
ALTER TABLE t1 ENGINE=BLACKHOLE;
|
||||
@ -98,4 +94,5 @@ SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
>>> Something was written to binary log <<<
|
||||
drop table t1,t2;
|
||||
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]
|
||||
CREATE DATABASE track;
|
||||
USE track;
|
||||
CREATE TABLE `visits` (
|
||||
@ -67,3 +63,4 @@ event_id visit_id timestamp src data visits_events_id
|
||||
20000 21231038 2007-09-18 03:59:02 Downloads/MySQL-4.1/mysql-4.1.12a-win32.zip 33712207
|
||||
DROP DATABASE track;
|
||||
End of 5.1 tests
|
||||
include/rpl_end.inc
|
||||
|
@ -1,8 +1,12 @@
|
||||
reset master;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
call mtr.add_suppression("Failed during slave I/O thread initialization");
|
||||
stop slave;
|
||||
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,7 +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;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
call mtr.add_suppression("Aborted connection");
|
||||
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,3 +15,4 @@ n
|
||||
1
|
||||
2
|
||||
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;
|
||||
@ -142,3 +136,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,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;
|
||||
**** Testing WL#3228 changes. ****
|
||||
*** Create "wider" table on slave ***
|
||||
@ -177,3 +173,4 @@ t1 CREATE TABLE `t1` (
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
*** Cleanup ***
|
||||
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 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]
|
||||
########################################################################
|
||||
# Environment
|
||||
########################################################################
|
||||
@ -101,11 +97,12 @@ master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 1' WHERE f
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (1 * 10),"brown")
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"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
|
||||
@ -17,7 +13,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT)
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; /* 99999 --- */INSERT /*!INTO*/ /*!10000 t1 */ VALUES(10) /* 99999 ,(11)*/
|
||||
Comparing tables master:test.t1 and slave:test.t1
|
||||
include/diff_tables.inc [master:t1,slave:t1]
|
||||
|
||||
# Case 2:
|
||||
# -----------------------------------------------------------------
|
||||
@ -28,7 +24,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)*/';
|
||||
@ -46,7 +42,7 @@ master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla */ t1 VALU
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT)
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla */ t1 VALUES(62) /* 99999 ,(63)*/
|
||||
Comparing tables master:test.t1 and slave:test.t1
|
||||
include/diff_tables.inc [master:t1,slave:t1]
|
||||
|
||||
# Case 3:
|
||||
# -----------------------------------------------------------------
|
||||
@ -55,3 +51,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;
|
||||
@ -74,3 +70,4 @@ CREATE TABLE IF NOT EXISTS t1
|
||||
AS SELECT SLEEP(3);
|
||||
KILL QUERY master1;
|
||||
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;
|
||||
CREATE TEMPORARY TABLE IF NOT EXISTS tmp(c1 int);
|
||||
CREATE TEMPORARY TABLE IF NOT EXISTS tmp(c1 int);
|
||||
@ -25,3 +21,4 @@ master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS `
|
||||
)
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`tmp2` (`c1`) SELECT * FROM tmp
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
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,25 +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;
|
||||
|
||||
# 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%';
|
||||
@ -41,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
|
||||
@ -127,7 +108,7 @@ SELECT * FROM t1;
|
||||
c1
|
||||
@
|
||||
1234
|
||||
# [On slave2]
|
||||
# [On server_3]
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
@
|
||||
@ -145,7 +126,7 @@ SELECT * FROM t1;
|
||||
c1
|
||||
@
|
||||
@
|
||||
# [On slave2]
|
||||
# [On server_3]
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
@
|
||||
@ -159,7 +140,7 @@ c1
|
||||
# [On slave]
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
# [On slave2]
|
||||
# [On server_3]
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
# [On master]
|
||||
@ -187,7 +168,7 @@ c1
|
||||
SELECT * FROM t2;
|
||||
c1
|
||||
@
|
||||
# [On slave2]
|
||||
# [On server_3]
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
@
|
||||
@ -203,3 +184,4 @@ DROP PROCEDURE my_grant;
|
||||
DROP PROCEDURE my_revoke;
|
||||
DROP FUNCTION my_user;
|
||||
DROP EVENT e1;
|
||||
include/rpl_end.inc
|
||||
|
@ -1,15 +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]
|
||||
|
||||
-------- switch to master -------
|
||||
SET AUTOCOMMIT = 1;
|
||||
DROP DATABASE IF EXISTS mysqltest1;
|
||||
DROP DATABASE IF EXISTS mysqltest2;
|
||||
DROP DATABASE IF EXISTS mysqltest3;
|
||||
CREATE DATABASE mysqltest1;
|
||||
CREATE DATABASE mysqltest2;
|
||||
CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE=InnoDB;
|
||||
@ -1626,3 +1619,4 @@ use test;
|
||||
-------- switch to master -------
|
||||
DROP DATABASE mysqltest1;
|
||||
DROP DATABASE mysqltest3;
|
||||
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,21 +163,13 @@ DROP FUNCTION upgrade_del_func;
|
||||
DROP FUNCTION upgrade_alter_func;
|
||||
DROP DATABASE bug42217_db;
|
||||
stop slave;
|
||||
SET SQL_LOG_BIN= 0;
|
||||
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;
|
||||
SET SQL_LOG_BIN= 1;
|
||||
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';
|
||||
@ -189,12 +177,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';
|
||||
@ -247,12 +230,7 @@ GRANT ALL PRIVILEGES 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
|
||||
@ -260,15 +238,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
|
||||
@ -285,3 +259,4 @@ Grantor
|
||||
root@localhost
|
||||
DROP USER user_bug27606@localhost;
|
||||
"End of test"
|
||||
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 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'
|
||||
@ -32,3 +27,4 @@ DROP FUNCTION f1;
|
||||
DROP TABLE t2, t3;
|
||||
SET @@global.binlog_format= @old_binlog_format;
|
||||
SET @@global.binlog_format= @old_binlog_format;
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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,3 +22,4 @@ CREATE TEMPORARY TABLE tmp3 (a int);
|
||||
DROP TEMPORARY TABLE tmp3;
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
START 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]
|
||||
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]
|
||||
load table t1 from master;
|
||||
ERROR 08S01: Error connecting to master: Master is not configured
|
||||
load table t1 from master;
|
||||
ERROR HY000: Error from master: 'Table 'test.t1' doesn't exist'
|
||||
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("Statement may not be safe to log in statement format.");
|
||||
create table t1 (a int primary key);
|
||||
create table t4 (a int primary key);
|
||||
@ -41,3 +37,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;
|
||||
set binlog_format=row;
|
||||
@ -257,3 +253,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]
|
||||
set binlog_format=row;
|
||||
|
||||
***********************************************************
|
||||
@ -91,7 +87,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 *****
|
||||
|
||||
@ -428,7 +424,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 *
|
||||
@ -464,10 +460,8 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254'
|
||||
|
||||
*** Drop t10 ***
|
||||
DROP TABLE t10;
|
||||
@ -502,10 +496,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15'
|
||||
|
||||
*** Drop t11 ***
|
||||
DROP TABLE t11;
|
||||
@ -616,7 +608,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;
|
||||
|
||||
@ -664,7 +657,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;
|
||||
|
||||
@ -712,7 +706,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;
|
||||
|
||||
@ -876,7 +871,6 @@ c1 hex(c4) c5
|
||||
2 6231623162316231 JOE
|
||||
3 6231623162316231 QA
|
||||
DROP TABLE t5;
|
||||
|
||||
set binlog_format=statement;
|
||||
|
||||
***********************************************************
|
||||
@ -964,7 +958,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 *****
|
||||
|
||||
@ -1301,7 +1295,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 *
|
||||
@ -1337,10 +1331,8 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254'
|
||||
|
||||
*** Drop t10 ***
|
||||
DROP TABLE t10;
|
||||
@ -1375,10 +1367,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15'
|
||||
|
||||
*** Drop t11 ***
|
||||
DROP TABLE t11;
|
||||
@ -1489,7 +1479,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;
|
||||
|
||||
@ -1537,7 +1528,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;
|
||||
|
||||
@ -1585,7 +1577,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;
|
||||
|
||||
@ -1749,7 +1742,6 @@ c1 hex(c4) c5
|
||||
2 6231623162316231 JOE
|
||||
3 6231623162316231 QA
|
||||
DROP TABLE t5;
|
||||
|
||||
set binlog_format=mixed;
|
||||
|
||||
***********************************************************
|
||||
@ -1837,7 +1829,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 *****
|
||||
|
||||
@ -2174,7 +2166,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 *
|
||||
@ -2210,10 +2202,8 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254'
|
||||
|
||||
*** Drop t10 ***
|
||||
DROP TABLE t10;
|
||||
@ -2248,10 +2238,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15'
|
||||
|
||||
*** Drop t11 ***
|
||||
DROP TABLE t11;
|
||||
@ -2362,7 +2350,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;
|
||||
|
||||
@ -2410,7 +2399,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;
|
||||
|
||||
@ -2458,7 +2448,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;
|
||||
|
||||
@ -2622,4 +2613,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]
|
||||
set binlog_format=row;
|
||||
|
||||
***********************************************************
|
||||
@ -91,7 +87,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 *****
|
||||
|
||||
@ -428,7 +424,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 *
|
||||
@ -464,10 +460,8 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254'
|
||||
|
||||
*** Drop t10 ***
|
||||
DROP TABLE t10;
|
||||
@ -502,10 +496,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15'
|
||||
|
||||
*** Drop t11 ***
|
||||
DROP TABLE t11;
|
||||
@ -616,7 +608,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;
|
||||
|
||||
@ -664,7 +657,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;
|
||||
|
||||
@ -712,7 +706,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;
|
||||
|
||||
@ -876,7 +871,6 @@ c1 hex(c4) c5
|
||||
2 6231623162316231 JOE
|
||||
3 6231623162316231 QA
|
||||
DROP TABLE t5;
|
||||
|
||||
set binlog_format=statement;
|
||||
|
||||
***********************************************************
|
||||
@ -964,7 +958,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 *****
|
||||
|
||||
@ -1301,7 +1295,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 *
|
||||
@ -1337,10 +1331,8 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254'
|
||||
|
||||
*** Drop t10 ***
|
||||
DROP TABLE t10;
|
||||
@ -1375,10 +1367,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15'
|
||||
|
||||
*** Drop t11 ***
|
||||
DROP TABLE t11;
|
||||
@ -1489,7 +1479,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;
|
||||
|
||||
@ -1537,7 +1528,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;
|
||||
|
||||
@ -1585,7 +1577,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;
|
||||
|
||||
@ -1749,7 +1742,6 @@ c1 hex(c4) c5
|
||||
2 6231623162316231 JOE
|
||||
3 6231623162316231 QA
|
||||
DROP TABLE t5;
|
||||
|
||||
set binlog_format=mixed;
|
||||
|
||||
***********************************************************
|
||||
@ -1837,7 +1829,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 *****
|
||||
|
||||
@ -2174,7 +2166,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 *
|
||||
@ -2210,10 +2202,8 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254'
|
||||
|
||||
*** Drop t10 ***
|
||||
DROP TABLE t10;
|
||||
@ -2248,10 +2238,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15'
|
||||
|
||||
*** Drop t11 ***
|
||||
DROP TABLE t11;
|
||||
@ -2362,7 +2350,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;
|
||||
|
||||
@ -2410,7 +2399,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;
|
||||
|
||||
@ -2458,7 +2448,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;
|
||||
|
||||
@ -2622,4 +2613,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 ***
|
||||
@ -54,7 +50,8 @@ a b c
|
||||
3 4 QA TESTING
|
||||
*** Start Slave ***
|
||||
START SLAVE;
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
|
||||
include/wait_for_slave_sql_error.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.'
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
@ -83,10 +80,8 @@ INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TEST
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3'
|
||||
*** Drop t3 ***
|
||||
DROP TABLE t3;
|
||||
*** Create t4 on slave ***
|
||||
@ -108,10 +103,8 @@ INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'),
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3'
|
||||
*** Drop t4 ***
|
||||
DROP TABLE t4;
|
||||
*** Create t5 on slave ***
|
||||
@ -133,10 +126,8 @@ INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098),
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246'
|
||||
*** Drop t5 ***
|
||||
DROP TABLE t5;
|
||||
*** Create t6 on slave ***
|
||||
@ -157,7 +148,8 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1),
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
|
||||
include/wait_for_slave_sql_error.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
|
||||
*** Drop t6 ***
|
||||
DROP TABLE t6;
|
||||
@ -237,6 +229,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;
|
||||
@ -255,10 +248,8 @@ INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5'
|
||||
*** Drop t10 ***
|
||||
DROP TABLE t10;
|
||||
*** Create t11 on slave ***
|
||||
@ -279,10 +270,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252'
|
||||
*** Drop t11 ***
|
||||
DROP TABLE t11;
|
||||
*** Create t12 on slave ***
|
||||
@ -439,6 +428,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;
|
||||
@ -492,10 +482,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;
|
||||
@ -595,9 +583,8 @@ INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2'
|
||||
** 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 ***
|
||||
@ -54,7 +50,8 @@ a b c
|
||||
3 4 QA TESTING
|
||||
*** Start Slave ***
|
||||
START SLAVE;
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
|
||||
include/wait_for_slave_sql_error.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.'
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
@ -83,10 +80,8 @@ INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TEST
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3'
|
||||
*** Drop t3 ***
|
||||
DROP TABLE t3;
|
||||
*** Create t4 on slave ***
|
||||
@ -108,10 +103,8 @@ INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'),
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3'
|
||||
*** Drop t4 ***
|
||||
DROP TABLE t4;
|
||||
*** Create t5 on slave ***
|
||||
@ -133,10 +126,8 @@ INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098),
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246'
|
||||
*** Drop t5 ***
|
||||
DROP TABLE t5;
|
||||
*** Create t6 on slave ***
|
||||
@ -157,7 +148,8 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1),
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
|
||||
include/wait_for_slave_sql_error.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3'
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
|
||||
*** Drop t6 ***
|
||||
DROP TABLE t6;
|
||||
@ -237,6 +229,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;
|
||||
@ -255,10 +248,8 @@ INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5'
|
||||
*** Drop t10 ***
|
||||
DROP TABLE t10;
|
||||
*** Create t11 on slave ***
|
||||
@ -279,10 +270,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252'
|
||||
*** Drop t11 ***
|
||||
DROP TABLE t11;
|
||||
*** Create t12 on slave ***
|
||||
@ -439,6 +428,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;
|
||||
@ -492,10 +482,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;
|
||||
@ -595,9 +583,8 @@ INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
|
||||
********************************************
|
||||
*** Expect slave to fail with Error 1535 ***
|
||||
********************************************
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
|
||||
Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2'
|
||||
** 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,27 +1,15 @@
|
||||
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 master-relay-bin
|
||||
relay_log_index
|
||||
relay_log_info_file relay-log.info
|
||||
relay_log_purge ON
|
||||
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 = 'master-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;
|
||||
@ -53,3 +49,4 @@ select count(*) from t1 /* must be zero */;
|
||||
count(*)
|
||||
0
|
||||
drop table t2,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]
|
||||
==== 0. Setting it all up ====
|
||||
SET BINLOG_FORMAT=STATEMENT;
|
||||
**** On Master ****
|
||||
@ -102,11 +98,7 @@ DELETE FROM logtbl;
|
||||
DROP PROCEDURE just_log;
|
||||
DROP PROCEDURE calc_and_log;
|
||||
DROP FUNCTION log_rows;
|
||||
**** Resetting master and slave ****
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
include/start_slave.inc
|
||||
include/rpl_reset.inc
|
||||
#### 2. Using mixed mode ####
|
||||
==== 2.1. Checking a procedure ====
|
||||
**** On Master ****
|
||||
@ -231,3 +223,4 @@ DROP PROCEDURE just_log;
|
||||
DROP PROCEDURE log_me;
|
||||
DROP PROCEDURE log_me_inner;
|
||||
DROP FUNCTION log_rows;
|
||||
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("Statement may not be safe to log in statement format.");
|
||||
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,33 +1,32 @@
|
||||
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("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
|
||||
|
@ -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("Can't find record in 't.'");
|
||||
call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
|
||||
@ -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,8 +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;
|
||||
select @@global.slave_exec_mode /* must be IDEMPOTENT */;
|
||||
@@global.slave_exec_mode
|
||||
@ -144,8 +137,7 @@ b
|
||||
2
|
||||
3
|
||||
*** slave must stop (Trying to delete a referenced foreing key)
|
||||
Last_SQL_Error
|
||||
1451
|
||||
include/wait_for_slave_sql_error.inc [errno=1451]
|
||||
select * from ti1 order by b /* must be (1),(2),(3) - not deleted */;
|
||||
b
|
||||
1
|
||||
@ -162,8 +154,7 @@ set global slave_exec_mode='STRICT';
|
||||
delete from ti1 where b=3;
|
||||
insert into ti2 set a=3, b=3 /* offending write event */;
|
||||
*** slave must stop (Trying to insert an invalid foreign key)
|
||||
Last_SQL_Error
|
||||
1452
|
||||
include/wait_for_slave_sql_error.inc [errno=1452]
|
||||
select * from ti2 order by b /* must be (2,2) */;
|
||||
a b
|
||||
2 2
|
||||
@ -182,8 +173,7 @@ a b
|
||||
insert into ti1 set b=1;
|
||||
insert into ti1 set b=1 /* offending write event */;
|
||||
*** slave must stop (Trying to insert a dupliacte key)
|
||||
Last_SQL_Error
|
||||
1062
|
||||
include/wait_for_slave_sql_error.inc [errno=1062]
|
||||
set foreign_key_checks= 0;
|
||||
delete from ti1 where b=1;
|
||||
set foreign_key_checks= 1;
|
||||
@ -198,15 +188,13 @@ DELETE FROM t1 WHERE a = -2;
|
||||
DELETE FROM t2 WHERE a = -2;
|
||||
DELETE FROM t1 WHERE a = -2;
|
||||
*** slave must stop (Key was not found)
|
||||
Last_SQL_Error
|
||||
1032
|
||||
include/wait_for_slave_sql_error.inc [errno=1032]
|
||||
set global slave_exec_mode='IDEMPOTENT';
|
||||
start slave sql_thread;
|
||||
set global slave_exec_mode='STRICT';
|
||||
DELETE FROM t2 WHERE a = -2;
|
||||
*** slave must stop (Key was not found)
|
||||
Last_SQL_Error
|
||||
1032
|
||||
include/wait_for_slave_sql_error.inc [errno=1032]
|
||||
set global slave_exec_mode='IDEMPOTENT';
|
||||
start slave sql_thread;
|
||||
set global slave_exec_mode='STRICT';
|
||||
@ -214,18 +202,17 @@ UPDATE t1 SET a = 1 WHERE a = -1;
|
||||
UPDATE t2 SET a = 1 WHERE a = -1;
|
||||
UPDATE t1 SET a = 1 WHERE a = -1;
|
||||
*** slave must stop (Key was not found)
|
||||
Last_SQL_Error
|
||||
1032
|
||||
include/wait_for_slave_sql_error.inc [errno=1032]
|
||||
set global slave_exec_mode='IDEMPOTENT';
|
||||
start slave sql_thread;
|
||||
set global slave_exec_mode='STRICT';
|
||||
UPDATE t2 SET a = 1 WHERE a = -1;
|
||||
*** slave must stop (Key was not found)
|
||||
Last_SQL_Error
|
||||
1032
|
||||
include/wait_for_slave_sql_error.inc [errno=1032]
|
||||
set global slave_exec_mode='IDEMPOTENT';
|
||||
start slave sql_thread;
|
||||
SET @@global.slave_exec_mode= @old_slave_exec_mode;
|
||||
set @@session.binlog_format= @save_binlog_format;
|
||||
drop table t1,t2,ti2,ti1;
|
||||
include/rpl_end.inc
|
||||
*** end of tests
|
||||
|
@ -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]
|
||||
call mtr.add_suppression("Can't find record in 't.'");
|
||||
call mtr.add_suppression("Can't find record in 'user'");
|
||||
call mtr.add_suppression("Can't find record in 'tables_priv'");
|
||||
@ -144,3 +140,4 @@ HEX(word)
|
||||
SELECT * FROM tmptbl504451f4258$1;
|
||||
ERROR 42S02: Table 'test.tmptbl504451f4258$1' doesn't exist
|
||||
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]
|
||||
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]
|
||||
CREATE TABLE t4 (
|
||||
id INT(5) unsigned NOT NULL auto_increment,
|
||||
name varchar(15) NOT NULL default '',
|
||||
@ -81,4 +77,5 @@ FLUSH LOGS;
|
||||
-------- switch to master --------
|
||||
FLUSH LOGS;
|
||||
DROP DATABASE mysqltest1;
|
||||
include/rpl_end.inc
|
||||
End of 5.1 tests
|
||||
|
@ -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
|
||||
@ -1104,3 +1100,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)) ENGINE=MyISAM;
|
||||
@ -21,3 +17,4 @@ COUNT(*)
|
||||
#
|
||||
USE test;
|
||||
DROP SCHEMA mysqlslap;
|
||||
include/rpl_end.inc
|
||||
|
@ -2,19 +2,14 @@
|
||||
# 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;
|
||||
@ -531,3 +526,4 @@ id last_id
|
||||
drop table t1, t2;
|
||||
drop procedure foo;
|
||||
SET @@global.concurrent_insert= @old_concurrent_insert;
|
||||
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]
|
||||
CREATE TABLE t1 (
|
||||
a int unsigned not null auto_increment primary key,
|
||||
b int unsigned,
|
||||
@ -68,3 +64,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
|
||||
|
@ -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,7 +7,8 @@ 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;
|
||||
@ -56,12 +53,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,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;
|
||||
drop database if exists mysqltest2;
|
||||
drop database if exists mysqltest3;
|
||||
@ -131,3 +127,4 @@ drop database mysqltest;
|
||||
drop database mysqltest2;
|
||||
drop database mysqltest2;
|
||||
drop database mysqltest3;
|
||||
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 Requirment 1 *************"
|
||||
SET SQL_LOG_BIN=0,timestamp=200006;
|
||||
CREATE TABLE t1(t TIMESTAMP NOT NULL,a CHAR(1))ENGINE=MyISAM;
|
||||
@ -49,3 +45,4 @@ set SQL_LOG_BIN=1;
|
||||
drop table if exists t1,t2,t3;
|
||||
create table t1(n int);
|
||||
drop table 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;
|
||||
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,15 @@ 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_to_stop.inc
|
||||
drop table t1, t2;
|
||||
include/stop_slave_io.inc
|
||||
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;
|
||||
include/rpl_reset.inc
|
||||
drop database if exists b48297_db1;
|
||||
drop database if exists b42897_db2;
|
||||
create database b48297_db1;
|
||||
@ -112,15 +99,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 +114,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
|
||||
|
@ -9,13 +9,8 @@ master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../s
|
||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA CONCURRENT INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`c1`) ;file_id=#
|
||||
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;
|
||||
reset master;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
select last_insert_id();
|
||||
last_insert_id()
|
||||
0
|
||||
@ -43,32 +38,27 @@ drop table t3;
|
||||
create table t1(a int, b int, unique(b));
|
||||
insert into t1 values(1,10);
|
||||
load data CONCURRENT 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 CONCURRENT 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 CONCURRENT 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;
|
||||
@ -91,18 +81,15 @@ load data CONCURRENT infile '../../std_data/rpl_loaddata2.dat' into table t2 fie
|
||||
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_to_stop.inc
|
||||
drop table t1, t2;
|
||||
include/stop_slave_io.inc
|
||||
drop table t1, t2;
|
||||
CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
|
||||
LOAD DATA CONCURRENT 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;
|
||||
include/rpl_reset.inc
|
||||
drop database if exists b48297_db1;
|
||||
drop database if exists b42897_db2;
|
||||
create database b48297_db1;
|
||||
@ -123,15 +110,10 @@ LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO
|
||||
LOAD DATA CONCURRENT 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 ',';
|
||||
@ -143,3 +125,4 @@ Field 3 'Field 4'
|
||||
'Field 5' 'Field 6'
|
||||
Field 6 'Field 7'
|
||||
DROP TABLE t1;
|
||||
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));
|
||||
@ -37,3 +33,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);
|
||||
@ -29,3 +25,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
|
||||
|
@ -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 (word CHAR(20) NOT NULL);
|
||||
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
|
||||
SELECT * FROM t1 ORDER BY word;
|
||||
@ -151,3 +147,4 @@ Abernathy
|
||||
aberrant
|
||||
aberration
|
||||
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 int not null auto_increment, b int, primary key(a) );
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
select * from t1;
|
||||
@ -15,3 +11,4 @@ a b
|
||||
1 10
|
||||
2 15
|
||||
drop table 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