mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
Merge jmiller@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb
into mysql.com:/data2/mysql-5.1-new-ndb
This commit is contained in:
commit
385393e6b2
9 changed files with 286 additions and 0 deletions
60
mysql-test/r/rpl_ndb_do_db.result
Normal file
60
mysql-test/r/rpl_ndb_do_db.result
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
stop slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,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 replica;
|
||||||
|
Warnings:
|
||||||
|
Note 1008 Can't drop database 'replica'; database doesn't exist
|
||||||
|
CREATE DATABASE replica;
|
||||||
|
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;
|
||||||
|
USE replica;
|
||||||
|
CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB;
|
||||||
|
CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB;
|
||||||
|
USE test;
|
||||||
|
INSERT INTO t1 VALUES(1, repeat('abc',10));
|
||||||
|
INSERT INTO t2 VALUES(1, repeat('abc',10));
|
||||||
|
SHOW TABLES;
|
||||||
|
Tables_in_test
|
||||||
|
t1
|
||||||
|
t2
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
COUNT(*)
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) FROM t2;
|
||||||
|
COUNT(*)
|
||||||
|
1
|
||||||
|
USE replica;
|
||||||
|
INSERT INTO replica.t1 VALUES(2, repeat('def',200));
|
||||||
|
INSERT INTO replica.t2 VALUES(2, repeat('def',200));
|
||||||
|
SHOW TABLES;
|
||||||
|
Tables_in_replica
|
||||||
|
t1
|
||||||
|
t2
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
COUNT(*)
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) FROM t2;
|
||||||
|
COUNT(*)
|
||||||
|
1
|
||||||
|
SHOW TABLES;
|
||||||
|
Tables_in_test
|
||||||
|
USE replica;
|
||||||
|
SHOW TABLES;
|
||||||
|
Tables_in_replica
|
||||||
|
t1
|
||||||
|
t2
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
COUNT(*)
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) FROM t2;
|
||||||
|
COUNT(*)
|
||||||
|
1
|
||||||
|
USE test;
|
||||||
|
SHOW TABLES;
|
||||||
|
Tables_in_test
|
||||||
|
USE test;
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
DROP DATABASE IF EXISTS replica;
|
25
mysql-test/r/rpl_ndb_do_table.result
Normal file
25
mysql-test/r/rpl_ndb_do_table.result
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
stop slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,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;
|
||||||
|
Warnings:
|
||||||
|
Note 1051 Unknown table 't1'
|
||||||
|
Note 1051 Unknown table '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;
|
||||||
|
INSERT INTO t1 VALUES(1, repeat('abc',10));
|
||||||
|
INSERT INTO t1 VALUES(2, repeat('def',200));
|
||||||
|
INSERT INTO t1 VALUES(3, repeat('ghi',3000));
|
||||||
|
INSERT INTO t2 VALUES(1, repeat('abc',10));
|
||||||
|
INSERT INTO t2 VALUES(2, repeat('def',200));
|
||||||
|
INSERT INTO t2 VALUES(3, repeat('ghi',3000));
|
||||||
|
SHOW TABLES;
|
||||||
|
Tables_in_test
|
||||||
|
t1
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
COUNT(*)
|
||||||
|
3
|
||||||
|
DROP TABLE IF EXISTS t1, t2;
|
56
mysql-test/r/rpl_ndb_rep_ignore.result
Normal file
56
mysql-test/r/rpl_ndb_rep_ignore.result
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
stop slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,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 replica;
|
||||||
|
Warnings:
|
||||||
|
Note 1008 Can't drop database 'replica'; database doesn't exist
|
||||||
|
CREATE DATABASE replica;
|
||||||
|
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;
|
||||||
|
USE replica;
|
||||||
|
CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB;
|
||||||
|
CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB;
|
||||||
|
USE test;
|
||||||
|
INSERT INTO t1 VALUES(1, repeat('abc',10));
|
||||||
|
INSERT INTO t2 VALUES(1, repeat('abc',10));
|
||||||
|
SHOW TABLES;
|
||||||
|
Tables_in_test
|
||||||
|
t1
|
||||||
|
t2
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
COUNT(*)
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) FROM t2;
|
||||||
|
COUNT(*)
|
||||||
|
1
|
||||||
|
USE replica;
|
||||||
|
INSERT INTO replica.t1 VALUES(2, repeat('def',200));
|
||||||
|
INSERT INTO replica.t2 VALUES(2, repeat('def',200));
|
||||||
|
SHOW TABLES;
|
||||||
|
Tables_in_replica
|
||||||
|
t1
|
||||||
|
t2
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
COUNT(*)
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) FROM t2;
|
||||||
|
COUNT(*)
|
||||||
|
1
|
||||||
|
SHOW TABLES;
|
||||||
|
Tables_in_test
|
||||||
|
USE replica;
|
||||||
|
SHOW TABLES;
|
||||||
|
Tables_in_replica
|
||||||
|
t2
|
||||||
|
SELECT COUNT(*) FROM t2;
|
||||||
|
COUNT(*)
|
||||||
|
1
|
||||||
|
USE test;
|
||||||
|
SHOW TABLES;
|
||||||
|
Tables_in_test
|
||||||
|
USE test;
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
DROP DATABASE IF EXISTS replica;
|
1
mysql-test/t/rpl_ndb_do_db-slave.opt
Normal file
1
mysql-test/t/rpl_ndb_do_db-slave.opt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
--replicate-do-db=replica
|
55
mysql-test/t/rpl_ndb_do_db.test
Normal file
55
mysql-test/t/rpl_ndb_do_db.test
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
###########################################################
|
||||||
|
# Author: Jeb
|
||||||
|
# Date: 14-12-2006
|
||||||
|
# Purpose: To test --replicate-do-database=db_name
|
||||||
|
# using cluster. Only replica should replicate.
|
||||||
|
##########################################################
|
||||||
|
|
||||||
|
--source include/have_ndb.inc
|
||||||
|
--source include/have_binlog_format_row.inc
|
||||||
|
--source include/master-slave.inc
|
||||||
|
|
||||||
|
DROP DATABASE IF EXISTS replica;
|
||||||
|
|
||||||
|
# Create database and tables for the test.
|
||||||
|
CREATE DATABASE replica;
|
||||||
|
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;
|
||||||
|
USE replica;
|
||||||
|
CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB;
|
||||||
|
CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB;
|
||||||
|
|
||||||
|
# Insert data into db that should not be picked up by slave
|
||||||
|
USE test;
|
||||||
|
INSERT INTO t1 VALUES(1, repeat('abc',10));
|
||||||
|
INSERT INTO t2 VALUES(1, repeat('abc',10));
|
||||||
|
SHOW TABLES;
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
SELECT COUNT(*) FROM t2;
|
||||||
|
|
||||||
|
# Insert data into db that should be replicated
|
||||||
|
USE replica;
|
||||||
|
INSERT INTO replica.t1 VALUES(2, repeat('def',200));
|
||||||
|
INSERT INTO replica.t2 VALUES(2, repeat('def',200));
|
||||||
|
SHOW TABLES;
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
SELECT COUNT(*) FROM t2;
|
||||||
|
|
||||||
|
# Check results on slave
|
||||||
|
--sync_slave_with_master
|
||||||
|
SHOW TABLES;
|
||||||
|
USE replica;
|
||||||
|
SHOW TABLES;
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
SELECT COUNT(*) FROM t2;
|
||||||
|
USE test;
|
||||||
|
SHOW TABLES;
|
||||||
|
|
||||||
|
# Cleanup from testing
|
||||||
|
connection master;
|
||||||
|
USE test;
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
DROP DATABASE IF EXISTS replica;
|
||||||
|
--sync_slave_with_master
|
||||||
|
|
||||||
|
# End 5.1 test case
|
1
mysql-test/t/rpl_ndb_do_table-slave.opt
Normal file
1
mysql-test/t/rpl_ndb_do_table-slave.opt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
--replicate-do-table=test.t1
|
31
mysql-test/t/rpl_ndb_do_table.test
Normal file
31
mysql-test/t/rpl_ndb_do_table.test
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
###########################################################
|
||||||
|
# Author: Jeb
|
||||||
|
# Date: 14-12-2006
|
||||||
|
# Purpose: To test --replicate-do-table=db_name.tbl_name
|
||||||
|
# using cluster. Only t1 should replicate.
|
||||||
|
##########################################################
|
||||||
|
|
||||||
|
--source include/have_ndb.inc
|
||||||
|
--source include/have_binlog_format_row.inc
|
||||||
|
--source include/master-slave.inc
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
INSERT INTO t1 VALUES(1, repeat('abc',10));
|
||||||
|
INSERT INTO t1 VALUES(2, repeat('def',200));
|
||||||
|
INSERT INTO t1 VALUES(3, repeat('ghi',3000));
|
||||||
|
INSERT INTO t2 VALUES(1, repeat('abc',10));
|
||||||
|
INSERT INTO t2 VALUES(2, repeat('def',200));
|
||||||
|
INSERT INTO t2 VALUES(3, repeat('ghi',3000));
|
||||||
|
|
||||||
|
--sync_slave_with_master
|
||||||
|
SHOW TABLES;
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
DROP TABLE IF EXISTS t1, t2;
|
||||||
|
--sync_slave_with_master
|
1
mysql-test/t/rpl_ndb_rep_ignore-slave.opt
Normal file
1
mysql-test/t/rpl_ndb_rep_ignore-slave.opt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
--replicate-ignore-db=test --replicate-ignore-table=replica.t1
|
56
mysql-test/t/rpl_ndb_rep_ignore.test
Normal file
56
mysql-test/t/rpl_ndb_rep_ignore.test
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
###########################################################
|
||||||
|
# Author: Jeb
|
||||||
|
# Date: 15-12-2006
|
||||||
|
# Purpose: To test --replicate-ignore-table=db_name.tbl_name
|
||||||
|
# and --replicate-ignore-db=db_name
|
||||||
|
# using cluster. Only replica should replicate.
|
||||||
|
##########################################################
|
||||||
|
|
||||||
|
--source include/have_ndb.inc
|
||||||
|
--source include/have_binlog_format_row.inc
|
||||||
|
--source include/master-slave.inc
|
||||||
|
|
||||||
|
DROP DATABASE IF EXISTS replica;
|
||||||
|
|
||||||
|
# Create database and tables for the test.
|
||||||
|
CREATE DATABASE replica;
|
||||||
|
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;
|
||||||
|
USE replica;
|
||||||
|
CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB;
|
||||||
|
CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB;
|
||||||
|
|
||||||
|
# Insert data into db that should not be picked up by slave
|
||||||
|
USE test;
|
||||||
|
INSERT INTO t1 VALUES(1, repeat('abc',10));
|
||||||
|
INSERT INTO t2 VALUES(1, repeat('abc',10));
|
||||||
|
SHOW TABLES;
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
SELECT COUNT(*) FROM t2;
|
||||||
|
|
||||||
|
# Insert data into db that should be replicated
|
||||||
|
USE replica;
|
||||||
|
INSERT INTO replica.t1 VALUES(2, repeat('def',200));
|
||||||
|
INSERT INTO replica.t2 VALUES(2, repeat('def',200));
|
||||||
|
SHOW TABLES;
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
SELECT COUNT(*) FROM t2;
|
||||||
|
|
||||||
|
# Check results on slave
|
||||||
|
--sync_slave_with_master
|
||||||
|
SHOW TABLES;
|
||||||
|
USE replica;
|
||||||
|
SHOW TABLES;
|
||||||
|
#SELECT COUNT(*) FROM t1;
|
||||||
|
SELECT COUNT(*) FROM t2;
|
||||||
|
USE test;
|
||||||
|
SHOW TABLES;
|
||||||
|
|
||||||
|
# Cleanup from testing
|
||||||
|
connection master;
|
||||||
|
USE test;
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
DROP DATABASE IF EXISTS replica;
|
||||||
|
--sync_slave_with_master
|
||||||
|
|
||||||
|
# End 5.1 test case
|
Loading…
Add table
Reference in a new issue