diff options
Diffstat (limited to 'mysql-test/suite/ndb_team')
19 files changed, 0 insertions, 4832 deletions
diff --git a/mysql-test/suite/ndb_team/r/ndb_autodiscover.result b/mysql-test/suite/ndb_team/r/ndb_autodiscover.result deleted file mode 100644 index 487f52f6427..00000000000 --- a/mysql-test/suite/ndb_team/r/ndb_autodiscover.result +++ /dev/null @@ -1,397 +0,0 @@ -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -flush status; -create table t1( -id int not null primary key, -name char(20) -) engine=ndb; -insert into t1 values(1, "Autodiscover"); -flush tables; -select * from t1; -id name -1 Autodiscover -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -flush tables; -insert into t1 values (2, "Auto 2"); -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -insert into t1 values (3, "Discover 3"); -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -flush tables; -select * from t1 order by id; -id name -1 Autodiscover -2 Auto 2 -3 Discover 3 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 3 -flush tables; -update t1 set name="Autodiscover" where id = 2; -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 4 -select * from t1 order by id; -id name -1 Autodiscover -2 Autodiscover -3 Discover 3 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 4 -flush tables; -delete from t1 where id = 3; -select * from t1 order by id; -id name -1 Autodiscover -2 Autodiscover -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 5 -drop table t1; -flush status; -create table t2( -id int not null primary key, -name char(22) -) engine=ndb; -insert into t2 values (1, "Discoverer"); -select * from t2; -id name -1 Discoverer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -flush tables; -select * from t2; -id name -1 Discoverer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -drop table t2; -flush status; -create table t3( -id int not null primary key, -name char(255) -) engine=ndb; -insert into t3 values (1, "Explorer"); -select * from t3; -id name -1 Explorer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -flush tables; -create table t3( -id int not null primary key, -name char(20), a int, b float, c char(24) -) engine=ndb; -ERROR 42S01: Table 't3' already exists -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -create table IF NOT EXISTS t3( -id int not null primary key, -id2 int not null, -name char(20) -) engine=ndb; -Warnings: -Note 1050 Table 't3' already exists -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -SHOW CREATE TABLE t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `id` int(11) NOT NULL, - `name` char(255) default NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () -select * from t3; -id name -1 Explorer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -drop table t3; -flush status; -create table t7( -id int not null primary key, -name char(255) -) engine=ndb; -create table t6( -id int not null primary key, -name char(255) -) engine=MyISAM; -insert into t7 values (1, "Explorer"); -insert into t6 values (2, "MyISAM table"); -select * from t7; -id name -1 Explorer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -flush tables; -show tables from test; -Tables_in_test -t6 -t7 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -flush tables; -show table status; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t6 MyISAM 10 Fixed 1 # # # # 0 NULL # # NULL # NULL # -t7 NDBCLUSTER 10 Fixed 1 # # # # 0 NULL # # NULL # NULL # -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -drop table t6, t7; -flush status; -create table t4( -id int not null primary key, -name char(27) -) engine=ndb; -insert into t4 values (1, "Automatic"); -select * from t4; -id name -1 Automatic -select * from t4; -ERROR 42S02: Table 'test.t4' doesn't exist -select * from t4; -ERROR 42S02: Table 'test.t4' doesn't exist -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t4; -ERROR 42S02: Unknown table 't4' -create table t4( -id int not null primary key, -name char(27) -) engine=ndb; -insert into t4 values (1, "Automatic"); -select * from t4; -id name -1 Automatic -select * from t4; -ERROR 42S02: Table 'test.t4' doesn't exist -drop table if exists t4; -Warnings: -Error 155 Table 'test.t4' doesn't exist -drop table t5; -ERROR 42S02: Unknown table 't5' -drop table if exists t5; -Warnings: -Note 1051 Unknown table 't5' -flush status; -create table t4( -id int not null primary key, -id2 int, -name char(27) -) engine=ndb; -insert into t4 values (1, 76, "Automatic2"); -select * from t4; -id id2 name -1 76 Automatic2 -flush tables; -SHOW TABLES; -Tables_in_test -select * from t4; -ERROR 42S02: Table 'test.t4' doesn't exist -flush status; -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=myisam; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -create table t5(id int, d char(56)) engine=ndbcluster; -create table t6(id int) engine=ndbcluster; -create table t7(id int) engine=ndbcluster; -create table t8(id int, e char(34)) engine=myisam; -create table t9(id int) engine=myisam; -insert into t2 values (2, "myisam table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t5 values (5, "ndb table 5"); -insert into t6 values (6); -insert into t8 values (8, "myisam table 8"); -insert into t9 values (9); -SHOW TABLES; -Tables_in_test -t1 -t2 -t4 -t8 -t9 -t7 -t6 -select * from t6; -id -6 -select * from t7; -id -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -drop table t1, t2, t4, t6, t7, t8, t9; -flush status; -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=myisam; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -create table t5(id int, d char(56)) engine=ndbcluster; -create table t6(id int) engine=ndbcluster; -create table t7(id int) engine=ndbcluster; -create table t8(id int, e char(34)) engine=myisam; -create table t9(id int) engine=myisam; -insert into t2 values (2, "myisam table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t5 values (5, "ndb table 5"); -insert into t6 values (6); -insert into t8 values (8, "myisam table 8"); -insert into t9 values (9); -SHOW TABLES LIKE 't6'; -Tables_in_test (t6) -t6 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -create table t3(a int); -ERROR 42S01: Table 't3' already exists -create table t5(a int); -ERROR 42S01: Table 't5' already exists -SHOW TABLES LIKE 't%'; -Tables_in_test (t%) -t1 -t2 -t4 -t6 -t8 -t9 -t7 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -drop table t1, t2, t4, t6, t7, t8, t9; -flush status; -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=ndbcluster; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -insert into t1 values (1); -insert into t2 values (2, "table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t4 values (4); -flush tables; -select * from t1, t2, t3, t4; -id id b id c id -1 2 table 2 3 ndb table 3 4 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 3 -drop table t1, t2, t3, t4; -flush status; -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -create table t5( -id int not null primary key, -name char(200) -) engine=ndb; -insert into t5 values (1, "Magnus"); -select * from t5; -id name -1 Magnus -ALTER TABLE t5 ADD COLUMN adress char(255) FIRST; -select * from t5; -adress id name -NULL 1 Magnus -insert into t5 values -("Adress for record 2", 2, "Carl-Gustav"), -("Adress for record 3", 3, "Karl-Emil"); -update t5 set name="Bertil" where id = 2; -select * from t5 order by id; -adress id name -NULL 1 Magnus -Adress for record 2 2 Bertil -Adress for record 3 3 Karl-Emil -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t5; -flush status; -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -create table t6( -id int not null primary key, -name char(20) -) engine=ndb; -insert into t6 values (1, "Magnus"); -select * from t6; -id name -1 Magnus -ALTER TABLE t6 ADD COLUMN adress char(255) FIRST; -select * from t6; -adress id name -NULL 1 Magnus -insert into t6 values -("Adress for record 2", 2, "Carl-Gustav"), -("Adress for record 3", 3, "Karl-Emil"); -update t6 set name="Bertil" where id = 2; -select * from t6 order by id; -adress id name -NULL 1 Magnus -Adress for record 2 2 Bertil -Adress for record 3 3 Karl-Emil -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t6; -show tables; -Tables_in_test -create table t1 (a int,b longblob) engine=ndb; -show tables; -Tables_in_test -t1 -create database test2; -use test2; -show tables; -Tables_in_test2 -select * from t1; -ERROR 42S02: Table 'test2.t1' doesn't exist -create table t2 (b int,c longblob) engine=ndb; -use test; -select * from t1; -a b -show tables; -Tables_in_test -t1 -drop table t1; -use test2; -drop table t2; -drop database test2; -use test; -drop database if exists test_only_ndb_tables; -create database test_only_ndb_tables; -use test_only_ndb_tables; -create table t1 (a int primary key) engine=ndb; -select * from t1; -a -select * from t1; -ERROR HY000: Can't lock file (errno: 157) -use test; -drop database test_only_ndb_tables; -CREATE TABLE t9 ( -a int NOT NULL PRIMARY KEY, -b int -) engine=ndb; -insert t9 values(1, 2), (2,3), (3, 4), (4, 5); -create table t10 ( -a int not null primary key, -b blob -) engine=ndb; -insert into t10 values (1, 'kalle'); diff --git a/mysql-test/suite/ndb_team/r/ndb_autodiscover2.result b/mysql-test/suite/ndb_team/r/ndb_autodiscover2.result deleted file mode 100644 index 269888e0820..00000000000 --- a/mysql-test/suite/ndb_team/r/ndb_autodiscover2.result +++ /dev/null @@ -1,13 +0,0 @@ -select * from t9 order by a; -a b -1 2 -2 3 -3 4 -4 5 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t9; -select * from t10; -ERROR HY000: Got error 4263 'Invalid blob attributes or invalid blob parts table' from NDBCLUSTER -drop table t10; diff --git a/mysql-test/suite/ndb_team/r/ndb_autodiscover3.result b/mysql-test/suite/ndb_team/r/ndb_autodiscover3.result deleted file mode 100644 index 86495ebb3eb..00000000000 --- a/mysql-test/suite/ndb_team/r/ndb_autodiscover3.result +++ /dev/null @@ -1,53 +0,0 @@ -drop table if exists t1, t2; -create table t1 (a int key) engine=ndbcluster; -begin; -insert into t1 values (1); -insert into t1 values (2); -ERROR HY000: Got temporary error 4025 'Node failure caused abort of transaction' from NDBCLUSTER -commit; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -drop table t1; -create table t2 (a int, b int, primary key(a,b)) engine=ndbcluster; -insert into t2 values (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1); -select * from t2 order by a limit 3; -a b -1 1 -2 1 -3 1 -select * from t2; -ERROR 42S02: Table 'test.t2' doesn't exist -show tables like 't2'; -Tables_in_test (t2) -reset master; -create table t2 (a int key) engine=ndbcluster; -insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -select * from t2 order by a limit 3; -a -1 -2 -3 -select * from t2 order by a limit 3; -a -1 -2 -3 -reset master; -select * from t2; -ERROR 42S02: Table 'test.t2' doesn't exist -show tables like 't2'; -Tables_in_test (t2) -reset master; -create table t2 (a int key) engine=ndbcluster; -insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -select * from t2 order by a limit 3; -a -1 -2 -3 -select * from t2 order by a limit 3; -a -1 -2 -3 -reset master; -drop table t2; diff --git a/mysql-test/suite/ndb_team/r/ndb_backup_print.result b/mysql-test/suite/ndb_team/r/ndb_backup_print.result deleted file mode 100644 index 7fa073bafb5..00000000000 --- a/mysql-test/suite/ndb_team/r/ndb_backup_print.result +++ /dev/null @@ -1,65 +0,0 @@ -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -Connected to Management Server at: : -Waiting for completed, this may take several minutes -Node : Backup started from node -Node : Backup started from node completed - StartGCP: StopGCP: - #Records: #LogRecords: - Data: bytes Log: bytes -create table t1 -(pk int key -,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) -,b1 TINYINT, b2 TINYINT UNSIGNED -,c1 SMALLINT, c2 SMALLINT UNSIGNED -,d1 INT, d2 INT UNSIGNED -,e1 BIGINT, e2 BIGINT UNSIGNED -,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY -,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY -,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) -,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) -) engine ndb; -insert into t1 values -(1 -,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 -,127, 255 -,32767, 65535 -,2147483647, 4294967295 -,9223372036854775807, 18446744073709551615 -,'1','12345678901234567890123456789012','123456789' - ,'1','12345678901234567890123456789012','123456789' - ,0x12,0x123456789abcdef0, 0x012345 -,0x12,0x123456789abcdef0, 0x00123450 -); -insert into t1 values -(2 -,0, 0, 0, 0, 0 -,-128, 0 -,-32768, 0 -,-2147483648, 0 -,-9223372036854775808, 0 -,'','','' - ,'','','' - ,0x0,0x0,0x0 -,0x0,0x0,0x0 -); -insert into t1 values -(3 -,NULL,NULL,NULL,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -); -Connected to Management Server at: : -Waiting for completed, this may take several minutes -Node : Backup started from node -Node : Backup started from node completed - StartGCP: StopGCP: - #Records: #LogRecords: - Data: bytes Log: bytes -drop table t1; diff --git a/mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result b/mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result deleted file mode 100644 index 12a65a433a3..00000000000 --- a/mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result +++ /dev/null @@ -1,512 +0,0 @@ -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -DROP TABLE IF EXISTS test.t4; -DROP TABLE IF EXISTS test.t5; -DROP TABLE IF EXISTS test.t6; -**** Test 1 Simple DD backup and restore **** -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 CHAR(50) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '<MYSQLTEST_VARDIR>/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -DROP TABLE test.t1; -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; -DROP TABLESPACE table_space1 -ENGINE = NDB; -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -**** Test 2 Mixed Cluster Test backup and restore **** -CREATE TABLE test.t2 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 VARCHAR(200) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL)ENGINE=NDB; -CREATE TABLE test.t3 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; -CREATE TABLE test.t4 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))ENGINE=NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden, Texas 500 0 -2 Sweden, Texas 499 0 -3 Sweden, Texas 498 0 -4 Sweden, Texas 497 0 -5 Sweden, Texas 496 0 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; -LENGTH(data) -16384 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; -LENGTH(data) -16384 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '<MYSQLTEST_VARDIR>/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; -DROP TABLESPACE table_space1 -ENGINE = NDB; -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden, Texas 500 0 -2 Sweden, Texas 499 0 -3 Sweden, Texas 498 0 -4 Sweden, Texas 497 0 -5 Sweden, Texas 496 0 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; -LENGTH(data) -16384 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; -LENGTH(data) -16384 -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -**** Test 3 Adding partition Test backup and restore **** -CREATE TABLESPACE table_space2 -ADD DATAFILE './table_space2/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(150) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 4; -CREATE TABLE test.t4 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(180) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 2; -CREATE TABLE test.t2 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY KEY(c3) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -CREATE TABLE test.t5 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY KEY(pk1) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -CREATE TABLE test.t3 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(202) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY RANGE (c3) PARTITIONS 3 (PARTITION x1 VALUES LESS THAN (105), PARTITION x2 VALUES LESS THAN (333), PARTITION x3 VALUES LESS THAN (720)); -CREATE TABLE test.t6 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(220) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY RANGE (pk1) PARTITIONS 2 (PARTITION x1 VALUES LESS THAN (333), PARTITION x2 VALUES LESS THAN (720)); -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(150) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 4 */ -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (c3) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(202) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (c3) -(PARTITION x1 VALUES LESS THAN (105) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x3 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t4; -Table Create Table -t4 CREATE TABLE `t4` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(180) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 2 */ -SHOW CREATE TABLE test.t5; -Table Create Table -t5 CREATE TABLE `t5` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (pk1) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t6; -Table Create Table -t6 CREATE TABLE `t6` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(220) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (pk1) -(PARTITION x1 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t1 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p2 NULL 3 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p3 NULL 4 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t2 p0 NULL 1 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t2 p1 NULL 2 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t3 x1 NULL 1 NULL RANGE NULL c3 NULL 105 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x2 NULL 2 NULL RANGE NULL c3 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x3 NULL 3 NULL RANGE NULL c3 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t4 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t4 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t5 p0 NULL 1 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t5 p1 NULL 2 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t6 x1 NULL 1 NULL RANGE NULL pk1 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t6 x2 NULL 2 NULL RANGE NULL pk1 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT COUNT(*) FROM test.t1; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t5; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t6; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '<MYSQLTEST_VARDIR>/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; -ALTER TABLESPACE table_space2 -DROP DATAFILE './table_space2/datafile.dat' -ENGINE = NDB; -DROP TABLESPACE table_space1 -ENGINE = NDB; -DROP TABLESPACE table_space2 -ENGINE = NDB; -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(150) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 4 */ -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (c3) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(202) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (c3) -(PARTITION x1 VALUES LESS THAN (105) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x3 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t4; -Table Create Table -t4 CREATE TABLE `t4` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(180) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 2 */ -SHOW CREATE TABLE test.t5; -Table Create Table -t5 CREATE TABLE `t5` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (pk1) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t6; -Table Create Table -t6 CREATE TABLE `t6` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(220) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (pk1) -(PARTITION x1 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t1 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p2 NULL 3 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p3 NULL 4 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t2 p0 NULL 1 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t2 p1 NULL 2 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t3 x1 NULL 1 NULL RANGE NULL c3 NULL 105 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x2 NULL 2 NULL RANGE NULL c3 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x3 NULL 3 NULL RANGE NULL c3 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t4 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t4 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t5 p0 NULL 1 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t5 p1 NULL 2 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t6 x1 NULL 1 NULL RANGE NULL pk1 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t6 x2 NULL 2 NULL RANGE NULL pk1 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT COUNT(*) FROM test.t1; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t5; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t6; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; -ALTER TABLESPACE table_space1 DROP DATAFILE './table_space1/datafile.dat' ENGINE=NDB; -ALTER TABLESPACE table_space2 DROP DATAFILE './table_space2/datafile.dat' ENGINE=NDB; -DROP TABLESPACE table_space1 ENGINE = NDB; -DROP TABLESPACE table_space2 ENGINE = NDB; -DROP LOGFILE GROUP log_group1 ENGINE = NDB; diff --git a/mysql-test/suite/ndb_team/r/rpl_ndb_dd_advance.result b/mysql-test/suite/ndb_team/r/rpl_ndb_dd_advance.result deleted file mode 100644 index 37188aeb1ca..00000000000 --- a/mysql-test/suite/ndb_team/r/rpl_ndb_dd_advance.result +++ /dev/null @@ -1,323 +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; -DROP TABLE IF EXISTS t1, t2, t3; -***** Test 1 RPL of CDD and Alter ***** -***** Test 1 setup ***** -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 4M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE=NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE 4M -ENGINE=NDB; -CREATE TABLE t1 -(c1 INT NOT NULL PRIMARY KEY, -c2 INT NOT NULL, -c3 INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -***** insert some data ***** -***** Select from Master ***** -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -c1 c2 c3 -1 2 4 -2 4 5 -3 6 6 -4 8 7 -5 10 8 -***** Select from Slave ***** -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -c1 c2 c3 -1 2 4 -2 4 5 -3 6 6 -4 8 7 -5 10 8 -FILE_NAME FILE_TYPE TABLESPACE_NAME LOGFILE_GROUP_NAME -NULL UNDO LOG NULL lg1 -datafile.dat DATAFILE ts1 lg1 -datafile02.dat DATAFILE ts1 lg1 -undofile.dat UNDO LOG NULL lg1 -undofile02.dat UNDO LOG NULL lg1 -**** Do First Set of ALTERs in the master table **** -CREATE INDEX t1_i ON t1(c2, c3); -CREATE UNIQUE INDEX t1_i2 ON t1(c2); -ALTER TABLE t1 ADD c4 TIMESTAMP; -ALTER TABLE t1 ADD c5 DOUBLE; -ALTER TABLE t1 ADD INDEX (c5); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` int(11) NOT NULL, - `c3` int(11) NOT NULL, - `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - UNIQUE KEY `t1_i2` (`c2`), - KEY `t1_i` (`c2`,`c3`), - KEY `c5` (`c5`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -**** Show first set of ALTERs on SLAVE **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` int(11) NOT NULL, - `c3` int(11) NOT NULL, - `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - UNIQUE KEY `t1_i2` (`c2`), - KEY `t1_i` (`c2`,`c3`), - KEY `c5` (`c5`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -**** Second set of alters test 1 **** -ALTER TABLE t1 RENAME t2; -ALTER TABLE t2 DROP INDEX c5; -CREATE TABLE t1(c1 INT)ENGINE=NDB; -INSERT INTO t1 VALUES(1); -DROP TABLE t1; -ALTER TABLE t2 RENAME t1; -**** Show second set of ALTERs on MASTER **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` int(11) NOT NULL, - `c3` int(11) NOT NULL, - `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - UNIQUE KEY `t1_i2` (`c2`), - KEY `t1_i` (`c2`,`c3`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -**** Show second set of ALTERs on SLAVE **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` int(11) NOT NULL, - `c3` int(11) NOT NULL, - `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - UNIQUE KEY `t1_i2` (`c2`), - KEY `t1_i` (`c2`,`c3`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -**** Third and last set of alters for test1 **** -ALTER TABLE t1 CHANGE c1 c1 DOUBLE; -ALTER TABLE t1 CHANGE c2 c2 DECIMAL(10,2); -ALTER TABLE t1 DROP COLUMN c3; -ALTER TABLE t1 CHANGE c4 c4 TEXT CHARACTER SET utf8; -ALTER TABLE t1 CHANGE c4 c4 BLOB; -ALTER TABLE t1 CHANGE c4 c3 BLOB; -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -UPDATE t1 SET c3=@b1 where c1 = 1; -UPDATE t1 SET c3=@b1 where c1 = 2; -**** Show last set of ALTERs on MASTER **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` double NOT NULL DEFAULT '0', - `c2` decimal(10,2) DEFAULT NULL, - `c3` blob, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - UNIQUE KEY `t1_i2` (`c2`), - KEY `t1_i` (`c2`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -c1 c2 c3 c5 -1 2.00 b1b1b1b1b1b1b1b1b1b1 NULL -2 4.00 b1b1b1b1b1b1b1b1b1b1 NULL -3 6.00 0000-00-00 00:00:00 NULL -4 8.00 0000-00-00 00:00:00 NULL -5 10.00 0000-00-00 00:00:00 NULL -**** Show last set of ALTERs on SLAVE **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` double NOT NULL DEFAULT '0', - `c2` decimal(10,2) DEFAULT NULL, - `c3` blob, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - UNIQUE KEY `t1_i2` (`c2`), - KEY `t1_i` (`c2`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -c1 c2 c3 c5 -1 2.00 b1b1b1b1b1b1b1b1b1b1 NULL -2 4.00 b1b1b1b1b1b1b1b1b1b1 NULL -3 6.00 0000-00-00 00:00:00 NULL -4 8.00 0000-00-00 00:00:00 NULL -5 10.00 0000-00-00 00:00:00 NULL -SELECT * FROM t1 where c1 = 1; -c1 c2 c3 c5 -1 2.00 b1b1b1b1b1b1b1b1b1b1 NULL -DROP TABLE t1; -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; -******** Create additional TABLESPACE test 2 ************** -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile03.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 10M -ENGINE=NDB; -ALTER TABLESPACE ts2 -ADD DATAFILE 'datafile04.dat' -INITIAL_SIZE 5M -ENGINE=NDB; -DROP DATABASE IF EXISTS tpcb; -CREATE DATABASE tpcb; - -CREATE TABLE tpcb.account -(id INT, bid INT, balance DECIMAL(10,2), -filler CHAR(255), PRIMARY KEY(id)) -TABLESPACE ts2 STORAGE DISK -ENGINE=NDBCLUSTER; - -CREATE TABLE tpcb.branch -(bid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(bid))TABLESPACE ts2 STORAGE DISK -ENGINE=NDBCLUSTER; - -CREATE TABLE tpcb.teller -(tid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(tid)) TABLESPACE ts2 STORAGE DISK -ENGINE=NDBCLUSTER; - -CREATE TABLE tpcb.history -(id MEDIUMINT NOT NULL AUTO_INCREMENT,aid INT, -tid INT, bid INT, amount DECIMAL(10,2), -tdate DATETIME, teller CHAR(20), uuidf LONGBLOB, -filler CHAR(80),PRIMARY KEY (id)) -TABLESPACE ts2 STORAGE DISK -ENGINE=NDBCLUSTER; - ---- Create stored procedures & functions --- - - -*** Stored Procedures Created *** - -****** TEST 2 test time ********************************* -USE tpcb; -*********** Load up the database ****************** -CALL tpcb.load(); -********** Check load master and slave ************** -SELECT COUNT(*) FROM account; -COUNT(*) -1000 -USE tpcb; -SELECT COUNT(*) FROM account; -COUNT(*) -1000 -******** Run in some transactions *************** -***** Time to try slave sync *********** -**** Must make sure slave is clean ***** -STOP SLAVE; -RESET SLAVE; -DROP PROCEDURE IF EXISTS tpcb.load; -DROP PROCEDURE IF EXISTS tpcb.trans; -DROP TABLE IF EXISTS tpcb.account; -DROP TABLE IF EXISTS tpcb.teller; -DROP TABLE IF EXISTS tpcb.branch; -DROP TABLE IF EXISTS tpcb.history; -DROP DATABASE tpcb; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE=NDB; -DROP TABLESPACE ts1 ENGINE=NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile03.dat' -ENGINE=NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile04.dat' -ENGINE=NDB; -DROP TABLESPACE ts2 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; -********** Take a backup of the Master ************* -SELECT COUNT(*) FROM history; -COUNT(*) -100 -SELECT COUNT(*) FROM history; -COUNT(*) -200 -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -LOAD DATA INFILE 'DUMP_FILE' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -************ Restore the slave ************************ -CREATE DATABASE tpcb; -***** Check a few slave restore values *************** -USE tpcb; -SELECT COUNT(*) FROM account; -COUNT(*) -1000 -***** Add some more records to master ********* -***** Finsh the slave sync process ******* -@the_epoch:=MAX(epoch) -<the_epoch> -@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) -<the_pos> master-bin.000001 -* 4. * -* 5. * -START SLAVE; -**** We should be ready to continue on ************* -****** Let's make sure we match ******* -***** MASTER ******* -USE tpcb; -SELECT COUNT(*) FROM history; -COUNT(*) -400 -****** SLAVE ******** -USE tpcb; -SELECT COUNT(*) FROM history; -COUNT(*) -400 -*** DUMP MASTER & SLAVE FOR COMPARE ******** -*************** TEST 2 CLEANUP SECTION ******************** -DROP PROCEDURE IF EXISTS tpcb.load; -DROP PROCEDURE IF EXISTS tpcb.trans; -DROP TABLE tpcb.account; -DROP TABLE tpcb.teller; -DROP TABLE tpcb.branch; -DROP TABLE tpcb.history; -DROP DATABASE tpcb; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE=NDB; -DROP TABLESPACE ts1 ENGINE=NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile03.dat' -ENGINE=NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile04.dat' -ENGINE=NDB; -DROP TABLESPACE ts2 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; -****** Do dumps compare ************ diff --git a/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result b/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result deleted file mode 100644 index 55a95605839..00000000000 --- a/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result +++ /dev/null @@ -1,1752 +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; -set binlog_format=row; - -*********************************************************** -*********************************************************** -***************** Start of Testing ************************ -*********************************************************** -*********************************************************** -* This test format == binlog_format ROW and engine == 'NDB' -*********************************************************** -*********************************************************** - -***** Testing more columns on the Master ***** - -CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 FLOAT DEFAULT '2.00', -f6 CHAR(4) DEFAULT 'TEST', -f7 INT DEFAULT '0', -f8 TEXT, -f9 LONGBLOB, -f10 BIT(63), -f11 VARBINARY(64))ENGINE='NDB'; - -* Alter Table on Slave and drop columns f5 through f11 * - -alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; - -* Insert data in Master then update and delete some rows* - -* Select count and 20 rows from Master * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, -hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) -2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 - -* Select count and 20 rows from Slave * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT * FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -Checking that both slave threads are running. - -***** Testing Altering table def scenario ***** - -CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f7 DECIMAL(17,9) default '1000.00', -f8 MEDIUMBLOB, -f9 NUMERIC(6,4) default '2000.00', -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='NDB'; -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 - -CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f8 MEDIUMBLOB, -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='NDB'; - -CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 DECIMAL(17,9) default '1000.00', -f7 MEDIUMBLOB, -f8 NUMERIC(6,4) default '2000.00', -f9 VARCHAR(1024), -f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f11 CHAR(255)) -ENGINE='NDB'; -Warnings: -Warning 1264 Out of range value for column 'f8' at row 1 - -CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 BIGINT, -f6 BLOB, -f7 DATE, -f8 DATETIME, -f9 FLOAT, -f10 INT, -f11 LONGBLOB, -f12 LONGTEXT, -f13 MEDIUMBLOB, -f14 MEDIUMINT, -f15 MEDIUMTEXT, -f16 REAL, -f17 SMALLINT, -f18 TEXT, -f19 TIME, -f20 TIMESTAMP, -f21 TINYBLOB, -f22 TINYINT, -f23 TINYTEXT, -f24 YEAR, -f25 BINARY(255), -f26 BIT(64), -f27 CHAR(255), -f28 DECIMAL(30,7), -f29 DOUBLE, -f30 ENUM ('a','b', 'c') default 'a', -f31 FLOAT, -f32 NUMERIC(17,9), -f33 SET ('a', 'b', 'c') default 'b', -f34 VARBINARY(1025), -f35 VARCHAR(257) -) ENGINE='NDB'; - -** Alter tables on slave and drop columns ** - -alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop -f12; -alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12; -alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; -alter table t31 -drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, -drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18, -drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25, -drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32, -drop f33, drop f34, drop f35; - -** Insert Data into Master ** -INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10: -some var char'; -INSERT into t2 values (2, 2, 2, 'second', -2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char', -'01234567', 'c'), -(3, 3, 3, 'third', -3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char', -'01234567', 'c'); -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 -Warning 1264 Out of range value for column 'f9' at row 2 -INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; -INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: -binary data'; -INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; -INSERT into t31 set f1=1, f2=1, f3=2, f4='second', -f9=2.2, f10='seven samurai', f28=222.222, f35='222'; -Warnings: -Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 -INSERT into t31 values (1, 1, 3, 'third', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -INSERT into t31 values (1, 1, 4, 'fourth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 5, 'fifth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 6, 'sixth', -/* f5 BIGINT, */ NULL, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ NULL -); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -Warning 1264 Out of range value for column 'f5' at row 2 -Warning 1264 Out of range value for column 'f24' at row 2 -Warning 1264 Out of range value for column 'f24' at row 3 - -** Sync slave with master ** -** Do selects from tables ** - -select * from t1 order by f3; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -31 31 31 second -32 32 32 second -33 33 33 second -34 34 34 second -35 35 35 second -36 36 36 second -37 37 37 second -38 38 38 second -39 39 39 second -40 40 40 second -41 41 41 second -42 42 42 second -43 43 43 second -44 44 44 second -45 45 45 second -46 46 46 second -47 47 47 second -48 48 48 second -49 49 49 second -50 50 50 second -select * from t2 order by f1; -f1 f2 f3 f4 -1 1 1 first -2 2 2 second -3 3 3 third -select * from t3 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t4 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t31 order by f3; -f1 f2 f3 f4 -1 1 1 first -1 1 2 second -1 1 3 third -1 1 4 fourth -1 1 5 fifth -1 1 6 sixth - -** Do updates master ** - -update t31 set f5=555555555555555 where f3=6; -update t31 set f2=2 where f3=2; -update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; -Warnings: -Warning 1048 Column 'f3' cannot be null - -** Delete from Master ** - -delete from t1; -delete from t2; -delete from t3; -delete from t4; -delete from t31; -select * from t31; -f1 f2 f3 f4 - -** Check slave status ** - -Checking that both slave threads are running. - -**************************************** -* columns in master at middle of table * -* Expect: Proper error message * -**************************************** - -** Stop and Reset Slave ** - -STOP SLAVE; -RESET SLAVE; - -** create table slave side ** -CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='NDB'; - -** Connect to master and create table ** - -CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', -c CHAR(5), e INT DEFAULT '1')ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), -(2,@b1,DEFAULT,'JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t10 *** -DROP TABLE t10; - -********************************************* -* More columns in master at middle of table * -* Expect: Proper error message * -********************************************* - -*** Create t11 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) -) ENGINE='NDB'; - -*** Create t11 on Master *** -CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), -(2,@b1,'Testing is cool','JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t11 *** -DROP TABLE t11; - -********************************************* -* More columns in master at middle of table * -* Expect: This one should pass blob-text * -********************************************* - -*** Create t12 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB -) ENGINE='NDB'; - -*** Create t12 on Master *** -CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',DEFAULT,DEFAULT), -(3,@b1,'QA',DEFAULT,DEFAULT); - -SELECT a,hex(b),f,c,e FROM t12 ORDER BY a; -a hex(b) f c e -1 62316231623162316231623162316231 Kyle test 1 -2 62316231623162316231623162316231 JOE test 1 -3 62316231623162316231623162316231 QA test 1 - -*** Select on Slave *** -SELECT a,hex(b),c FROM t12 ORDER BY a; -a hex(b) c -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -*** Drop t12 *** -DROP TABLE t12; - -**************************************************** -* - Alter Master adding columns at middle of table * -* Expect: columns added * -**************************************************** - - -*** Create t14 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t14 on Master *** -CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; -ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; - -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT), -(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT), -(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT); - -SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 c6 c7 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP - -*** Select on Slave **** -SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle -2 2.00 This Test Should work 62316231623162316231623162316231 JOE -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA - -**************************************************** -* - Alter Master Dropping columns from the middle. * -* Expect: columns dropped * -**************************************************** - -*** connect to master and drop columns *** -ALTER TABLE t14 DROP COLUMN c2; -ALTER TABLE t14 DROP COLUMN c7; - -*** Select from Master *** -SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1; -c1 c3 hex(c4) c5 c6 -1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 -2 This Test Should work 62316231623162316231623162316231 JOE 1 -3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 - -************ -* 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' -STOP SLAVE; -RESET SLAVE; - -*** Drop t14 *** -DROP TABLE t14; -DROP TABLE t14; -RESET MASTER; -START SLAVE; - -************************************************* -* - Alter Master adding columns at end of table * -* Expect: Error 1054 * -************************************************* - -*** Create t15 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t15 on Master *** -CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00), -(2,@b1,'JOE',DEFAULT,DEFAULT,3.00), -(3,@b1,'QA',DEFAULT,DEFAULT,3.00); -SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1; -c1 hex(c4) c5 c6 c7 c2 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00 -2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00 -3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00 - -******************************************** -*** 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' -STOP SLAVE; -RESET SLAVE; - -*** Drop t15 *** -DROP TABLE t15; -DROP TABLE t15; -RESET MASTER; -START SLAVE; - -************************************************ -* - Create index on Master column not on slave * -* Expect:Warning * -************************************************ - -*** Create t16 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t16 on Master *** -CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Create Index and Data Insert *** -CREATE INDEX part_of_c6 ON t16 (c6); -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -***************** -*** 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)' -STOP SLAVE; -RESET SLAVE; - -*** Drop t16 *** -DROP TABLE t16; -DROP TABLE t16; -RESET MASTER; -START SLAVE; - -***************************************************** -* - Delete rows using column on Master not on slave * -* Expect: Rows Deleted * -***************************************************** - -*** Create t17 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t17 on Master *** -CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** Delete from master ** -DELETE FROM t17 WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -DROP TABLE t17; - - -***************************************************** -* - Update row using column on Master not on slave * -* Expect: Rows updated * -***************************************************** - -** Bug30674 ** - -*** Create t18 on slave *** - -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t18 on Master *** -CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** update from master ** -UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 TEST -DROP TABLE t18; - - -***************************************************** -* - Insert UUID column on Master not on slave * -* Expect: Rows inserted * -***************************************************** - -*** Create t5 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t5 on Master *** -CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 LONG, -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT), -(2,@b1,'JOE',UUID(),DEFAULT), -(3,@b1,'QA',UUID(),DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 6231623162316231 Kyle UUID TIME -2 6231623162316231 JOE UUID TIME -3 6231623162316231 QA UUID TIME - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; -c1 hex(c4) c5 -1 6231623162316231 Kyle -2 6231623162316231 JOE -3 6231623162316231 QA -DROP TABLE t5; - -set binlog_format=mixed; - -*********************************************************** -*********************************************************** -***************** Start of Testing ************************ -*********************************************************** -*********************************************************** -* This test format == binlog_format MIXED and engine == 'NDB' -*********************************************************** -*********************************************************** - -***** Testing more columns on the Master ***** - -CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 FLOAT DEFAULT '2.00', -f6 CHAR(4) DEFAULT 'TEST', -f7 INT DEFAULT '0', -f8 TEXT, -f9 LONGBLOB, -f10 BIT(63), -f11 VARBINARY(64))ENGINE='NDB'; - -* Alter Table on Slave and drop columns f5 through f11 * - -alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; - -* Insert data in Master then update and delete some rows* - -* Select count and 20 rows from Master * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, -hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) -2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 - -* Select count and 20 rows from Slave * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT * FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -Checking that both slave threads are running. - -***** Testing Altering table def scenario ***** - -CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f7 DECIMAL(17,9) default '1000.00', -f8 MEDIUMBLOB, -f9 NUMERIC(6,4) default '2000.00', -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='NDB'; -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 - -CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f8 MEDIUMBLOB, -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='NDB'; - -CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 DECIMAL(17,9) default '1000.00', -f7 MEDIUMBLOB, -f8 NUMERIC(6,4) default '2000.00', -f9 VARCHAR(1024), -f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f11 CHAR(255)) -ENGINE='NDB'; -Warnings: -Warning 1264 Out of range value for column 'f8' at row 1 - -CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 BIGINT, -f6 BLOB, -f7 DATE, -f8 DATETIME, -f9 FLOAT, -f10 INT, -f11 LONGBLOB, -f12 LONGTEXT, -f13 MEDIUMBLOB, -f14 MEDIUMINT, -f15 MEDIUMTEXT, -f16 REAL, -f17 SMALLINT, -f18 TEXT, -f19 TIME, -f20 TIMESTAMP, -f21 TINYBLOB, -f22 TINYINT, -f23 TINYTEXT, -f24 YEAR, -f25 BINARY(255), -f26 BIT(64), -f27 CHAR(255), -f28 DECIMAL(30,7), -f29 DOUBLE, -f30 ENUM ('a','b', 'c') default 'a', -f31 FLOAT, -f32 NUMERIC(17,9), -f33 SET ('a', 'b', 'c') default 'b', -f34 VARBINARY(1025), -f35 VARCHAR(257) -) ENGINE='NDB'; - -** Alter tables on slave and drop columns ** - -alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop -f12; -alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12; -alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; -alter table t31 -drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, -drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18, -drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25, -drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32, -drop f33, drop f34, drop f35; - -** Insert Data into Master ** -INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10: -some var char'; -INSERT into t2 values (2, 2, 2, 'second', -2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char', -'01234567', 'c'), -(3, 3, 3, 'third', -3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char', -'01234567', 'c'); -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 -Warning 1264 Out of range value for column 'f9' at row 2 -INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; -INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: -binary data'; -INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; -INSERT into t31 set f1=1, f2=1, f3=2, f4='second', -f9=2.2, f10='seven samurai', f28=222.222, f35='222'; -Warnings: -Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 -INSERT into t31 values (1, 1, 3, 'third', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -INSERT into t31 values (1, 1, 4, 'fourth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 5, 'fifth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 6, 'sixth', -/* f5 BIGINT, */ NULL, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ NULL -); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -Warning 1264 Out of range value for column 'f5' at row 2 -Warning 1264 Out of range value for column 'f24' at row 2 -Warning 1264 Out of range value for column 'f24' at row 3 - -** Sync slave with master ** -** Do selects from tables ** - -select * from t1 order by f3; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -31 31 31 second -32 32 32 second -33 33 33 second -34 34 34 second -35 35 35 second -36 36 36 second -37 37 37 second -38 38 38 second -39 39 39 second -40 40 40 second -41 41 41 second -42 42 42 second -43 43 43 second -44 44 44 second -45 45 45 second -46 46 46 second -47 47 47 second -48 48 48 second -49 49 49 second -50 50 50 second -select * from t2 order by f1; -f1 f2 f3 f4 -1 1 1 first -2 2 2 second -3 3 3 third -select * from t3 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t4 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t31 order by f3; -f1 f2 f3 f4 -1 1 1 first -1 1 2 second -1 1 3 third -1 1 4 fourth -1 1 5 fifth -1 1 6 sixth - -** Do updates master ** - -update t31 set f5=555555555555555 where f3=6; -update t31 set f2=2 where f3=2; -update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; -Warnings: -Warning 1048 Column 'f3' cannot be null - -** Delete from Master ** - -delete from t1; -delete from t2; -delete from t3; -delete from t4; -delete from t31; -select * from t31; -f1 f2 f3 f4 - -** Check slave status ** - -Checking that both slave threads are running. - -**************************************** -* columns in master at middle of table * -* Expect: Proper error message * -**************************************** - -** Stop and Reset Slave ** - -STOP SLAVE; -RESET SLAVE; - -** create table slave side ** -CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='NDB'; - -** Connect to master and create table ** - -CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', -c CHAR(5), e INT DEFAULT '1')ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), -(2,@b1,DEFAULT,'JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t10 *** -DROP TABLE t10; - -********************************************* -* More columns in master at middle of table * -* Expect: Proper error message * -********************************************* - -*** Create t11 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) -) ENGINE='NDB'; - -*** Create t11 on Master *** -CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), -(2,@b1,'Testing is cool','JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t11 *** -DROP TABLE t11; - -********************************************* -* More columns in master at middle of table * -* Expect: This one should pass blob-text * -********************************************* - -*** Create t12 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB -) ENGINE='NDB'; - -*** Create t12 on Master *** -CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',DEFAULT,DEFAULT), -(3,@b1,'QA',DEFAULT,DEFAULT); - -SELECT a,hex(b),f,c,e FROM t12 ORDER BY a; -a hex(b) f c e -1 62316231623162316231623162316231 Kyle test 1 -2 62316231623162316231623162316231 JOE test 1 -3 62316231623162316231623162316231 QA test 1 - -*** Select on Slave *** -SELECT a,hex(b),c FROM t12 ORDER BY a; -a hex(b) c -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -*** Drop t12 *** -DROP TABLE t12; - -**************************************************** -* - Alter Master adding columns at middle of table * -* Expect: columns added * -**************************************************** - - -*** Create t14 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t14 on Master *** -CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; -ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; - -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT), -(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT), -(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT); - -SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 c6 c7 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP - -*** Select on Slave **** -SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle -2 2.00 This Test Should work 62316231623162316231623162316231 JOE -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA - -**************************************************** -* - Alter Master Dropping columns from the middle. * -* Expect: columns dropped * -**************************************************** - -*** connect to master and drop columns *** -ALTER TABLE t14 DROP COLUMN c2; -ALTER TABLE t14 DROP COLUMN c7; - -*** Select from Master *** -SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1; -c1 c3 hex(c4) c5 c6 -1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 -2 This Test Should work 62316231623162316231623162316231 JOE 1 -3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 - -************ -* 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' -STOP SLAVE; -RESET SLAVE; - -*** Drop t14 *** -DROP TABLE t14; -DROP TABLE t14; -RESET MASTER; -START SLAVE; - -************************************************* -* - Alter Master adding columns at end of table * -* Expect: Error 1054 * -************************************************* - -*** Create t15 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t15 on Master *** -CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00), -(2,@b1,'JOE',DEFAULT,DEFAULT,3.00), -(3,@b1,'QA',DEFAULT,DEFAULT,3.00); -SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1; -c1 hex(c4) c5 c6 c7 c2 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00 -2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00 -3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00 - -******************************************** -*** 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' -STOP SLAVE; -RESET SLAVE; - -*** Drop t15 *** -DROP TABLE t15; -DROP TABLE t15; -RESET MASTER; -START SLAVE; - -************************************************ -* - Create index on Master column not on slave * -* Expect:Warning * -************************************************ - -*** Create t16 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t16 on Master *** -CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Create Index and Data Insert *** -CREATE INDEX part_of_c6 ON t16 (c6); -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -***************** -*** 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)' -STOP SLAVE; -RESET SLAVE; - -*** Drop t16 *** -DROP TABLE t16; -DROP TABLE t16; -RESET MASTER; -START SLAVE; - -***************************************************** -* - Delete rows using column on Master not on slave * -* Expect: Rows Deleted * -***************************************************** - -*** Create t17 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t17 on Master *** -CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** Delete from master ** -DELETE FROM t17 WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -DROP TABLE t17; - - -***************************************************** -* - Update row using column on Master not on slave * -* Expect: Rows updated * -***************************************************** - -** Bug30674 ** - -*** Create t18 on slave *** - -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t18 on Master *** -CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** update from master ** -UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 TEST -DROP TABLE t18; - - -***************************************************** -* - Insert UUID column on Master not on slave * -* Expect: Rows inserted * -***************************************************** - -*** Create t5 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t5 on Master *** -CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 LONG, -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT), -(2,@b1,'JOE',UUID(),DEFAULT), -(3,@b1,'QA',UUID(),DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 6231623162316231 Kyle UUID TIME -2 6231623162316231 JOE UUID TIME -3 6231623162316231 QA UUID TIME - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; -c1 hex(c4) c5 -1 6231623162316231 Kyle -2 6231623162316231 JOE -3 6231623162316231 QA -DROP TABLE t5; - diff --git a/mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result b/mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result deleted file mode 100644 index 203a59b4613..00000000000 --- a/mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result +++ /dev/null @@ -1,143 +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; - -*** Test 1 *** - -create table t1 (a int key, b int) engine innodb; -create table t2 (a int key, b int) engine innodb; - -alter table t1 engine ndb; -alter table t2 engine ndb; - -insert into t1 values (1,2); - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos -<log_name> <start_pos> <end_pos> - -# Now check that that is in the apply_status table is consistant -# with what is in the binlog - -# since insert is done with transactional engine, expect a BEGIN -# at <start_pos> - -show binlog events from <binlog_start> limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN - -# Now the insert, one step after - -show binlog events from <binlog_start> limit 1,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; insert into t1 values (1,2) - -# and the COMMIT should be at <end_pos> - -show binlog events from <binlog_start> limit 2,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid # # COMMIT /* XID */ - -begin; -insert into t1 values (2,3); -insert into t2 values (3,4); -commit; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos -<log_name> <start_pos> <end_pos> -show binlog events from <binlog_start> limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN - -show binlog events from <binlog_start> limit 1,2; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; insert into t1 values (2,3) -master-bin.000001 # Query # # use `test`; insert into t2 values (3,4) - -show binlog events from <binlog_start> limit 3,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid # # COMMIT /* XID */ - -DROP TABLE test.t1, test.t2; -SHOW TABLES; -Tables_in_test - -*** Test 2 *** - -DROP DATABASE IF EXISTS tpcb; -CREATE DATABASE tpcb; - -CREATE TABLE tpcb.account (id INT, bid INT, balance DECIMAL(10,2), -filler CHAR(255), PRIMARY KEY(id)); - -CREATE TABLE tpcb.branch (bid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(bid)); - -CREATE TABLE tpcb.teller (tid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(tid)); - -CREATE TABLE tpcb.history (id MEDIUMINT NOT NULL AUTO_INCREMENT,aid INT, -tid INT, bid INT, amount DECIMAL(10,2), -tdate DATETIME, teller CHAR(20), uuidf LONGBLOB, -filler CHAR(80),PRIMARY KEY (id)); - ---- Create stored procedures & functions --- - - -*** Stored Procedures Created *** - -USE tpcb; -ALTER TABLE account ENGINE NDB; -ALTER TABLE branch ENGINE NDB; -ALTER TABLE teller ENGINE NDB; -ALTER TABLE history ENGINE NDB; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos -<log_name> <start_pos> <end_pos> - -show binlog events in 'master-bin.000001' from <start_pos> limit 9,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid 1 <end_pos> COMMIT /* XID */ - -** Test 3 ** - -FLUSH LOGS; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos -<log_name> <start_pos> <end_pos> - -show binlog events in 'master-bin.000002' from <start_pos> limit 9,1; -Log_name Pos Event_type Server_id End_log_pos Info -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; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos -<log_name> <start_pos> <end_pos> - -show binlog events in 'master-bin.000001' from <start_pos> limit 9,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid 1 <end_pos> COMMIT /* XID */ - -*** DUMP MASTER & SLAVE FOR COMPARE ******** -DROP DATABASE tpcb; -****** Do dumps compare ************ diff --git a/mysql-test/suite/ndb_team/t/disabled.def b/mysql-test/suite/ndb_team/t/disabled.def deleted file mode 100644 index 714f1014a10..00000000000 --- a/mysql-test/suite/ndb_team/t/disabled.def +++ /dev/null @@ -1,20 +0,0 @@ -############################################################################## -# -# List the test cases that are to be disabled temporarily. -# -# Separate the test case name and the comment with ':'. -# -# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment> -# -# Do not use any TAB characters for whitespace. -# -############################################################################## -ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog -ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog - -# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open -#ndb_autodiscover3 : bug#21806 -#ndb_autodiscover3 : Bug#20872 2007-07-15 ingo master*.err: miscellaneous error messages -#rpl_ndb_extraColMaster : BUG#30854 : Tables name show as binary in slave err msg on vm-win2003-64-b and Solaris -#rpl_ndb_mix_innodb : Bug #32720 Test rpl_ndb_mix_innodb fails on SPARC and PowerPC -#rpl_ndb_dd_advance : Bug #30222 rpl_ndb_dd_advance.test fails diff --git a/mysql-test/suite/ndb_team/t/ndb_autodiscover.test b/mysql-test/suite/ndb_team/t/ndb_autodiscover.test deleted file mode 100644 index 9ded27cea31..00000000000 --- a/mysql-test/suite/ndb_team/t/ndb_autodiscover.test +++ /dev/null @@ -1,555 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - -# Bug#41308: Test main.ndb_autodiscover.test doesn't work on Windows due -# to 'grep' calls -# Test is currently disabled on Windows via the next line until this bug -# can be resolved. ---source include/not_windows.inc - ---disable_warnings -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; ---enable_warnings - -################################################ -# Test that a table that does not exist as a -# frm file on disk can be "discovered" from a -# connected NDB Cluster -# - -flush status; - -# -# Test discover + SELECT -# - -create table t1( - id int not null primary key, - name char(20) -) engine=ndb; - -insert into t1 values(1, "Autodiscover"); -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -select * from t1; -show status like 'handler_discover%'; - -# -# Test discover + INSERT -# - -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -insert into t1 values (2, "Auto 2"); -show status like 'handler_discover%'; -insert into t1 values (3, "Discover 3"); -show status like 'handler_discover%'; -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -select * from t1 order by id; -show status like 'handler_discover%'; - -# -# Test discover + UPDATE -# - -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -update t1 set name="Autodiscover" where id = 2; -show status like 'handler_discover%'; -select * from t1 order by id; -show status like 'handler_discover%'; - -# -# Test discover + DELETE -# - -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -delete from t1 where id = 3; -select * from t1 order by id; -show status like 'handler_discover%'; - -drop table t1; - - - -###################################################### -# Test that a table that is outdated on disk -# can be "discovered" from a connected NDB Cluster -# - -flush status; - -create table t2( - id int not null primary key, - name char(22) -) engine=ndb; -insert into t2 values (1, "Discoverer"); -select * from t2; -show status like 'handler_discover%'; -flush tables; - -# Modify the frm file on disk -system echo "blaj" >> $MYSQLTEST_VARDIR/master-data/test/t2.frm ; -select * from t2; - -show status like 'handler_discover%'; - -drop table t2; - - -################################################## -# Test that a table that already exists in NDB -# is only discovered if CREATE TABLE IF NOT EXISTS -# is used -# - -flush status; - -create table t3( - id int not null primary key, - name char(255) -) engine=ndb; -insert into t3 values (1, "Explorer"); -select * from t3; -show status like 'handler_discover%'; -flush tables; - -# Remove the frm file from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t3.frm - ---error ER_TABLE_EXISTS_ERROR -create table t3( - id int not null primary key, - name char(20), a int, b float, c char(24) -) engine=ndb; - -# The table shall not have been discovered since -# IF NOT EXISTS wasn't specified - -show status like 'handler_discover%'; - -# now it should be discovered -create table IF NOT EXISTS t3( - id int not null primary key, - id2 int not null, - name char(20) -) engine=ndb; - -# NOTE! the table called t3 have now been updated to -# use the same frm as in NDB, thus it's not certain that -# the table schema is the same as was stated in the -# CREATE TABLE statement above - -show status like 'handler_discover%'; - -SHOW CREATE TABLE t3; - -select * from t3; -show status like 'handler_discover%'; - -drop table t3; - -################################################## -# Test that a table that already exists in NDB -# is discovered when SHOW TABLES -# is used -# - -flush status; - -create table t7( - id int not null primary key, - name char(255) -) engine=ndb; -create table t6( - id int not null primary key, - name char(255) -) engine=MyISAM; -insert into t7 values (1, "Explorer"); -insert into t6 values (2, "MyISAM table"); -select * from t7; -show status like 'handler_discover%'; - -# Remove the frm file from disk -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - -show tables from test; -show status like 'handler_discover%'; - -# Remove the frm file from disk again -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - ---replace_column 6 # 7 # 8 # 9 # 12 # 13 # 15 # 18 # -show table status; -show status like 'handler_discover%'; - -drop table t6, t7; - - -####################################################### -# Test that a table that has been dropped from NDB -# but still exists on disk, get a consistent error message -# saying "No such table existed" -# - -flush status; - -create table t4( - id int not null primary key, - name char(27) -) engine=ndb; -insert into t4 values (1, "Automatic"); -select * from t4; - -# Remove the table from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t4 >> $NDB_TOOLS_OUTPUT ; - -# -# Test that correct error is returned ---error ER_NO_SUCH_TABLE -select * from t4; ---error ER_NO_SUCH_TABLE -select * from t4; - -show status like 'handler_discover%'; ---error ER_BAD_TABLE_ERROR -drop table t4; - -create table t4( - id int not null primary key, - name char(27) -) engine=ndb; -insert into t4 values (1, "Automatic"); -select * from t4; - -# Remove the table from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t4 >> $NDB_TOOLS_OUTPUT ; - ---error ER_NO_SUCH_TABLE -select * from t4; - -drop table if exists t4; - -# Test that dropping a table that does not exists -# on disk or in NDB gives same result as above ---error ER_BAD_TABLE_ERROR -drop table t5; -drop table if exists t5; - - -####################################################### -# Test that a table that has been dropped from NDB -# but still exists on disk is deleted from disk -# when SHOW TABLES is called -# - -flush status; - -create table t4( - id int not null primary key, - id2 int, - name char(27) -) engine=ndb; -insert into t4 values (1, 76, "Automatic2"); -select * from t4; -flush tables; - -# Remove the table from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t4 >> $NDB_TOOLS_OUTPUT ; - -SHOW TABLES; - ---error ER_NO_SUCH_TABLE -select * from t4; - -####################################################### -# Test SHOW TABLES ability to detect new and delete old -# tables. Test all at once using many tables -# - -flush status; - -# Create tables -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=myisam; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -create table t5(id int, d char(56)) engine=ndbcluster; -create table t6(id int) engine=ndbcluster; -create table t7(id int) engine=ndbcluster; -create table t8(id int, e char(34)) engine=myisam; -create table t9(id int) engine=myisam; - -# Populate tables -insert into t2 values (2, "myisam table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t5 values (5, "ndb table 5"); -insert into t6 values (6); -insert into t8 values (8, "myisam table 8"); -insert into t9 values (9); - -# Remove t3, t5 from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t3 >> $NDB_TOOLS_OUTPUT ; -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t5 >> $NDB_TOOLS_OUTPUT ; -# Remove t6, t7 from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t6.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - -SHOW TABLES; - -select * from t6; -select * from t7; - -show status like 'handler_discover%'; - -drop table t1, t2, t4, t6, t7, t8, t9; - -####################################################### -# Test SHOW TABLES LIKE ability to detect new and delete old -# tables. Test all at once using many tables. -# - -flush status; - -# Create tables -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=myisam; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -create table t5(id int, d char(56)) engine=ndbcluster; -create table t6(id int) engine=ndbcluster; -create table t7(id int) engine=ndbcluster; -create table t8(id int, e char(34)) engine=myisam; -create table t9(id int) engine=myisam; - -# Populate tables -insert into t2 values (2, "myisam table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t5 values (5, "ndb table 5"); -insert into t6 values (6); -insert into t8 values (8, "myisam table 8"); -insert into t9 values (9); - -# Remove t3, t5 from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t3 > /dev/null ; -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t5 > /dev/null ; -# Remove t6, t7 from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t6.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - - -SHOW TABLES LIKE 't6'; - -show status like 'handler_discover%'; - -# Check that t3 or t5 can't be created -# frm files for these tables is stilll on disk ---error ER_TABLE_EXISTS_ERROR -create table t3(a int); ---error ER_TABLE_EXISTS_ERROR -create table t5(a int); - -SHOW TABLES LIKE 't%'; - -show status like 'handler_discover%'; - -drop table t1, t2, t4, t6, t7, t8, t9; - - - -###################################################### -# Test that several tables can be discovered when -# one statement access several table at once. -# - -flush status; - -# Create tables -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=ndbcluster; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; - -# Populate tables -insert into t1 values (1); -insert into t2 values (2, "table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t4 values (4); - -# Remove t1, t2, t3 from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t2.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t3.frm -flush tables; - -# Select from the table which only exists in NDB. -select * from t1, t2, t3, t4; - -# 3 table should have been discovered -show status like 'handler_discover%'; - -drop table t1, t2, t3, t4; - - -######################################################### -# Test that a table that has been changed in NDB -# since it's been opened will be refreshed and discovered -# again -# - -flush status; - -show status like 'handler_discover%'; - -create table t5( - id int not null primary key, - name char(200) -) engine=ndb; -insert into t5 values (1, "Magnus"); -select * from t5; - -ALTER TABLE t5 ADD COLUMN adress char(255) FIRST; - -select * from t5; - -insert into t5 values - ("Adress for record 2", 2, "Carl-Gustav"), - ("Adress for record 3", 3, "Karl-Emil"); -update t5 set name="Bertil" where id = 2; -select * from t5 order by id; - -show status like 'handler_discover%'; - -drop table t5; - - -################################################################ -# Test that a table that has been changed with ALTER TABLE -# can be used from the same thread -# - -flush status; - -show status like 'handler_discover%'; - -create table t6( - id int not null primary key, - name char(20) -) engine=ndb; -insert into t6 values (1, "Magnus"); -select * from t6; - -ALTER TABLE t6 ADD COLUMN adress char(255) FIRST; - -select * from t6; -insert into t6 values - ("Adress for record 2", 2, "Carl-Gustav"), - ("Adress for record 3", 3, "Karl-Emil"); -update t6 set name="Bertil" where id = 2; -select * from t6 order by id; - -show status like 'handler_discover%'; - -drop table t6; - -##################################################### -# Test that only tables in the current database shows -# up in SHOW TABLES -# - -show tables; - -create table t1 (a int,b longblob) engine=ndb; -show tables; -create database test2; -use test2; -show tables; ---error ER_NO_SUCH_TABLE -select * from t1; -create table t2 (b int,c longblob) engine=ndb; -use test; -select * from t1; -show tables; -drop table t1; -use test2; -drop table t2; -drop database test2; -use test; - -######################################################### -# Bug#8035 -# mysqld would segfault on second select * before bug was fixed -# ---disable_warnings -drop database if exists test_only_ndb_tables; ---enable_warnings -create database test_only_ndb_tables; -use test_only_ndb_tables; -create table t1 (a int primary key) engine=ndb; -select * from t1; ---exec $NDB_MGM --no-defaults -e "all restart -n" > /dev/null ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --not-started > /dev/null ---error ER_CANT_LOCK -select * from t1; ---exec $NDB_MGM --no-defaults -e "all start" > /dev/null ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults > /dev/null ---source include/ndb_wait_connected.inc -use test; -drop database test_only_ndb_tables; - -##################################################### -# Test that it's not possible to create tables -# with same name as NDB internal tables -# This will also test that it's not possible to create -# a table with tha same name as a table that can't be -# discovered( for example a table created via NDBAPI) - -# Test disabled since it doesn't work on case insensitive systems -#--error ER_TABLE_EXISTS_ERROR -#CREATE TABLE sys.SYSTAB_0 (a int); -#--error ER_UNKNOWN_ERROR -#select * from sys.SYSTAB_0; - -#CREATE TABLE IF NOT EXISTS sys.SYSTAB_0 (a int); -#show warnings; -#--error ER_UNKNOWN_ERROR -#select * from sys.SYSTAB_0; - -#--error ER_BAD_TABLE_ERROR -#drop table sys.SYSTAB_0; -#drop table IF EXISTS sys.SYSTAB_0; - -###################################################### -# Note! This should always be the last step in this -# file, the table t9 will be used and dropped -# by ndb_autodiscover2 -# - -CREATE TABLE t9 ( - a int NOT NULL PRIMARY KEY, - b int -) engine=ndb; - -insert t9 values(1, 2), (2,3), (3, 4), (4, 5); - -#Don't drop the table, instead remove the frm file ---remove_file $MYSQLTEST_VARDIR/master-data/test/t9.frm - -# Now leave test case, when ndb_autodiscover2 will run, this -# MySQL Server will have been restarted because it has a -# ndb_autodiscover2-master.opt file. - -create table t10 ( - a int not null primary key, - b blob -) engine=ndb; - -insert into t10 values (1, 'kalle'); - ---exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test `$NDB_TOOLS_DIR/ndb_show_tables --no-defaults | grep BLOB | while read a b c d e f g; do echo $g; done` >> $NDB_TOOLS_OUTPUT 2>&1 || true - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb_team/t/ndb_autodiscover2-master.opt b/mysql-test/suite/ndb_team/t/ndb_autodiscover2-master.opt deleted file mode 100644 index e0d075c3fbd..00000000000 --- a/mysql-test/suite/ndb_team/t/ndb_autodiscover2-master.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-external-locking diff --git a/mysql-test/suite/ndb_team/t/ndb_autodiscover2.test b/mysql-test/suite/ndb_team/t/ndb_autodiscover2.test deleted file mode 100644 index ebe14696cd2..00000000000 --- a/mysql-test/suite/ndb_team/t/ndb_autodiscover2.test +++ /dev/null @@ -1,21 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - -# -# Simple test to show use of discover when the server has been restarted -# The previous step has simply removed the frm file -# from disk, but left the table in NDB -# ---sleep 3 -select * from t9 order by a; - -# handler_discover should be 1 -show status like 'handler_discover%'; - -drop table t9; - ---error 1296 -select * from t10; -drop table t10; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb_team/t/ndb_autodiscover3.test b/mysql-test/suite/ndb_team/t/ndb_autodiscover3.test deleted file mode 100644 index 10416aee11f..00000000000 --- a/mysql-test/suite/ndb_team/t/ndb_autodiscover3.test +++ /dev/null @@ -1,104 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - -# see bug#21563 --- source include/have_binlog_format_mixed_or_row.inc - ---disable_warnings -drop table if exists t1, t2; ---enable_warnings - -connect (con1,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (con2,127.0.0.1,root,,test,$MASTER_MYPORT1,); - -# Workaround for Bug#27644 -# ndb: connecting api node/mysqld may "steal" node_id from running mysqld -# - let ndb_waiter use a fixed node id so "steal" cannot happen ---let connect_str = "nodeid=6;$NDB_CONNECTSTRING" - -# -# Transaction ongoing while cluster is restarted -# ---connection server1 -create table t1 (a int key) engine=ndbcluster; - -begin; -insert into t1 values (1); - ---exec $NDB_MGM --no-defaults -e "all restart" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT -# Wait for mysqld to reconnect and exit from readonly mode ---disable_query_log ---connection con1 ---source include/ndb_not_readonly.inc ---connection con2 ---source include/ndb_not_readonly.inc ---enable_query_log - ---connection server1 ---error 1297 -insert into t1 values (2); ---error 1296 -commit; - -drop table t1; - -# -# Stale cache after restart -i -# ---connection server1 -create table t2 (a int, b int, primary key(a,b)) engine=ndbcluster; -insert into t2 values (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1); -select * from t2 order by a limit 3; - ---exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT -# to ensure mysqld has connected again, and recreated system tables ---disable_query_log ---connection con1 ---source include/ndb_not_readonly.inc ---connection con2 ---source include/ndb_not_readonly.inc ---enable_query_log - ---connection server2 ---error ER_NO_SUCH_TABLE -select * from t2; -show tables like 't2'; -reset master; -create table t2 (a int key) engine=ndbcluster; -insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -select * from t2 order by a limit 3; - -# server 1 should have a stale cache, and in this case wrong frm, transaction must be retried ---connection server1 -select * from t2 order by a limit 3; -reset master; - ---exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT -# to ensure mysqld has connected again, and recreated system tables ---disable_query_log ---connection con1 ---source include/ndb_not_readonly.inc ---connection con2 ---source include/ndb_not_readonly.inc ---enable_query_log - ---connection server1 ---error ER_NO_SUCH_TABLE -select * from t2; -show tables like 't2'; -reset master; -create table t2 (a int key) engine=ndbcluster; -insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -select * from t2 order by a limit 3; - -# server 2 should have a stale cache, but with right frm, transaction need not be retried ---connection server2 -select * from t2 order by a limit 3; -reset master; - -drop table t2; -# End of 4.1 tests diff --git a/mysql-test/suite/ndb_team/t/ndb_backup_print.test b/mysql-test/suite/ndb_team/t/ndb_backup_print.test deleted file mode 100644 index cf869fd56f5..00000000000 --- a/mysql-test/suite/ndb_team/t/ndb_backup_print.test +++ /dev/null @@ -1,68 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; ---enable_warnings - -#NO.1 test output of backup ---exec $NDB_MGM --no-defaults -e "start backup" |sed -e 's/[0-9]//g' |sed -e 's/localhost//g' |sed -e 's/\.\.\.*//g' - -create table t1 - (pk int key - ,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) - ,b1 TINYINT, b2 TINYINT UNSIGNED - ,c1 SMALLINT, c2 SMALLINT UNSIGNED - ,d1 INT, d2 INT UNSIGNED - ,e1 BIGINT, e2 BIGINT UNSIGNED - ,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY - ,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY - ,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) - ,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) - ) engine ndb; - -insert into t1 values - (1 - ,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 - ,127, 255 - ,32767, 65535 - ,2147483647, 4294967295 - ,9223372036854775807, 18446744073709551615 - ,'1','12345678901234567890123456789012','123456789' - ,'1','12345678901234567890123456789012','123456789' - ,0x12,0x123456789abcdef0, 0x012345 - ,0x12,0x123456789abcdef0, 0x00123450 - ); - -insert into t1 values - (2 - ,0, 0, 0, 0, 0 - ,-128, 0 - ,-32768, 0 - ,-2147483648, 0 - ,-9223372036854775808, 0 - ,'','','' - ,'','','' - ,0x0,0x0,0x0 - ,0x0,0x0,0x0 - ); - -insert into t1 values - (3 - ,NULL,NULL,NULL,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ); - -#NO.2 test output of backup after some simple SQL operations ---exec $NDB_MGM --no-defaults -e "start backup" |sed -e 's/[0-9]//g' |sed -e 's/localhost//g' |sed -e 's/\.\.\.*//g' - -drop table t1; diff --git a/mysql-test/suite/ndb_team/t/ndb_dd_backuprestore.test b/mysql-test/suite/ndb_team/t/ndb_dd_backuprestore.test deleted file mode 100644 index 48db8ec3e0b..00000000000 --- a/mysql-test/suite/ndb_team/t/ndb_dd_backuprestore.test +++ /dev/null @@ -1,349 +0,0 @@ -######################################## -# Author: JBM -# Date: 2006-01-24 -# Purpose: Test CDD backup and restore -######################################## - --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_query_log -set new=on; ---enable_query_log - ---disable_warnings -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -DROP TABLE IF EXISTS test.t4; -DROP TABLE IF EXISTS test.t5; -DROP TABLE IF EXISTS test.t6; ---enable_warnings - -############ Test 1 Simple DD backup and restore ############# --- echo **** Test 1 Simple DD backup and restore **** - -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; - - -CREATE TABLE test.t1 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 CHAR(50) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t1 VALUES (NULL, "Sweden", $j, b'1'); - dec $j; -} ---enable_query_log -SELECT COUNT(*) FROM test.t1; -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -################# Mixed Cluster Test ############################ --- echo **** Test 2 Mixed Cluster Test backup and restore **** - -CREATE TABLE test.t2 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 VARCHAR(200) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL)ENGINE=NDB; - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t2 VALUES (NULL, "Sweden, Texas", $j, b'0'); - dec $j; -} ---enable_query_log - -CREATE TABLE test.t3 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; - -CREATE TABLE test.t4 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))ENGINE=NDB; - -let $j= 50; ---disable_query_log -while ($j) -{ - INSERT INTO test.t3 VALUES (NULL, repeat('a',1*1024)); - INSERT INTO test.t3 VALUES (NULL, repeat('b',16*1024)); - INSERT INTO test.t4 VALUES (NULL, repeat('a',1*1024)); - INSERT INTO test.t4 VALUES (NULL, repeat('b',16*1024)); - dec $j; -} ---enable_query_log - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; - -SELECT COUNT(*) FROM test.t4; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; - -SELECT COUNT(*) FROM test.t4; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -###################### Adding partition ################################# --- echo **** Test 3 Adding partition Test backup and restore **** - -CREATE TABLESPACE table_space2 -ADD DATAFILE './table_space2/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; - -CREATE TABLE test.t1 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(150) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 4; - -CREATE TABLE test.t4 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(180) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 2; - -CREATE TABLE test.t2 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY KEY(c3) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -CREATE TABLE test.t5 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY KEY(pk1) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -CREATE TABLE test.t3 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(202) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY RANGE (c3) PARTITIONS 3 (PARTITION x1 VALUES LESS THAN (105), PARTITION x2 VALUES LESS THAN (333), PARTITION x3 VALUES LESS THAN (720)); - -CREATE TABLE test.t6 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(220) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY RANGE (pk1) PARTITIONS 2 (PARTITION x1 VALUES LESS THAN (333), PARTITION x2 VALUES LESS THAN (720)); - -SHOW CREATE TABLE test.t1; - -SHOW CREATE TABLE test.t2; - -SHOW CREATE TABLE test.t3; - -SHOW CREATE TABLE test.t4; - -SHOW CREATE TABLE test.t5; - -SHOW CREATE TABLE test.t6; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; - - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t1 VALUES (NULL, "Sweden, Texas", $j, b'0'); - eval INSERT INTO test.t4 VALUES (NULL, "Sweden, Texas", $j, b'0'); - dec $j; - eval INSERT INTO test.t2 VALUES (NULL, "Sweden, Texas, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - eval INSERT INTO test.t5 VALUES (NULL, "Sweden, Texas, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - dec $j; - eval INSERT INTO test.t3 VALUES (NULL, "TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - eval INSERT INTO test.t6 VALUES (NULL, "TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU", $j, b'1'); } --enable_query_log - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t4; - -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t5; - -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t6; - -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -ALTER TABLESPACE table_space2 -DROP DATAFILE './table_space2/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP TABLESPACE table_space2 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - - -SHOW CREATE TABLE test.t1; - -SHOW CREATE TABLE test.t2; - -SHOW CREATE TABLE test.t3; - -SHOW CREATE TABLE test.t4; - -SHOW CREATE TABLE test.t5; - -SHOW CREATE TABLE test.t6; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t4; - -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t5; - -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t6; - -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; - -# Cleanup - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; - -ALTER TABLESPACE table_space1 DROP DATAFILE './table_space1/datafile.dat' ENGINE=NDB; - -ALTER TABLESPACE table_space2 DROP DATAFILE './table_space2/datafile.dat' ENGINE=NDB; - -DROP TABLESPACE table_space1 ENGINE = NDB; - -DROP TABLESPACE table_space2 ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 ENGINE = NDB; - -#End 5.1 test case - - diff --git a/mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test b/mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test deleted file mode 100644 index 5d6c915307a..00000000000 --- a/mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test +++ /dev/null @@ -1,404 +0,0 @@ -############################################### -# Purpose: To test advance DD and replication # -############################################### - -#### Include Section #### ---source include/have_ndb.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_default_cluster.inc ---source include/not_embedded.inc ---source include/ndb_master-slave.inc - -###################################################### -# Requirment: Cluster DD and replication must be able# -# to handle ALTER tables and indexes and must rpl # -# to the slave correctly # -###################################################### - -## Test #1 replication of CDD and Alter Tables ##### ---echo ***** Test 1 RPL of CDD and Alter ***** ---echo ***** Test 1 setup ***** - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 4M -ENGINE=NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE=NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE 4M -ENGINE=NDB; - -CREATE TABLE t1 - (c1 INT NOT NULL PRIMARY KEY, - c2 INT NOT NULL, - c3 INT NOT NULL) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB; - ---echo ***** insert some data ***** - -let $j= 900; ---disable_query_log -while ($j) -{ - eval INSERT INTO t1 VALUES($j,$j*2,$j+3); - dec $j; -} ---enable_query_log - ---echo ***** Select from Master ***** - -SELECT * FROM t1 ORDER BY c1 LIMIT 5; - ---echo ***** Select from Slave ***** ---sync_slave_with_master -connection slave; -SELECT * FROM t1 ORDER BY c1 LIMIT 5; - -################################### -# Just to some File Schema check # -################################### - ---disable_query_log -SELECT DISTINCT FILE_NAME, FILE_TYPE, TABLESPACE_NAME, LOGFILE_GROUP_NAME - FROM INFORMATION_SCHEMA.FILES - WHERE ENGINE="ndbcluster" ORDER BY FILE_NAME; ---enable_query_log - ---echo **** Do First Set of ALTERs in the master table **** -################################################### -# On this first set of alters I expect: -# 1. To be able to create and index on 2 columns -# 2. To be able to create a unique index -# 3. To be able to add two columns and have -# it all replicated correctly to the slave cluster. -################################################### -connection master; -CREATE INDEX t1_i ON t1(c2, c3); -#Bug 18039 -CREATE UNIQUE INDEX t1_i2 ON t1(c2); -ALTER TABLE t1 ADD c4 TIMESTAMP; -ALTER TABLE t1 ADD c5 DOUBLE; -ALTER TABLE t1 ADD INDEX (c5); -SHOW CREATE TABLE t1; - ---echo **** Show first set of ALTERs on SLAVE **** ---sync_slave_with_master -connection slave; -SHOW CREATE TABLE t1; - ---echo **** Second set of alters test 1 **** -############################################ -# With this next set of alters we have had -# Some issues with renames of tables. So this -# test renames our main table, drop and index off -# of it, creates another table with then name -# of the orginal table, inserts a row, drops -# the table and renames the orginal table back. -# I want to make sure that 1) the cluster does -# okay with this and 2) that it is replicated -# correctly. -############################################# -connection master; -ALTER TABLE t1 RENAME t2; -ALTER TABLE t2 DROP INDEX c5; -CREATE TABLE t1(c1 INT)ENGINE=NDB; -INSERT INTO t1 VALUES(1); -DROP TABLE t1; -ALTER TABLE t2 RENAME t1; - ---echo **** Show second set of ALTERs on MASTER **** - -SHOW CREATE TABLE t1; - ---echo **** Show second set of ALTERs on SLAVE **** ---sync_slave_with_master -connection slave; -SHOW CREATE TABLE t1; - ---echo **** Third and last set of alters for test1 **** -######################################################### -# In this last set of alters, we are messing with the -# cluster ability to rebuild indexes, drop a column that make up -# an index with another column and change types several times in -# a row. I have choosen the BLOB as it seems to have had many -# issues in this release. I want to make sure that the cluster -# deals with these radical changes and that the replication to -# the slave cluster is dones correctly. -########################################################### -connection master; -ALTER TABLE t1 CHANGE c1 c1 DOUBLE; -ALTER TABLE t1 CHANGE c2 c2 DECIMAL(10,2); -ALTER TABLE t1 DROP COLUMN c3; -ALTER TABLE t1 CHANGE c4 c4 TEXT CHARACTER SET utf8; -ALTER TABLE t1 CHANGE c4 c4 BLOB; -ALTER TABLE t1 CHANGE c4 c3 BLOB; -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -UPDATE t1 SET c3=@b1 where c1 = 1; -UPDATE t1 SET c3=@b1 where c1 = 2; - ---echo **** Show last set of ALTERs on MASTER **** - -SHOW CREATE TABLE t1; -SELECT * FROM t1 ORDER BY c1 LIMIT 5; - ---echo **** Show last set of ALTERs on SLAVE **** ---sync_slave_with_master -connection slave; -SHOW CREATE TABLE t1; -# Bug 18094 -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -SELECT * FROM t1 where c1 = 1; - -connection master; -DROP TABLE t1; ---sync_slave_with_master -connection slave; -STOP SLAVE; -RESET SLAVE; -connection master; -RESET MASTER; -connection slave; -START SLAVE; - -################### TEST 2 TPCB for disk data ########################### -# Requirement: To have Stored Procedures and Functions that are used to # -# populate and post transactions to the data base using CDD that span # -# 2 tables spaces and also use a memory only cluster tables. In addition# -# The slave is to be stopped, cleaned and restored and synced with the # -# Master cluster # -######################################################################### - ---echo ******** Create additional TABLESPACE test 2 ************** - -connection master; -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile03.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 10M -ENGINE=NDB; - -ALTER TABLESPACE ts2 -ADD DATAFILE 'datafile04.dat' -INITIAL_SIZE 5M -ENGINE=NDB; - -let engine_type=NDBCLUSTER; -let table_space=ts2; -let format='RBR'; - ---source include/tpcb_disk_data.inc - ---echo ****** TEST 2 test time ********************************* -USE tpcb; - ---echo *********** Load up the database ****************** -CALL tpcb.load(); - ---echo ********** Check load master and slave ************** -SELECT COUNT(*) FROM account; ---sync_slave_with_master -connection slave; -USE tpcb; -SELECT COUNT(*) FROM account; - ---echo ******** Run in some transactions *************** - -connection master; -let $j= 100; ---disable_query_log -while ($j) -{ - eval CALL tpcb.trans($format); - dec $j; -} ---enable_query_log - - ---echo ***** Time to try slave sync *********** ---echo **** Must make sure slave is clean ***** ---connection slave -STOP SLAVE; -RESET SLAVE; -DROP PROCEDURE IF EXISTS tpcb.load; -DROP PROCEDURE IF EXISTS tpcb.trans; -DROP TABLE IF EXISTS tpcb.account; -DROP TABLE IF EXISTS tpcb.teller; -DROP TABLE IF EXISTS tpcb.branch; -DROP TABLE IF EXISTS tpcb.history; -DROP DATABASE tpcb; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE=NDB; - -DROP TABLESPACE ts1 ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile03.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile04.dat' -ENGINE=NDB; - -DROP TABLESPACE ts2 ENGINE=NDB; - -DROP LOGFILE GROUP lg1 ENGINE=NDB; - ---echo ********** Take a backup of the Master ************* -connection master; - -SELECT COUNT(*) FROM history; - -let $j= 100; ---disable_query_log -while ($j) -{ - eval CALL tpcb.trans($format); - dec $j; -} ---enable_query_log - -SELECT COUNT(*) FROM history; - ---source include/ndb_backup.inc - ---echo ************ Restore the slave ************************ -connection slave; -CREATE DATABASE tpcb; ---source include/ndb_restore_slave_eoption.inc - ---echo ***** Check a few slave restore values *************** -connection slave; -USE tpcb; -SELECT COUNT(*) FROM account; - ---echo ***** Add some more records to master ********* -connection master; -let $j= 100; ---disable_query_log -while ($j) -{ - eval CALL tpcb.trans($format); - dec $j; -} ---enable_query_log - -# -# now setup replication to continue from last epoch -# 1. get apply_status epoch from slave -# 2. get corresponding _next_ binlog postition from master -# 3. change master on slave -# 4. add some transaction for slave to process -# 5. start the replication - ---echo ***** Finsh the slave sync process ******* ---disable_query_log -# 1. 2. 3. ---sync_slave_with_master ---source include/ndb_setup_slave.inc ---enable_query_log - -# 4. ---echo * 4. * -connection master; -let $j= 100; ---disable_query_log -while ($j) -{ - eval CALL tpcb.trans($format); - dec $j; -} ---enable_query_log - -# 5. ---echo * 5. * -connection slave; -START SLAVE; - ---echo **** We should be ready to continue on ************* - -connection master; ---echo ****** Let's make sure we match ******* ---echo ***** MASTER ******* -USE tpcb; -SELECT COUNT(*) FROM history; - ---echo ****** SLAVE ******** ---sync_slave_with_master -connection slave; -USE tpcb; -SELECT COUNT(*) FROM history; - ---echo *** DUMP MASTER & SLAVE FOR COMPARE ******** - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert tpcb account teller branch history > $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql - ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert tpcb account teller branch history > $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql - ---echo *************** TEST 2 CLEANUP SECTION ******************** -connection master; -DROP PROCEDURE IF EXISTS tpcb.load; -DROP PROCEDURE IF EXISTS tpcb.trans; -DROP TABLE tpcb.account; -DROP TABLE tpcb.teller; -DROP TABLE tpcb.branch; -DROP TABLE tpcb.history; -DROP DATABASE tpcb; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE=NDB; - -DROP TABLESPACE ts1 ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile03.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile04.dat' -ENGINE=NDB; - -DROP TABLESPACE ts2 ENGINE=NDB; - -DROP LOGFILE GROUP lg1 ENGINE=NDB; - ---sync_slave_with_master - -connection master; - ---echo ****** Do dumps compare ************ - -diff_files $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql; - -## Note: Ths files should only get removed, if the above diff succeeds. - -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 diff --git a/mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test b/mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test deleted file mode 100644 index f5625f841b0..00000000000 --- a/mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test +++ /dev/null @@ -1,16 +0,0 @@ -############################################################# -# Purpose: To test having extra columns on the master WL#3915 -############################################################# --- source include/have_ndb.inc --- source include/ndb_master-slave.inc --- source include/have_binlog_format_mixed_or_row.inc - -let $engine_type = 'NDB'; - -set binlog_format=row; --- source extra/rpl_tests/rpl_extraMaster_Col.test - -set binlog_format=mixed; --- source extra/rpl_tests/rpl_extraMaster_Col.test - ---source include/rpl_end.inc diff --git a/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb-master.opt b/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb-master.opt deleted file mode 100644 index 3596fc4d3bd..00000000000 --- a/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb --default-storage-engine=innodb diff --git a/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test b/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test deleted file mode 100644 index 87bd1aecd30..00000000000 --- a/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test +++ /dev/null @@ -1,35 +0,0 @@ -############################################# -#Purpose: Generic replication to cluster -# and ensuring that the ndb_apply_status -# table is updated. -############################################# -# Notes: -# include/select_ndb_apply_status.inc -# Selects out the log name, start & end pos -# from the ndb_apply_status table -# -# include/show_binlog_using_logname.inc -# To select out 1 row from offset 1 -# from the start position in the binlog whose -# name is = log_name -# -# include/tpcb.inc -# Creates DATABASE tpcb, the tables and -# stored procedures for loading the DB -# and for running transactions against DB. -############################################## - - -## Includes ## - ---disable_query_log ---source include/have_ndb.inc ---source include/have_innodb.inc ---source include/have_binlog_format_mixed.inc ---source include/ndb_master-slave.inc ---enable_query_log -let $off_set = 9; -let $rpl_format = 'MIX'; ---source extra/rpl_tests/rpl_ndb_apply_status.test - ---source include/rpl_end.inc |