Commit e823ca5b authored by unknown's avatar unknown

Merge jmiller@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb

into  mysql.com:/data2/mysql-5.1-new-ndb

parents 5c34add9 756666d7
stop slave;
drop table if exists t1,t2,t3,t4,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;
stop slave;
drop table if exists t1,t2,t3,t4,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;
stop slave;
drop table if exists t1,t2,t3,t4,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;
###########################################################
# 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
--replicate-do-table=test.t1
###########################################################
# 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
--replicate-ignore-db=test --replicate-ignore-table=replica.t1
###########################################################
# 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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment