1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00
This commit is contained in:
Georgi Kodinov
2010-12-23 12:49:08 +02:00
751 changed files with 7132 additions and 5702 deletions

View File

@ -1,42 +0,0 @@
SET @old_relay_log_purge= @@global.relay_log_purge;
change master to
MASTER_HOST='dummy.localdomain',
RELAY_LOG_FILE='slave-relay-bin.000001',
RELAY_LOG_POS=4;
start slave sql_thread;
select MASTER_POS_WAIT('master-bin.000001', 3776);
# Result on slave
SELECT * FROM t1;
id
5
6
7
8
9
10
11
SELECT * FROM t2;
id
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
DROP TABLE IF EXISTS t1, t2;
DROP PROCEDURE IF EXISTS p1;
DROP PROCEDURE IF EXISTS p2;
DROP FUNCTION IF EXISTS f1;
DROP TRIGGER IF EXISTS tr1;
stop slave sql_thread;
reset slave;
SET @@global.relay_log_purge= @old_relay_log_purge;

View File

@ -1,4 +1,3 @@
DROP TABLE IF EXISTS t1, t2, t3;
==== Read modern binlog (version 5.1.23) ====
SELECT * FROM t1 ORDER BY a;
a b

View File

@ -1,9 +1,3 @@
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
SET @old_sql_mode= @@global.sql_mode;
SET @old_binlog_format=@@session.binlog_format;
SET SESSION sql_mode=8;
@ -27,7 +21,7 @@ DO
BEGIN
UPDATE t1 SET id = id +1;
END;|
Chceck Result
Check Result
select
(@a:=load_file("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog"))
is not null;

View File

@ -1,8 +1,8 @@
==== Setup tables ====
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (a CHAR(40));
CREATE TABLE t2 (a TEXT);
CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY);
CREATE TABLE trigger_table (a CHAR(7));
CREATE TABLE trigger_table (a TEXT);
CREATE TABLE trigger_table2 (a INT);
==== Non-deterministic statements ====
INSERT DELAYED INTO t1 VALUES (5);
@ -28,7 +28,6 @@ Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t2 VALUES (@@hostname);
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
Note 1592 Statement may not be safe to log in statement format.
---- Insert from stored procedure ----
CREATE PROCEDURE proc()
@ -49,7 +48,6 @@ Note 1592 Statement may not be safe to log in statement format.
Note 1592 Statement may not be safe to log in statement format.
Note 1592 Statement may not be safe to log in statement format.
Note 1592 Statement may not be safe to log in statement format.
Warning 1265 Data truncated for column 'a' at row 6
Note 1592 Statement may not be safe to log in statement format.
---- Insert from stored function ----
CREATE FUNCTION func()
@ -74,7 +72,6 @@ Note 1592 Statement may not be safe to log in statement format.
Note 1592 Statement may not be safe to log in statement format.
Note 1592 Statement may not be safe to log in statement format.
Note 1592 Statement may not be safe to log in statement format.
Warning 1265 Data truncated for column 'a' at row 6
Note 1592 Statement may not be safe to log in statement format.
---- Insert from trigger ----
CREATE TRIGGER trig
@ -97,7 +94,6 @@ Note 1592 Statement may not be safe to log in statement format.
Note 1592 Statement may not be safe to log in statement format.
Note 1592 Statement may not be safe to log in statement format.
Note 1592 Statement may not be safe to log in statement format.
Warning 1265 Data truncated for column 'a' at row 6
Note 1592 Statement may not be safe to log in statement format.
Note 1592 Statement may not be safe to log in statement format.
---- Insert from prepared statement ----
@ -128,7 +124,6 @@ Warnings:
Note 1592 Statement may not be safe to log in statement format.
EXECUTE p7;
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
Note 1592 Statement may not be safe to log in statement format.
---- Insert from nested call of triggers / functions / procedures ----
CREATE PROCEDURE proc1()
@ -165,7 +160,6 @@ Note 1592 Statement may not be safe to log in statement format.
Note 1592 Statement may not be safe to log in statement format.
Note 1592 Statement may not be safe to log in statement format.
Note 1592 Statement may not be safe to log in statement format.
Warning 1265 Data truncated for column 'a' at row 6
Note 1592 Statement may not be safe to log in statement format.
==== Variables that should *not* be unsafe ====
INSERT INTO t1 VALUES (@@session.pseudo_thread_id);
@ -309,8 +303,6 @@ INSERT INTO t2 VALUES (@@global.init_slave);
INSERT INTO t2 VALUES (@@hostname);
END|
INSERT INTO trigger_table VALUES ('bye.');
Warnings:
Warning 1265 Data truncated for column 'a' at row 6
DROP FUNCTION fun_check_log_bin;
DROP FUNCTION func6;
DROP FUNCTION func7;

View File

@ -1 +0,0 @@
--replicate-same-server-id --relay-log=slave-relay-bin --skip-slave-start

View File

@ -24,9 +24,6 @@
source include/not_embedded.inc;
--disable_warnings
DROP TABLE IF EXISTS t1, t2, t3;
--echo ==== Read modern binlog (version 5.1.23) ====
@ -161,3 +158,4 @@ DROP TABLE t1, t2, t3;
#SELECT * FROM t1 ORDER BY a;
#SELECT * FROM t2 ORDER BY a;
#SELECT COUNT(*) FROM t3;
#--source include/rpl_end.inc

View File

@ -1,5 +1,9 @@
-- source include/have_log_bin.inc
# We change binlog format inside the test, so no need to re-run with
# more than one binlog_format.
-- source include/have_binlog_format_statement.inc
# Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
# BUG#41166 stored function requires "deterministic" if binlog_format is "statement"

View File

@ -8,7 +8,6 @@
# Scan binlog file to check if the sql_mode is still set to 0 before generating binlog event
#
-- source include/master-slave.inc
-- source include/have_log_bin.inc
# BUG#39526 sql_mode not retained in binary log for CREATE PROCEDURE
@ -50,10 +49,10 @@ CREATE EVENT testEvent ON SCHEDULE
END;|
DELIMITER ;|
--echo Chceck Result
--echo Check Result
let $MYSQLD_DATADIR= `select @@datadir`;
--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog
--exec $MYSQL_BINLOG --force-if-open $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval select
(@a:=load_file("$MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog"))

View File

@ -71,9 +71,9 @@ source include/have_binlog_format_statement.inc;
--echo ==== Setup tables ====
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (a CHAR(40));
CREATE TABLE t2 (a TEXT);
CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY);
CREATE TABLE trigger_table (a CHAR(7));
CREATE TABLE trigger_table (a TEXT);
CREATE TABLE trigger_table2 (a INT);

View File

@ -1,6 +1,4 @@
# Bug#12691: Exec_master_log_pos corrupted with SQL_SLAVE_SKIP_COUNTER
# Date: 01/31/2008
# Added: Serge Kozlov <skozlov@mysql.com>
--source include/master-slave.inc
--connection master
@ -47,5 +45,5 @@ SELECT COUNT(*) FROM t1;
--echo
--echo **** On Master ****
DROP TABLE t1;
--sync_slave_with_master
--source include/rpl_end.inc

View File

@ -1,7 +1,4 @@
#############################################################
# Author: Serge Kozlov <skozlov@mysql.com>
# Date: 02/26/2008
# Purpose: testing bug report
# Bug#23533: CREATE SELECT max_binlog_cache_size test
# case needed
#############################################################
@ -10,11 +7,6 @@
--source include/have_binlog_format_row.inc
--source include/master-slave.inc
--disable_warnings
DROP TABLE IF EXISTS t1,t2;
--enable_warnings
SET AUTOCOMMIT=0;
SET GLOBAL max_binlog_cache_size=4096;
SHOW VARIABLES LIKE 'max_binlog_cache_size';
@ -41,3 +33,4 @@ SHOW TABLES LIKE 't%';
# 5.1 End of Test
--source include/rpl_end.inc

View File

@ -21,5 +21,5 @@ SELECT * FROM t1 ORDER BY a;
connection master;
DROP TABLE t1;
sync_slave_with_master;
--source include/rpl_end.inc

View File

@ -21,5 +21,5 @@ SELECT * FROM t1 ORDER BY a;
connection master;
DROP TABLE t1;
sync_slave_with_master;
--source include/rpl_end.inc

View File

@ -23,3 +23,4 @@ insert into `t1` values ();
sync_slave_with_master;
select * from t1;
--source include/rpl_end.inc

View File

@ -15,8 +15,6 @@
--source include/master-slave.inc
drop table if exists t1;
create table t1(id int);
show tables;
@ -28,3 +26,4 @@ flush logs;
--exec $MYSQL_BINLOG $MYSQL_TEST_DIR/var/log/master-bin.000001 | $MYSQL test
drop table t1;
--source include/rpl_end.inc

View File

@ -1,6 +1,4 @@
#############################################################
# Author: Mats Kindahl <mats@mysql.com>
# Date: 2008-06-18
# Purpose: Test for BUG#37426
# RBR breaks for CHAR() UTF8 fields > 85 chars
#############################################################
@ -20,3 +18,4 @@ SELECT * FROM char128_utf8;
sync_slave_with_master;
SELECT * FROM char128_utf8;
--source include/rpl_end.inc

View File

@ -163,4 +163,4 @@ start slave sql_thread;
connection master;
drop table t1i, t2m;
sync_slave_with_master;
--source include/rpl_end.inc

View File

@ -7,9 +7,8 @@
source include/master-slave.inc;
connection master;
#connection slave;
sync_slave_with_master;
connection slave;
--echo # Second_behind reports 0
let $status_items= Seconds_Behind_Master;
source include/show_slave_status.inc;
@ -61,9 +60,4 @@ unlock tables;
connection master;
drop table t1;
#connection slave;
sync_slave_with_master;
# End of tests
--source include/rpl_end.inc

View File

@ -1,6 +1,4 @@
###############################################
# Author: JBM #
# Date: 2006-03-07 #
# Purpose: To test advance DD and replication #
###############################################
@ -11,11 +9,6 @@
--source include/not_embedded.inc
--source include/ndb_master-slave.inc
#### Test start cleanup section #####
--disable_warnings
DROP TABLE IF EXISTS t1, t2, t3;
--enable_warnings
######################################################
# Requirment: Cluster DD and replication must be able#
# to handle ALTER tables and indexes and must rpl #
@ -408,3 +401,4 @@ remove_file $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql;
remove_file $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql;
# End 5.1 test case
--source include/rpl_end.inc

View File

@ -12,3 +12,5 @@ set binlog_format=row;
set binlog_format=mixed;
-- source extra/rpl_tests/rpl_extraMaster_Col.test
--source include/rpl_end.inc

View File

@ -1,6 +1,4 @@
#############################################
#Authors: TU and Jeb
#Date: 2007/04
#Purpose: Generic replication to cluster
# and ensuring that the ndb_apply_status
# table is updated.
@ -34,3 +32,4 @@ let $off_set = 9;
let $rpl_format = 'MIX';
--source extra/rpl_tests/rpl_ndb_apply_status.test
--source include/rpl_end.inc

View File

@ -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_global_binlog_format= @@global.binlog_format;
set @old_session_binlog_format= @@session.binlog_format;
SET GLOBAL binlog_format = 'ROW';
@ -11,10 +7,6 @@ SET SESSION binlog_format = 'ROW';
select @@global.binlog_format, @@session.binlog_format;
@@global.binlog_format ROW
@@session.binlog_format ROW
DROP TABLE IF EXISTS t1, t2, t3;
DROP PROCEDURE IF EXISTS p1;
DROP PROCEDURE IF EXISTS p2;
DROP PROCEDURE IF EXISTS p3;
CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT,
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
fkid MEDIUMINT, filler VARCHAR(255),
@ -138,7 +130,7 @@ SUBPARTITIONS 2
PARTITION pa9 VALUES LESS THAN (90) ENGINE = InnoDB,
PARTITION pa10 VALUES LESS THAN (100) ENGINE = InnoDB,
PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
Checking that both slave threads are running.
include/check_slave_is_running.inc
SELECT count(*) "Slave norm" FROM t1;
Slave norm 500
SELECT count(*) "Slave bykey" FROM t2;
@ -148,6 +140,7 @@ Slave byrange 500
set @@global.binlog_format= @old_global_binlog_format;
set @@session.binlog_format= @old_session_binlog_format;
DROP TABLE t1, t2, t3;
DROP PROCEDURE IF EXISTS p1;
DROP PROCEDURE IF EXISTS p2;
DROP PROCEDURE IF EXISTS p3;
DROP PROCEDURE p1;
DROP PROCEDURE p2;
DROP PROCEDURE p3;
include/rpl_end.inc

View File

@ -12,13 +12,6 @@ SET GLOBAL binlog_format = 'ROW';
SET SESSION binlog_format = 'ROW';
select @@global.binlog_format, @@session.binlog_format;
--disable_warnings
DROP TABLE IF EXISTS t1, t2, t3;
DROP PROCEDURE IF EXISTS p1;
DROP PROCEDURE IF EXISTS p2;
DROP PROCEDURE IF EXISTS p3;
--enable_warnings
eval CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT,
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
fkid MEDIUMINT, filler VARCHAR(255),
@ -140,7 +133,6 @@ SELECT count(*) as "Master bykey" FROM t2;
CALL p3();
SELECT count(*) as "Master byrange" FROM t3;
#--source include/master-slave-end.inc
--sync_slave_with_master
connection slave;
show create table t3;
@ -153,11 +145,9 @@ connection master;
set @@global.binlog_format= @old_global_binlog_format;
set @@session.binlog_format= @old_session_binlog_format;
DROP TABLE t1, t2, t3;
DROP PROCEDURE IF EXISTS p1;
DROP PROCEDURE IF EXISTS p2;
DROP PROCEDURE IF EXISTS p3;
save_master_pos;
connection slave;
sync_with_master;
DROP PROCEDURE p1;
DROP PROCEDURE p2;
DROP PROCEDURE p3;
# End of 5.1 tests
--source include/rpl_end.inc

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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

View 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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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,30 @@ 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='';
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

View File

@ -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

View 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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,9 +1,5 @@
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
include/master-slave.inc
[connection master]
#######################################################################
####################### PART 1: MASTER TESTS ##########################
#######################################################################
@ -192,6 +188,7 @@ DELETE FROM t4;
DELETE FROM t2;
DROP TABLE t5;
###################### TEST #11
include/rpl_restart_server.inc [server_number=1]
SET GLOBAL debug="+d,fault_injection_openning_index";
FLUSH LOGS;
ERROR HY000: Can't open file: 'master-bin.index' (errno: 1)
@ -204,6 +201,7 @@ INSERT INTO t2 VALUES ('aaaaa');
DELETE FROM t4;
DELETE FROM t2;
DROP TABLE t5;
include/rpl_restart_server.inc [server_number=1]
###################### TEST #12
SET GLOBAL debug="+d,fault_injection_new_file_rotate_event";
FLUSH LOGS;
@ -217,6 +215,7 @@ INSERT INTO t2 VALUES ('aaaaa');
DELETE FROM t4;
DELETE FROM t2;
DROP TABLE t5;
include/rpl_restart_server.inc [server_number=1]
SET GLOBAL debug= @old_debug;
DROP TABLE t1, t2, t4;
RESET MASTER;
@ -224,12 +223,7 @@ include/start_slave.inc
#######################################################################
####################### PART 2: SLAVE TESTS ###########################
#######################################################################
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
include/rpl_reset.inc
call mtr.add_suppression("Slave I/O: Relay log write failure: could not queue event from master.*");
call mtr.add_suppression("Error writing file .*");
call mtr.add_suppression("Could not open .*");
@ -240,35 +234,45 @@ SET @old_debug=@@global.debug;
include/stop_slave.inc
SET GLOBAL debug="+d,error_unique_log_filename";
START SLAVE io_thread;
Last_IO_Error = Relay log write failure: could not queue event from master
include/wait_for_slave_io_error.inc [errno=1595]
Last_IO_Error = 'Relay log write failure: could not queue event from master'
SET GLOBAL debug="-d,error_unique_log_filename";
SET GLOBAL debug=@old_debug;
include/rpl_restart_server.inc [server_number=2]
###################### TEST #14
SET @old_debug=@@global.debug;
include/stop_slave.inc
SET GLOBAL debug="+d,fault_injection_new_file_rotate_event";
START SLAVE io_thread;
Last_IO_Error = Relay log write failure: could not queue event from master
include/wait_for_slave_io_error.inc [errno=1595]
Last_IO_Error = 'Relay log write failure: could not queue event from master'
SET GLOBAL debug="-d,fault_injection_new_file_rotate_event";
SET GLOBAL debug=@old_debug;
include/rpl_restart_server.inc [server_number=2]
###################### TEST #15
SET @old_debug=@@global.debug;
include/stop_slave.inc
SET GLOBAL debug="+d,fault_injection_registering_index";
START SLAVE io_thread;
Last_IO_Error = Relay log write failure: could not queue event from master
include/wait_for_slave_io_error.inc [errno=1595]
Last_IO_Error = 'Relay log write failure: could not queue event from master'
SET GLOBAL debug="-d,fault_injection_registering_index";
SET GLOBAL debug=@old_debug;
include/rpl_restart_server.inc [server_number=2]
###################### TEST #16
SET @old_debug=@@global.debug;
include/stop_slave.inc
SET GLOBAL debug="+d,fault_injection_openning_index";
START SLAVE io_thread;
Last_IO_Error = Relay log write failure: could not queue event from master
include/wait_for_slave_io_error.inc [errno=1595]
Last_IO_Error = 'Relay log write failure: could not queue event from master'
SET GLOBAL debug="-d,fault_injection_openning_index";
SET GLOBAL debug=@old_debug;
include/stop_slave.inc
include/rpl_restart_server.inc [server_number=2]
include/stop_slave_sql.inc
Warnings:
Note 1255 Slave already has been stopped
SET GLOBAL debug=@old_debug;
RESET SLAVE;
RESET MASTER;
include/start_slave.inc
include/rpl_end.inc

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;
@ -99,3 +95,4 @@ COUNT(*)
0
>>> Something was written to binary log <<<
DROP TABLE t1,t2;
include/rpl_end.inc

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,6 +1,3 @@
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
include/master-slave.inc
[connection master]
include/rpl_end.inc

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;
@ -166,21 +162,13 @@ USE bug42217_db;
DROP FUNCTION upgrade_del_func;
DROP FUNCTION upgrade_alter_func;
DROP DATABASE bug42217_db;
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';
@ -188,12 +176,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';
@ -246,12 +229,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
@ -259,15 +237,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
@ -284,3 +258,4 @@ Grantor
root@localhost
DROP USER user_bug27606@localhost;
"End of test"
include/rpl_end.inc

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
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 = 'mysqld-relay-bin.000003'
include/rpl_end.inc

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,9 +1,5 @@
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
include/master-slave.inc
[connection master]
call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032");
call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
@ -32,8 +28,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;
@ -46,8 +41,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;
@ -70,8 +64,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
@ -143,8 +136,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
@ -161,8 +153,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
@ -181,8 +172,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;
@ -197,15 +187,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';
@ -213,18 +201,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

View File

@ -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

View File

@ -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

View File

@ -1,9 +1,5 @@
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
include/master-slave.inc
[connection master]
**** Test case for BUG#16487 ****
**** Master ****
CREATE TABLE test.t4 (a int);
@ -141,4 +137,4 @@ HEX(word)
SELECT * FROM tmptbl504451f4258$1;
ERROR 42S02: Table 'test.tmptbl504451f4258$1' doesn't exist
DROP TABLE t5;
call mtr.force_restart();
include/rpl_end.inc

Some files were not shown because too many files have changed in this diff Show More