1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge with MySQL 5.1.55

- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria"
- Fixed wrong assert in Aria

Now need to merge with latest xtradb before pushing 

sql/ha_partition.cc:
  Ensure that m_ordered_rec_buffer is not freed before close.
sql/mysqld.cc:
  Changed to use opt_stack_trace instead of opt_pstack.
  Removed references to pstack
sql/partition_element.h:
  Ensure that connect_string is initialized
storage/maria/ma_key_recover.c:
  Fixed wrong assert
This commit is contained in:
Michael Widenius
2011-02-20 18:51:43 +02:00
1288 changed files with 19581 additions and 38443 deletions

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 storage_engine=ndb;
=== NDB -> MYISAM ===
@ -805,3 +801,4 @@ TRUNCATE TABLE t1;
DROP TABLE IF EXISTS t1;
drop table mysql.ndb_apply_status;
set @@global.slave_exec_mode= @old_slave_exec_mode;
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 PROCEDURE IF EXISTS test.p1;
DROP TABLE IF EXISTS test.t1;
CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, vchar_column VARCHAR(100), PRIMARY KEY(a)) engine=NDB;
@ -38,3 +34,4 @@ DROP PROCEDURE test.p1;
DROP FUNCTION test.fn1;
DROP TABLE test.t1;
DROP TABLE test.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]
*** on slave there should be zero rows ***
select count(*) from mysql.ndb_apply_status;
count(*)
@ -18,3 +14,4 @@ select count(*) from mysql.ndb_apply_status;
count(*)
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]
***************** Test 1 ************************
CREATE TABLE t1 (a INT NOT NULL auto_increment,b INT, PRIMARY KEY (a)) ENGINE=NDB auto_increment=3;
@ -168,3 +164,4 @@ a
32
42
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` ( `nid` int(11) NOT NULL default '0',
`nom` char(4) default NULL,
`prenom` char(4) default NULL,
@ -140,7 +136,8 @@ set GLOBAL slave_transaction_retries=1;
**** On Master ****
UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1;
**** On Slave ****
Last_SQL_Error = Could not execute Write_rows event on table test.t1; Got temporary error 266 'Time-out in NDB, probably caused by deadlock' from NDB, Error_code: 1297; Lock wait timeout exceeded; try restarting transaction, Error_code: 1205; handler error HA_ERR_LOCK_WAIT_TIMEOUT; the event's master log master-bin.000001, end_log_pos 6834
include/wait_for_slave_sql_error.inc [errno=1205 ]
Last_SQL_Error = 'Could not execute Write_rows event on table test.t1; Got temporary error 266 'Time-out in NDB, probably caused by deadlock' from NDB, Error_code: 1297; Lock wait timeout exceeded; try restarting transaction, Error_code: 1205; handler error HA_ERR_LOCK_WAIT_TIMEOUT; the event's master log master-bin.000001, end_log_pos 6834'
set GLOBAL slave_transaction_retries=10;
include/start_slave.inc
select * from t1 order by nid;
@ -191,3 +188,4 @@ c1
104
105
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 not null primary key,
b text not null
@ -133,3 +129,4 @@ S testtttttttttt t1 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15
S testttttttttttt t1 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25
S testtttttttttttt t1 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35
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 test.t1;
DROP TABLE IF EXISTS test.t2;
***** Table Create Section ****
@ -154,3 +150,4 @@ c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3)
DROP TABLE IF EXISTS test.t1;
DROP TABLE IF EXISTS test.t2;
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;
RESET MASTER;
CHANGE MASTER TO master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root";
START SLAVE;
include/rpl_init.inc [topology=1->2->1]
include/rpl_connect.inc [creating master]
include/rpl_connect.inc [creating slave]
CREATE TABLE t1 (a int key, b int) ENGINE=ndb;
SHOW TABLES;
Tables_in_test
@ -17,11 +11,12 @@ SELECT * FROM t1 ORDER BY a;
a b
1 2
2 3
Checking that both slave threads are running.
include/check_slave_is_running.inc
SELECT * FROM t1 ORDER BY a;
a b
1 2
2 3
Checking that both slave threads are running.
include/check_slave_is_running.inc
STOP SLAVE;
DROP TABLE t1;
include/rpl_end.inc

View File

@ -1,21 +1,8 @@
STOP SLAVE;
STOP SLAVE;
STOP SLAVE;
STOP SLAVE;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9;
RESET MASTER;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9;
RESET MASTER;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9;
RESET MASTER;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9;
RESET MASTER;
RESET SLAVE;
CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_MYPORT,master_user='root';
START SLAVE;
RESET SLAVE;
CHANGE MASTER TO master_host='127.0.0.1',master_port=SLAVE_MYPORT1,master_user='root';
START SLAVE;
include/rpl_init.inc [topology=1->2,4->3]
include/rpl_connect.inc [creating master]
include/rpl_connect.inc [creating master1]
include/rpl_connect.inc [creating slave]
include/rpl_connect.inc [creating slave1]
*** Check server_id of mysqld servers ***
SHOW VARIABLES LIKE "server_id";
@ -45,20 +32,20 @@ CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL,
*** Basic testing ***
Insert rows via all hosts
Check data on both clusters
Comparing tables master:test.t1 and slave:test.t1
include/diff_tables.inc [master:t1, slave:t1]
*** Transaction testing ***
BEGIN;
BEGIN;
COMMIT;
COMMIT;
Check data on both clusters
Comparing tables master:test.t1 and slave:test.t1
include/diff_tables.inc [master:t1, slave:t1]
BEGIN;
BEGIN;
ROLLBACK;
ROLLBACK;
Check data on both clusters
Comparing tables master:test.t1 and slave:test.t1
DROP TABLE t1;
include/diff_tables.inc [master:t1, slave:t1]
DROP TABLE IF EXISTS 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 key, b int) ENGINE=NDB;
SHOW TABLES;
Tables_in_test
@ -12,9 +8,9 @@ RESET MASTER;
INSERT INTO t1 VALUES (1,2);
INSERT INTO t1 VALUES (2,3);
STOP SLAVE;
CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=SLAVE_PORT,MASTER_USER="root";
include/rpl_change_topology.inc [new topology=1->2->1]
START SLAVE;
Checking that both slave threads are running.
include/check_slave_is_running.inc
SELECT * FROM t1 ORDER BY a;
a b
1 2
@ -25,5 +21,6 @@ SELECT * FROM t1 ORDER BY a;
a b
1 2
2 3
Checking that both slave threads are running.
include/check_slave_is_running.inc
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=NDB;
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]
show variables like 'collation_server';
Variable_name Value
collation_server ucs2_unicode_ci
@ -25,3 +21,4 @@ nid nom prenom
1 XYZ1 ABC1
==== clean up ====
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;
CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat'
@ -70,3 +66,4 @@ drop datafile 'datafile02.dat'
engine=ndb;
DROP TABLESPACE ts1 ENGINE=NDB;
DROP LOGFILE GROUP lg1 ENGINE=NDB;
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]
--- Doing pre test cleanup ---
DROP TABLE IF EXISTS t1;
CREATE LOGFILE GROUP lg1
@ -788,3 +784,4 @@ drop datafile 'datafile02.dat'
engine=ndb;
DROP TABLESPACE ts1 ENGINE=NDB;
DROP LOGFILE GROUP lg1 ENGINE=NDB;
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]
-------- switch to master -------
SET AUTOCOMMIT = 1;
@ -1626,3 +1622,4 @@ use test;
-------- switch to master -------
DROP DATABASE mysqltest1;
DROP DATABASE mysqltest3;
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=NDB;
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]
DROP DATABASE IF EXISTS replica;
CREATE DATABASE replica;
CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB;
@ -56,3 +52,4 @@ Tables_in_test
USE test;
DROP TABLE t1, t2;
DROP DATABASE IF EXISTS replica;
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;
CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB;
CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB;
@ -24,3 +20,4 @@ ERROR 23000: Duplicate entry '3' for key 'PRIMARY'
INSERT INTO t1 VALUES (3, repeat('bad too',1));
ERROR 23000: Duplicate entry '3' for key 'PRIMARY'
DROP TABLE IF EXISTS 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("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;
@ -231,10 +223,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 ***
@ -255,10 +245,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 ***
@ -468,10 +456,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;
@ -571,9 +557,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('Statement may not be safe to log in statement format.');
DROP FUNCTION IF EXISTS test.f1;
DROP TABLE IF EXISTS test.t1;
@ -28,3 +24,4 @@ ROLLBACK;
SET AUTOCOMMIT=1;
DROP FUNCTION test.f1;
DROP TABLE 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]
CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ;
INSERT INTO t1 VALUES ("row1","will go away",1);
SELECT * FROM t1 ORDER BY c3;
@ -32,11 +28,12 @@ SELECT * FROM t1 ORDER BY c3;
c1 c2 c3
row3 C 3
row4 D 4
Checking that both slave threads are running.
include/check_slave_is_running.inc
STOP SLAVE;
CHANGE MASTER TO
master_log_file = 'master-bin.000001',
master_log_pos = <the_pos> ;
include/check_slave_no_error.inc
START SLAVE;
SELECT * FROM t1 ORDER BY c3;
c1 c2 c3
@ -62,5 +59,6 @@ COMMIT;
SELECT * FROM t1;
c1 c2 c3
row2 new on slave 2
Checking that both slave threads are running.
include/check_slave_is_running.inc
DROP TABLE IF EXISTS 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]
SET storage_engine=innodb;
--- Doing pre test cleanup ---
DROP TABLE IF EXISTS t1;
@ -917,3 +913,4 @@ DELETE FROM t1;
--- End test 5 key partition testing ---
--- Do Cleanup ---
DROP TABLE IF EXISTS 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, unique(a)) engine=ndbcluster;
create table t2 (a int, unique(a)) engine=innodb;
begin;
@ -101,3 +97,4 @@ select count(*) from t2;
count(*)
0
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]
CREATE TABLE t1 (
a int unsigned not null auto_increment primary key,
b int unsigned,
@ -68,3 +64,4 @@ a b
5 5
6 6
drop table t1, t2;
include/rpl_end.inc

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]
include/stop_slave.inc
reset master;
reset slave;
@ -256,18 +252,13 @@ slave-bin.000002 # Table_map # # table_id: # (mysql.ndb_apply_status)
slave-bin.000002 # Write_rows # # table_id: #
slave-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
slave-bin.000002 # Query # # COMMIT
Checking that both slave threads are running.
include/check_slave_is_running.inc
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
include/rpl_reset.inc
create table t1(a int auto_increment primary key, b int);
insert into t1 values (NULL, 1);
set insert_id=5;
@ -289,3 +280,4 @@ a b
5 1
6 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]
CREATE TABLE tmyisam (a int) ENGINE = MYISAM;
CREATE TABLE tinnodb (a int) ENGINE = INNODB;
CREATE TABLE tndb (a int) ENGINE = NDB;
@ -477,10 +473,11 @@ a
151
152
[on slave]
Comparing tables master:test.tmyisam and slave:test.tmyisam
Comparing tables master:test.tinnodb and slave:test.tinnodb
Comparing tables master:test.tndb and slave:test.tndb
include/diff_tables.inc [master:tmyisam, slave:tmyisam]
include/diff_tables.inc [master:tinnodb, slave:tinnodb]
include/diff_tables.inc [master:tndb, slave:tndb]
==== Clean up ====
[on master]
DROP TABLE tmyisam, tinnodb, tndb;
[on slave]
include/rpl_end.inc

View File

@ -1,10 +1,6 @@
==== Initialization ====
stop slave;
drop table if exists t1,t2,t3,t4,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]
---- setup master ----
CREATE TABLE myisam_innodb (a INT) ENGINE=MYISAM;
CREATE TABLE innodb_myisam (a INT) ENGINE=INNODB;
@ -274,13 +270,14 @@ a
34
57
58
Comparing tables master:test.myisam_innodb and slave:test.myisam_innodb
Comparing tables master:test.innodb_myisam and slave:test.innodb_myisam
Comparing tables master:test.myisam_ndb and slave:test.myisam_ndb
Comparing tables master:test.ndb_myisam and slave:test.ndb_myisam
Comparing tables master:test.innodb_ndb and slave:test.innodb_ndb
Comparing tables master:test.ndb_innodb and slave:test.ndb_innodb
include/diff_tables.inc [master:myisam_innodb, slave:myisam_innodb]
include/diff_tables.inc [master:innodb_myisam, slave:innodb_myisam]
include/diff_tables.inc [master:myisam_ndb, slave:myisam_ndb]
include/diff_tables.inc [master:ndb_myisam, slave:ndb_myisam]
include/diff_tables.inc [master:innodb_ndb, slave:innodb_ndb]
include/diff_tables.inc [master:ndb_innodb, slave:ndb_innodb]
==== Clean up ====
drop table myisam_innodb, innodb_myisam;
drop table myisam_ndb, ndb_myisam;
drop table innodb_ndb, ndb_innodb;
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 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ;
reset master;
SHOW TABLES;
@ -27,11 +23,8 @@ SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1)
FROM mysql.ndb_binlog_index WHERE epoch = <the_epoch> ;
@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1)
106 master-bin.000001
CHANGE MASTER TO
master_port=<MASTER_PORT1>,
master_log_file = 'MASTER_LOG_FILE',
master_log_pos = MASTER_LOG_POS ;
start slave;
include/rpl_change_topology.inc [new topology=3->2]
include/start_slave.inc
INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4);
DELETE FROM t1 WHERE c3 = 1;
UPDATE t1 SET c2="should go away" WHERE c3 = 2;
@ -54,4 +47,4 @@ row4 D 4
row5 E 5
==== clean up ====
DROP TABLE t1;
STOP 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;
CREATE TABLE t1 (
a int unsigned not null auto_increment primary key,
@ -53,3 +49,4 @@ select * from t1;
a
3
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]
-------- Test for BUG#9361 --------
CREATE TABLE t1 (
@ -195,3 +191,4 @@ idpro price nbprice
2 1.0000 2
3 2.0000 1
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]
SET storage_engine=myisam;
--- Doing pre test cleanup ---
DROP TABLE IF EXISTS t1;
@ -917,3 +913,4 @@ DELETE FROM t1;
--- End test 5 key partition testing ---
--- Do Cleanup ---
DROP TABLE IF EXISTS 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 replica;
CREATE DATABASE replica;
CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB;
@ -52,3 +48,4 @@ Tables_in_test
USE test;
DROP TABLE t1, t2;
DROP DATABASE IF EXISTS replica;
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 (word CHAR(20) NOT NULL);
LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1;
LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1;
@ -53,3 +49,4 @@ SELECT n FROM t1;
n
3456
DROP TABLE t1;
include/rpl_end.inc

View File

@ -1,35 +1,22 @@
stop slave;
drop table if exists t1,t2,t3,t4,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;
drop table if exists t1,t2,t3,t4,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_reset.inc
CREATE TABLE t1 (c1 BIT, c2 INT) Engine=NDB;
INSERT INTO `t1` VALUES ( 1, 1 );
UPDATE t1 SET c1=NULL where c2=1;
Comparing tables master:test.t1 and slave:test.t1
include/diff_tables.inc [master:t1, slave:t1]
DELETE FROM t1 WHERE c2=1 LIMIT 1;
Comparing tables master:test.t1 and slave:test.t1
include/diff_tables.inc [master:t1, slave:t1]
DROP TABLE t1;
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
include/rpl_reset.inc
CREATE TABLE t1 (c1 CHAR) Engine=NDB;
INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ;
SELECT * FROM t1;
c1
w
UPDATE t1 SET c1=NULL WHERE c1='w';
Comparing tables master:test.t1 and slave:test.t1
include/diff_tables.inc [master:t1, slave:t1]
DELETE FROM t1 LIMIT 2;
Comparing tables master:test.t1 and slave:test.t1
include/diff_tables.inc [master:t1, slave:t1]
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 PROCEDURE IF EXISTS test.p1;
DROP PROCEDURE IF EXISTS test.p2;
DROP TABLE IF EXISTS test.t1;
@ -47,3 +43,4 @@ a
DROP PROCEDURE IF EXISTS test.p1;
DROP PROCEDURE IF EXISTS test.p2;
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 t1;
DROP TABLE IF EXISTS t2;
DROP PROCEDURE IF EXISTS p1;
@ -42,3 +38,4 @@ DROP TABLE t1;
DROP TABLE t2;
DROP PROCEDURE p1;
DROP PROCEDURE p2;
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 = STATEMENT;
*** Test 1 ***
@ -123,12 +119,7 @@ master-bin.000002 # Xid 1 <end_pos> COMMIT /* XID */
** Test 4 **
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
include/rpl_reset.inc
select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos
from mysql.ndb_apply_status;
@ -142,3 +133,4 @@ master-bin.000001 # Xid 1 <end_pos> COMMIT /* XID */
*** DUMP MASTER & SLAVE FOR COMPARE ********
DROP DATABASE tpcb;
****** Do dumps compare ************
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]
STOP SLAVE;
CREATE DATABASE ndbsynctest;
USE ndbsynctest;
@ -68,7 +64,7 @@ CHANGE MASTER TO
master_log_file = 'master-bin.000001',
master_log_pos = <the_pos> ;
START SLAVE;
Checking that both slave threads are running.
include/check_slave_is_running.inc
SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
hex(c1) hex(c2) c3
1 1 row1
@ -89,3 +85,4 @@ Position File epoch inserts updates deletes schemaops
reset slave;
select * from mysql.ndb_apply_status;
server_id epoch log_name start_pos end_pos
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 TRIGGER test.t1_bi_t2;
DROP TABLE IF EXISTS test.t1;
DROP TABLE IF EXISTS test.t2;
@ -28,3 +24,4 @@ n f
DROP TRIGGER test.t1_bi_t2;
DROP TABLE test.t1;
DROP TABLE test.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 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'NDB' ;
SELECT * FROM t1;
C1 C2
@ -422,11 +418,7 @@ a b c
**** Test for BUG#31552 ****
**** On Master ****
DELETE FROM t1;
**** Resetting master and slave ****
include/stop_slave.inc
RESET SLAVE;
RESET MASTER;
include/start_slave.inc
include/rpl_reset.inc
**** On Master ****
INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
**** On Master ****
@ -436,7 +428,7 @@ DELETE FROM t1;
SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
COUNT(*) 0
set @@global.slave_exec_mode= default;
Checking that both slave threads are running.
include/check_slave_is_running.inc
SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
COUNT(*) 0
**** Test for BUG#37076 ****
@ -478,50 +470,44 @@ j INT NOT NULL) ENGINE = 'NDB' ;
[expecting slave to replicate correctly]
INSERT INTO t1 VALUES (1, "", 1);
INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2);
Comparing tables master:test.t1 and slave:test.t1
include/diff_tables.inc [master:t1, slave:t1]
[expecting slave to replicate correctly]
INSERT INTO t2 VALUES (1, "", 1);
INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
Comparing tables master:test.t2 and slave:test.t2
include/diff_tables.inc [master:t2, slave:t2]
[expecting slave to stop]
INSERT INTO t3 VALUES (1, "", 1);
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
START SLAVE;
include/wait_for_slave_sql_error.inc [errno=1535]
Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.'
include/rpl_reset.inc
[expecting slave to replicate correctly]
INSERT INTO t4 VALUES (1, "", 1);
INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2);
Comparing tables master:test.t4 and slave:test.t4
include/diff_tables.inc [master:t4, slave:t4]
[expecting slave to stop]
INSERT INTO t5 VALUES (1, "", 1);
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
START SLAVE;
include/wait_for_slave_sql_error.inc [errno=1535]
Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.'
include/rpl_reset.inc
[expecting slave to stop]
INSERT INTO t6 VALUES (1, "", 1);
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
START SLAVE;
include/wait_for_slave_sql_error.inc [errno=1535]
Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.'
include/rpl_reset.inc
[expecting slave to replicate correctly]
INSERT INTO t7 VALUES (1, "", 1);
INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2);
Comparing tables master:test.t7 and slave:test.t7
include/diff_tables.inc [master:t7, slave:t7]
drop table t1, t2, t3, t4, t5, t6, t7;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE='NDB' ;
INSERT INTO t1 VALUES (1), (2), (3);
UPDATE t1 SET a = 10;
ERROR 23000: Duplicate entry '10' for key 'PRIMARY'
INSERT INTO t1 VALUES (4);
Comparing tables master:test.t1 and slave:test.t1
include/diff_tables.inc [master:t1, slave:t1]
drop table t1;
DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (
@ -575,7 +561,7 @@ ERROR 23000: Duplicate entry '6' for key 'PRIMARY'
DELETE FROM t2 WHERE `pk` < 7 LIMIT 1;
UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6;
*** results: t2 must be consistent ****
Comparing tables master:test.t2 and master:test.t2
include/diff_tables.inc [master:t2, master:t2]
DROP TABLE t1, t2;
EOF OF TESTS
CREATE TABLE t1 (a int) ENGINE='NDB' ;
@ -591,7 +577,7 @@ UPDATE t1 SET a = 9 WHERE a < 3;
INSERT INTO t1 ( a ) VALUES ( 3 );
UPDATE t1 SET a = 0 WHERE a < 4;
UPDATE t1 SET a = 8 WHERE a < 5;
Comparing tables master:test.t1 and slave:test.t1
include/diff_tables.inc [master:t1, slave:t1]
drop table t1;
CREATE TABLE t1 (a bit) ENGINE='NDB' ;
INSERT IGNORE INTO t1 VALUES (NULL);
@ -633,5 +619,6 @@ DELETE FROM t1 WHERE a < 3 LIMIT 0;
UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2;
INSERT INTO t1 ( a ) VALUES ( 1 );
UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3;
Comparing tables master:test.t1 and slave:test.t1
include/diff_tables.inc [master:t1, slave:t1]
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]
**** On Master ****
CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB;
INSERT INTO t1 VALUES (1,1), (2,2);
@ -87,3 +83,4 @@ master-bin.000001 # Write_rows # # table_id: #
master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE t1
include/rpl_end.inc

View File

@ -33,3 +33,4 @@ CREATE TABLE mysql.ndb_apply_status
--connection slave
drop table mysql.ndb_apply_status;
--source include/rpl_end.inc

View File

@ -32,3 +32,4 @@ CREATE TABLE mysql.ndb_apply_status
--connection slave
drop table mysql.ndb_apply_status;
--source include/rpl_end.inc

View File

@ -17,3 +17,4 @@ SET storage_engine=ndb;
--echo
connection slave;
--source extra/rpl_tests/rpl_ndb_2multi_basic.test
--source include/rpl_end.inc

View File

@ -48,3 +48,4 @@ SET storage_engine=innodb;
connection slave;
drop table mysql.ndb_apply_status;
set @@global.slave_exec_mode= @old_slave_exec_mode;
--source include/rpl_end.inc

View File

@ -6,3 +6,4 @@
--source include/ndb_master-slave.inc
let $engine_type=NDB;
--source extra/rpl_tests/rpl_row_UUID.test
--source include/rpl_end.inc

View File

@ -24,3 +24,4 @@ select count(*) from mysql.ndb_apply_status;
connection master;
drop table t1;
sync_slave_with_master;
--source include/rpl_end.inc

View File

@ -116,3 +116,4 @@ drop table t1;
# End cleanup
sync_slave_with_master;
--source include/rpl_end.inc

View File

@ -179,3 +179,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/master_BANK.sql $MYSQLTEST_VARDIR/tmp/slave_BAN
--dec $2
}
--source include/rpl_end.inc

View File

@ -188,7 +188,6 @@ UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1;
# Wait for deadlock to be detected.
# When detected, the slave will stop, so we just wait for it to stop.
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
# Replication should have stopped, since max retries were not enough.
# verify with show slave status
@ -259,4 +258,4 @@ SELECT c1 FROM t1 ORDER BY c1 LIMIT 5;
# cleanup
--connection master
DROP TABLE t1;
-- source include/master-slave-end.inc
--source include/rpl_end.inc

View File

@ -139,3 +139,4 @@ drop table t1;
#let $VERSION=`select version()`;
#--replace_result $VERSION VERSION
#show binlog events;
--source include/rpl_end.inc

View File

@ -8,3 +8,4 @@
let $engine_type=NDBCLUSTER;
-- source extra/rpl_tests/rpl_row_blob.test
--source include/rpl_end.inc

View File

@ -1,15 +1,16 @@
--source include/have_ndb.inc
--source include/ndb_master-slave.inc
# set up circular replication
--let $rpl_topology= 1->2->1
--source include/rpl_init.inc
--connection slave
RESET MASTER;
--let $rpl_connection_name= master
--let $rpl_server_number= 1
--source include/rpl_connect.inc
--connection master
--replace_result $SLAVE_MYPORT SLAVE_PORT
--eval CHANGE MASTER TO master_host="127.0.0.1",master_port=$SLAVE_MYPORT,master_user="root"
START SLAVE;
--let $rpl_connection_name= slave
--let $rpl_server_number= 2
--source include/rpl_connect.inc
# create the table on the "slave"
@ -51,3 +52,6 @@ STOP SLAVE;
--connection master
DROP TABLE t1;
-- sync_slave_with_master
--let $rpl_only_running_threads= 1
--source include/rpl_end.inc

View File

@ -12,13 +12,7 @@ skip-slave-start
[mysqld.2.slave]
server-id= 2
master-host= 127.0.0.1
master-port= @mysqld.2.1.port
master-password= @mysqld.2.1.#password
master-user= @mysqld.2.1.#user
master-connect-retry= 1
init-rpl-role= slave
skip-slave-start
log-bin
ndb_connectstring= @mysql_cluster.slave.ndb_connectstring
[ENV]

View File

@ -75,9 +75,7 @@ let $wait_condition= SELECT COUNT(*)=40 FROM t1 WHERE c = 1;
# Check data
--echo Check data on both clusters
let $diff_table_1=master:test.t1;
let $diff_table_2=slave:test.t1;
let $diff_tables= master:t1, slave:t1;
source include/diff_tables.inc;
--echo *** Transaction testing ***
@ -116,9 +114,7 @@ let $wait_condition= SELECT COUNT(*)=400 FROM t1 WHERE c = 2;
--source include/wait_condition.inc
--echo Check data on both clusters
let $diff_table_1=master:test.t1;
let $diff_table_2=slave:test.t1;
let $diff_tables= master:t1, slave:t1;
source include/diff_tables.inc;
# Start transaction and then roll back
@ -155,18 +151,17 @@ let $wait_condition= SELECT COUNT(*)=200 FROM t1 WHERE c = 3;
--source include/wait_condition.inc
--echo Check data on both clusters
let $diff_table_1=master:test.t1;
let $diff_table_2=slave:test.t1;
let $diff_tables= master:t1, slave:t1;
source include/diff_tables.inc;
# Clean up
--connection master
DROP TABLE t1;
--connection slave
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
--connection slave
# Wait until table is dropped on slave.
--let $query= SELECT COUNT(*) FROM t1
--source include/wait_for_query_to_fail.inc
--echo
# End of test 5.1
--source include/rpl_end.inc

View File

@ -31,9 +31,9 @@ INSERT INTO t1 VALUES (2,3);
# Replicate back to the master to test this mixed event on the master
STOP SLAVE;
--let $rpl_topology= 1->2->1
--source include/rpl_change_topology.inc
connection master;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=$SLAVE_MYPORT,MASTER_USER="root";
START SLAVE;
@ -76,3 +76,6 @@ source include/check_slave_is_running.inc;
-- connection master
DROP TABLE t1;
-- sync_slave_with_master
--let $rpl_only_running_threads= 1
--source include/rpl_end.inc

View File

@ -8,3 +8,4 @@
-- source include/ndb_master-slave.inc
let $engine_type=NDB;
-- source extra/rpl_tests/rpl_commit_after_flush.test
--source include/rpl_end.inc

View File

@ -41,3 +41,4 @@ select * from t1 order by nid;
connection master;
DROP TABLE t1;
sync_slave_with_master;
--source include/rpl_end.inc

View File

@ -82,4 +82,4 @@ drop datafile 'datafile02.dat'
engine=ndb;
DROP TABLESPACE ts1 ENGINE=NDB;
DROP LOGFILE GROUP lg1 ENGINE=NDB;
-- source include/master-slave-end.inc
--source include/rpl_end.inc

View File

@ -308,3 +308,4 @@ DROP LOGFILE GROUP lg1 ENGINE=NDB;
--sync_slave_with_master
# End of 5.1 test case
--source include/rpl_end.inc

View File

@ -31,3 +31,4 @@ let $temp_engine_type= MEMORY;
let $show_binlog = 0;
let $manipulate = 0;
-- source extra/rpl_tests/rpl_ddl.test
--source include/rpl_end.inc

View File

@ -6,3 +6,4 @@
-- source include/ndb_master-slave.inc
let $engine_type=NDB;
-- source extra/rpl_tests/rpl_delete_no_where.test
--source include/rpl_end.inc

View File

@ -54,3 +54,4 @@ DROP DATABASE IF EXISTS replica;
--sync_slave_with_master
# End 5.1 test case
--source include/rpl_end.inc

View File

@ -43,3 +43,4 @@ INSERT INTO t1 VALUES (3, repeat('bad too',1));
connection master;
DROP TABLE IF EXISTS t1, t2;
--sync_slave_with_master
--source include/rpl_end.inc

View File

@ -11,3 +11,4 @@ let $engine_type = 'NDB';
-- source extra/rpl_tests/rpl_extraSlave_Col.test
--source include/rpl_end.inc

View File

@ -10,4 +10,4 @@
-- source include/ndb_master-slave.inc
let $engine_type=NDB;
-- source extra/rpl_tests/rpl_row_func003.test
-- source include/master-slave-end.inc
--source include/rpl_end.inc

View File

@ -106,4 +106,4 @@ connection master;
DROP TABLE IF EXISTS t1;
# End of 5.1 Test
-- source include/master-slave-end.inc
--source include/rpl_end.inc

View File

@ -13,3 +13,4 @@
-- source include/ndb_master-slave.inc
SET storage_engine=innodb;
--source extra/rpl_tests/rpl_ndb_2multi_eng.test
--source include/rpl_end.inc

View File

@ -64,3 +64,4 @@ connection master;
drop table t1,t2;
sync_slave_with_master;
--source include/rpl_end.inc

View File

@ -6,3 +6,4 @@
let $engine_type=NDB;
let $engine_type2=myisam;
-- source extra/rpl_tests/rpl_insert_ignore.test
--source include/rpl_end.inc

View File

@ -64,3 +64,4 @@ CREATE TABLE SERVER
#
--exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING ../storage/ndb/test/ndbapi/DbCreate >> $NDB_TOOLS_OUTPUT
--exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING ../storage/ndb/test/ndbapi/DbAsyncGenerator >> $NDB_TOOLS_OUTPUT
--source include/rpl_end.inc

View File

@ -11,3 +11,4 @@
let $engine_type=NDB;
-- source extra/rpl_tests/rpl_log.test
--source include/rpl_end.inc

View File

@ -448,16 +448,13 @@ SELECT * FROM tndb ORDER BY a;
--echo [on slave]
--sync_slave_with_master
let $diff_table_1=master:test.tmyisam;
let $diff_table_2=slave:test.tmyisam;
let $diff_tables= master:tmyisam, slave:tmyisam;
source include/diff_tables.inc;
let $diff_table_1=master:test.tinnodb;
let $diff_table_2=slave:test.tinnodb;
let $diff_tables= master:tinnodb, slave:tinnodb;
source include/diff_tables.inc;
let $diff_table_1=master:test.tndb;
let $diff_table_2=slave:test.tndb;
let $diff_tables= master:tndb, slave:tndb;
source include/diff_tables.inc;
@ -470,4 +467,4 @@ DROP TABLE tmyisam, tinnodb, tndb;
--echo [on slave]
sync_slave_with_master;
source include/master-slave-end.inc;
--source include/rpl_end.inc

View File

@ -316,28 +316,22 @@ SELECT * FROM ndb_myisam ORDER BY a;
SELECT * FROM innodb_ndb ORDER BY a;
SELECT * FROM ndb_innodb ORDER BY a;
let $diff_table_1=master:test.myisam_innodb;
let $diff_table_2=slave:test.myisam_innodb;
let $diff_tables= master:myisam_innodb, slave:myisam_innodb;
source include/diff_tables.inc;
let $diff_table_1=master:test.innodb_myisam;
let $diff_table_2=slave:test.innodb_myisam;
let $diff_tables= master:innodb_myisam, slave:innodb_myisam;
source include/diff_tables.inc;
let $diff_table_1=master:test.myisam_ndb;
let $diff_table_2=slave:test.myisam_ndb;
let $diff_tables= master:myisam_ndb, slave:myisam_ndb;
source include/diff_tables.inc;
let $diff_table_1=master:test.ndb_myisam;
let $diff_table_2=slave:test.ndb_myisam;
let $diff_tables= master:ndb_myisam, slave:ndb_myisam;
source include/diff_tables.inc;
let $diff_table_1=master:test.innodb_ndb;
let $diff_table_2=slave:test.innodb_ndb;
let $diff_tables= master:innodb_ndb, slave:innodb_ndb;
source include/diff_tables.inc;
let $diff_table_1=master:test.ndb_innodb;
let $diff_table_2=slave:test.ndb_innodb;
let $diff_tables= master:ndb_innodb, slave:ndb_innodb;
source include/diff_tables.inc;
@ -347,3 +341,4 @@ drop table myisam_innodb, innodb_myisam;
drop table myisam_ndb, ndb_myisam;
drop table innodb_ndb, ndb_innodb;
sync_slave_with_master;
--source include/rpl_end.inc

View File

@ -1,6 +1,11 @@
--source include/have_multi_ndb.inc
--source include/have_binlog_format_mixed_or_row.inc
--source include/ndb_master-slave.inc
# We need server 3 later on in this test.
--let $rpl_server_count= 3
--source include/master-slave.inc
--connection master
# note: server2 is another "master" connected to the master cluster
@ -38,13 +43,12 @@ let $the_pos= `SELECT @the_pos` ;
let $the_file= `SELECT @the_file` ;
# now connect the slave to the _other_ "master"
connection slave;
--replace_result $MASTER_MYPORT1 <MASTER_PORT1> $the_pos MASTER_LOG_POS $the_file MASTER_LOG_FILE
eval CHANGE MASTER TO
master_port=$MASTER_MYPORT1,
master_log_file = '$the_file',
master_log_pos = $the_pos ;
start slave;
--let $rpl_topology= 3->2
--let $rpl_master_log_file= 2:$the_file
--let $rpl_master_log_pos= 2:$the_pos
--source include/rpl_change_topology.inc
--connection slave
--source include/start_slave.inc
# insert some more values on the first master
connection master;
@ -61,7 +65,6 @@ connection server2;
INSERT INTO t1 VALUES ("row5","E",5);
SELECT * FROM t1 ORDER BY c3;
sync_slave_with_master;
connection slave;
SELECT * FROM t1 ORDER BY c3;
--echo ==== clean up ====
@ -69,4 +72,4 @@ connection server2;
DROP TABLE t1;
sync_slave_with_master;
STOP SLAVE;
--source include/rpl_end.inc

View File

@ -11,3 +11,4 @@
let $engine_type=NDB;
--source extra/rpl_tests/rpl_multi_update2.test
--source include/rpl_end.inc

View File

@ -6,3 +6,4 @@
-- source include/ndb_master-slave.inc
let $engine_type=NDB;
-- source extra/rpl_tests/rpl_multi_update3.test
--source include/rpl_end.inc

View File

@ -12,3 +12,4 @@
-- source include/ndb_master-slave.inc
SET storage_engine=myisam;
--source extra/rpl_tests/rpl_ndb_2multi_eng.test
--source include/rpl_end.inc

View File

@ -7,3 +7,4 @@
-- source include/ndb_master-slave.inc
let $engine_type=NDB;
-- source extra/rpl_tests/rpl_relayrotate.test
--source include/rpl_end.inc

View File

@ -55,3 +55,4 @@ DROP DATABASE IF EXISTS replica;
--sync_slave_with_master
# End 5.1 test case
--source include/rpl_end.inc

View File

@ -5,3 +5,4 @@
-- source include/ndb_master-slave.inc
let $engine_type=NDB;
-- source extra/rpl_tests/rpl_row_001.test
--source include/rpl_end.inc

View File

@ -4,3 +4,4 @@
-- let $engine= NDB
-- source extra/rpl_tests/rpl_set_null.test
--source include/rpl_end.inc

View File

@ -8,3 +8,4 @@
-- source include/ndb_master-slave.inc
let $engine_type=NDBCLUSTER;
-- source extra/rpl_tests/rpl_row_sp003.test
--source include/rpl_end.inc

View File

@ -8,3 +8,4 @@
-- source include/ndb_master-slave.inc
let $engine_type=NDBCLUSTER;
-- source extra/rpl_tests/rpl_row_sp006.test
--source include/rpl_end.inc

View File

@ -35,3 +35,4 @@ SET binlog_format = STATEMENT;
let $off_set = 6;
let $rpl_format = 'SBR';
--source extra/rpl_tests/rpl_ndb_apply_status.test
--source include/rpl_end.inc

View File

@ -98,3 +98,5 @@ reset slave;
select * from mysql.ndb_apply_status;
# End 5.1 Test
--let $rpl_only_running_threads= 1
--source include/rpl_end.inc

View File

@ -12,3 +12,4 @@
let $engine_type=NDB;
-- source extra/rpl_tests/rpl_trig004.test
--source include/rpl_end.inc

View File

@ -9,3 +9,4 @@
--exec echo Running mgmapi_logevent
--exec $NDB_EXAMPLES_DIR/mgmapi_logevent/mgmapi_logevent "$NDB_CONNECTSTRING" "$NDB_CONNECTSTRING_SLAVE" 1 >> $NDB_EXAMPLES_OUTPUT
--source include/rpl_end.inc

View File

@ -5,4 +5,4 @@
let $type= 'NDB' ;
let $extra_index= ;
-- source extra/rpl_tests/rpl_row_basic.test
-- source include/master-slave-end.inc
--source include/rpl_end.inc

View File

@ -63,4 +63,4 @@ connection master;
DROP TABLE t1;
source include/show_binlog_events.inc;
-- source include/master-slave-end.inc
--source include/rpl_end.inc

View File

@ -9,3 +9,4 @@
--source include/have_binlog_format_mixed.inc
--source include/big_test.inc
--source suite/rpl_ndb/t/rpl_truncate_7ndb.test
--source include/rpl_end.inc