summaryrefslogtreecommitdiff
path: root/mysql-test/suite/parts/t
diff options
context:
space:
mode:
authorMattias Jonsson <mattiasj@mysql.com>2008-07-01 20:38:15 +0200
committerMattias Jonsson <mattiasj@mysql.com>2008-07-01 20:38:15 +0200
commit67174b712be958d4d23d54ae1b49a80344ff09fb (patch)
treea6169b7cc8815c1f84bfbd5adaefe8b607105964 /mysql-test/suite/parts/t
parent41116166257e92df96c394035c8b580e48626b00 (diff)
downloadmariadb-git-67174b712be958d4d23d54ae1b49a80344ff09fb.tar.gz
Bug#36732: many disabled ndb tests in test suite parts
REORGANIZE TEST parts WHERE ENGINE='NDB' ;) Updated tests for better matching NDB's limitations. Removed some duplicate tests. mysql-test/suite/parts/inc/part_supported_sql_funcs_delete.inc: Bug#36732: many disabled ndb tests in test suite parts Added variable for NDB (since it does not support DROP PARTITION) mysql-test/suite/parts/inc/partition_alter_11.inc: Bug#36732: many disabled ndb tests in test suite parts Assigning directly to variable without going through the server. mysql-test/suite/parts/inc/partition_bigint.inc: Bug#36732: many disabled ndb tests in test suite parts Added --sorted_result for consistency lowered number of partitions for use with NDB (NDB can only do maximum of 8 partitions) mysql-test/suite/parts/inc/partition_int.inc: Bug#36732: many disabled ndb tests in test suite parts Added --sorted_result for consistency lowered number of partitions for use with NDB (NDB can only do maximum of 8 partitions) mysql-test/suite/parts/inc/partition_mediumint.inc: Bug#36732: many disabled ndb tests in test suite parts Added --sorted_result for consistency lowered number of partitions for use with NDB (NDB can only do maximum of 8 partitions) mysql-test/suite/parts/inc/partition_smallint.inc: Bug#36732: many disabled ndb tests in test suite parts Added --sorted_result for consistency lowered number of partitions for use with NDB (NDB can only do maximum of 8 partitions) mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc: Bug#36732: many disabled ndb tests in test suite parts Made it work better with NDB mysql-test/suite/parts/inc/partition_tinyint.inc: Bug#36732: many disabled ndb tests in test suite parts Added --sorted_result for consistency lowered number of partitions for use with NDB (NDB can only do maximum of 8 partitions) mysql-test/suite/parts/r/ndb_blob_partition.result: Bug#36732: many disabled ndb tests in test suite parts Removing this duplicate test since it already exists (and updated) in suite/ndb mysql-test/suite/parts/r/ndb_dd_backuprestore.result: Bug#36732: many disabled ndb tests in test suite parts Updated result file mysql-test/suite/parts/r/ndb_partition_error.result: Bug#36732: many disabled ndb tests in test suite parts Removing this duplicate test since it already exists (and updated) in suite/ndb mysql-test/suite/parts/r/ndb_partition_key.result: Bug#36732: many disabled ndb tests in test suite parts Removing this duplicate test since it already exists (and updated) in suite/ndb mysql-test/suite/parts/r/ndb_partition_list.result: Bug#36732: many disabled ndb tests in test suite parts Removing this duplicate test since it already exists (and updated) in suite/ndb mysql-test/suite/parts/r/ndb_partition_range.result: Bug#36732: many disabled ndb tests in test suite parts Removing this duplicate test since it already exists (and updated) in suite/ndb mysql-test/suite/parts/r/part_supported_sql_func_ndb.result: Bug#36732: many disabled ndb tests in test suite parts Updated result file mysql-test/suite/parts/r/partition_alter1_1_innodb.result: Bug#36732: many disabled ndb tests in test suite parts Updated result file mysql-test/suite/parts/r/partition_alter1_1_myisam.result: Bug#36732: many disabled ndb tests in test suite parts Updated result file mysql-test/suite/parts/r/partition_alter1_2_innodb.result: Bug#36732: many disabled ndb tests in test suite parts Updated result file. Diff bigger than necessary, due to bzr diff bug. mysql-test/suite/parts/r/partition_alter1_2_myisam.result: Bug#36732: many disabled ndb tests in test suite parts Updated result file mysql-test/suite/parts/r/partition_alter2_innodb.result: Bug#36732: many disabled ndb tests in test suite parts Updated result file mysql-test/suite/parts/r/partition_alter2_myisam.result: Bug#36732: many disabled ndb tests in test suite parts Updated result file mysql-test/suite/parts/r/partition_engine_ndb.result: Bug#36732: many disabled ndb tests in test suite parts Updated result file mysql-test/suite/parts/r/partition_int_innodb.result: Bug#36732: many disabled ndb tests in test suite parts Updated result file mysql-test/suite/parts/r/partition_int_myisam.result: Bug#36732: many disabled ndb tests in test suite parts Updated result file mysql-test/suite/parts/r/partition_int_ndb.result: Bug#36732: many disabled ndb tests in test suite parts Updated result file mysql-test/suite/parts/r/rpl_ndb_dd_partitions.result: Bug#36732: many disabled ndb tests in test suite parts Removing this duplicate test since it already exists (and updated) in suite/rpl_ndb mysql-test/suite/parts/t/disabled.def: Bug#36732: many disabled ndb tests in test suite parts Removed some duplicate tests, fixed some tests. Removed the 'runs too long on PB' test from disabled.def and made them to require 'big-test'. mysql-test/suite/parts/t/ndb_blob_partition.test: Bug#36732: many disabled ndb tests in test suite parts Removing this duplicate test since it already exists (and updated) in suite/ndb mysql-test/suite/parts/t/ndb_dd_backuprestore.test: Bug#36732: many disabled ndb tests in test suite parts Added new=on for allowing test of hash/range and list partitioning. mysql-test/suite/parts/t/ndb_partition_error.test: Bug#36732: many disabled ndb tests in test suite parts Removing this duplicate test since it already exists (and updated) in suite/ndb mysql-test/suite/parts/t/ndb_partition_key.test: Bug#36732: many disabled ndb tests in test suite parts Removing this duplicate test since it already exists (and updated) in suite/ndb mysql-test/suite/parts/t/ndb_partition_list.test: Bug#36732: many disabled ndb tests in test suite parts Removing this duplicate test since it already exists (and updated) in suite/ndb mysql-test/suite/parts/t/ndb_partition_range.test: Bug#36732: many disabled ndb tests in test suite parts Removing this duplicate test since it already exists (and updated) in suite/ndb mysql-test/suite/parts/t/part_supported_sql_func_ndb.test: Bug#36732: many disabled ndb tests in test suite parts Added new=on for allowing test of hash/range and list partitioning. Added ndb restriction variables. mysql-test/suite/parts/t/partition_alter1_1_2_ndb.test: Bug#36732: many disabled ndb tests in test suite parts requiring big-test instead of disable it. mysql-test/suite/parts/t/partition_alter1_1_ndb.test: Bug#36732: many disabled ndb tests in test suite parts requiring big-test instead of disable it. mysql-test/suite/parts/t/partition_alter1_2_ndb.test: Bug#36732: many disabled ndb tests in test suite parts requiring big-test instead of disable it. mysql-test/suite/parts/t/partition_alter2_ndb.test: Bug#36732: many disabled ndb tests in test suite parts Added new=on for allowing test of hash/range and list partitioning. mysql-test/suite/parts/t/partition_basic_ndb.test: Bug#36732: many disabled ndb tests in test suite parts Added new=on for allowing test of hash/range and list partitioning. mysql-test/suite/parts/t/partition_bit_ndb.test: Bug#36732: many disabled ndb tests in test suite parts Added new=on for allowing test of hash/range and list partitioning. mysql-test/suite/parts/t/partition_engine_ndb.test: Bug#36732: many disabled ndb tests in test suite parts Added new=on for allowing test of hash/range and list partitioning. mysql-test/suite/parts/t/partition_int_ndb.test: Bug#36732: many disabled ndb tests in test suite parts Added new=on for allowing test of hash/range and list partitioning. mysql-test/suite/parts/t/partition_syntax_ndb.test: Bug#36732: many disabled ndb tests in test suite parts Added new=on for allowing test of hash/range and list partitioning. mysql-test/suite/parts/t/partition_value_ndb.test: Bug#36732: many disabled ndb tests in test suite parts Added new=on for allowing test of hash/range and list partitioning. mysql-test/suite/parts/t/rpl_ndb_dd_partitions.test: Bug#36732: many disabled ndb tests in test suite parts Removing this duplicate test since it already exists (and updated) in suite/rpl_ndb
Diffstat (limited to 'mysql-test/suite/parts/t')
-rw-r--r--mysql-test/suite/parts/t/disabled.def23
-rw-r--r--mysql-test/suite/parts/t/ndb_blob_partition.test93
-rw-r--r--mysql-test/suite/parts/t/ndb_dd_backuprestore.test4
-rw-r--r--mysql-test/suite/parts/t/ndb_partition_error.test71
-rw-r--r--mysql-test/suite/parts/t/ndb_partition_key.test208
-rw-r--r--mysql-test/suite/parts/t/ndb_partition_list.test64
-rw-r--r--mysql-test/suite/parts/t/ndb_partition_range.test260
-rw-r--r--mysql-test/suite/parts/t/part_supported_sql_func_ndb.test10
-rw-r--r--mysql-test/suite/parts/t/partition_alter1_1_2_ndb.test1
-rw-r--r--mysql-test/suite/parts/t/partition_alter1_1_ndb.test1
-rw-r--r--mysql-test/suite/parts/t/partition_alter1_2_ndb.test1
-rw-r--r--mysql-test/suite/parts/t/partition_alter2_ndb.test5
-rw-r--r--mysql-test/suite/parts/t/partition_basic_ndb.test5
-rw-r--r--mysql-test/suite/parts/t/partition_bit_ndb.test9
-rw-r--r--mysql-test/suite/parts/t/partition_engine_ndb.test5
-rw-r--r--mysql-test/suite/parts/t/partition_int_ndb.test11
-rw-r--r--mysql-test/suite/parts/t/partition_syntax_ndb.test5
-rw-r--r--mysql-test/suite/parts/t/partition_value_ndb.test5
-rw-r--r--mysql-test/suite/parts/t/rpl_ndb_dd_partitions.test310
19 files changed, 63 insertions, 1028 deletions
diff --git a/mysql-test/suite/parts/t/disabled.def b/mysql-test/suite/parts/t/disabled.def
index d7c7dba6204..c2707f5a763 100644
--- a/mysql-test/suite/parts/t/disabled.def
+++ b/mysql-test/suite/parts/t/disabled.def
@@ -1,22 +1,11 @@
-ndb_blob_partition : cannot create t1
-ndb_dd_backuprestore : cannot create t1
-ndb_partition_error : cannot create t1
-ndb_partition_list : cannot create t1
-ndb_partition_range : cannot create t1
-part_supported_sql_func_ndb : cannot create t1
-partition_alter1_1_ndb : test works, but runs too long on PB
-partition_alter1_1_2_ndb : test works, but runs too long on PB
-partition_alter1_2_ndb : test works, but runs too long on PB
-partition_alter2_ndb : cannot create t1
-partition_basic_ndb : cannot create t1
-partition_bit_ndb : cannot create t1
-partition_engine_ndb : cannot create t1
-partition_int_ndb : cannot create t1
+partition_alter2_ndb : Bug#18735 Not supported
+partition_basic_ndb : Bug#19899 Crashing the server
+# http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-limitations-syntax.html
+partition_bit_ndb : NDB does not support bit column in index
partition_sessions : needs system_3_init.inc
-partition_syntax_ndb : cannot create t1
+partition_syntax_ndb : Bug#36735 Not supported
partition_value_innodb : Bug#30581 partition_value tests use disallowed CAST() function
partition_value_myisam : Bug#30581 partition_value tests use disallowed CAST() function
-partition_value_ndb : cannot create t1
-rpl_ndb_dd_partitions : cannot create t1
+partition_value_ndb : Bug#30581 partition_value tests use disallowed CAST() function
partition_alter4_myisam : Bug#20129 / WL#4176
partition_alter4_innodb : Bug#20129 / WL#4176
diff --git a/mysql-test/suite/parts/t/ndb_blob_partition.test b/mysql-test/suite/parts/t/ndb_blob_partition.test
deleted file mode 100644
index a3948cc9491..00000000000
--- a/mysql-test/suite/parts/t/ndb_blob_partition.test
+++ /dev/null
@@ -1,93 +0,0 @@
---source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-#
-# Minimal NDB blobs test with range partitions.
-#
-
-create table t1 (
- a mediumint not null,
- b text not null,
- c int not null,
- d longblob,
- primary key using hash (a,c),
- unique key (c)
-)
- engine=ndb
- partition by range (c)
- partitions 3
- ( partition p1 values less than (200),
- partition p2 values less than (300),
- partition p3 values less than (400));
-
---disable_query_log
-sleep 1;
-
-# length 61
-set @s0 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau';
-set @s1 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz';
-set @s2 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah';
-
-set @v1 = repeat(@s0, 100); -- 1d42dd9090cf78314a06665d4ea938c35cc760f4
-set @v2 = repeat(@s1, 200); -- 10d3c783026b310218d10b7188da96a2401648c6
-set @v3 = repeat(@s2, 300); -- a33549d9844092289a58ac348dd59f09fc28406a
-set @v4 = repeat(@s0, 400); -- daa61c6de36a0526f0d47dc29d6b9de7e6d2630c
-set @v5 = repeat(@s1, 500); -- 70fc9a7d08beebc522258bfb02000a30c77a8f1d
-set @v6 = repeat(@s2, 600); -- 090565c580809efed3d369481a4bbb168b20713e
-set @v7 = repeat(@s0, 700); -- 1e0070bec426871a46291de27b9bd6e4255ab4e5
-set @v8 = repeat(@s1, 800); -- acbaba01bc2e682f015f40e79d9cbe475db3002e
-set @v9 = repeat(@s2, 900); -- 9ee30d99162574f79c66ae95cdf132dcf9cbc259
---enable_query_log
-
-# -- insert --
-insert into t1 values (1, @v1, 101, @v2);
-insert into t1 values (1, @v2, 102, @v3);
-insert into t1 values (1, @v3, 103, @v4);
-insert into t1 values (2, @v4, 201, @v5);
-insert into t1 values (2, @v5, 202, @v6);
-insert into t1 values (2, @v6, 203, @v7);
-insert into t1 values (3, @v7, 301, @v8);
-insert into t1 values (3, @v8, 302, @v9);
-insert into t1 values (3, @v9, 303, @v1);
-select a, sha1(b), c, sha1(d) from t1 order by a;
-
-# -- pk read --
-select a, sha1(b), c, sha1(d) from t1 where a = 1 and c = 101;
-select a, sha1(b), c, sha1(d) from t1 where a = 2 and c = 201;
-select a, sha1(b), c, sha1(d) from t1 where a = 3 and c = 301;
-
-# -- pk update --
-update t1 set b = @v3, d = @v4 where a = 1 and c = 102;
-update t1 set b = @v6, d = @v7 where a = 2 and c = 202;
-update t1 set b = @v9, d = @v1 where a = 3 and c = 302;
-select a, sha1(b), c, sha1(d) from t1 order by a;
-
-# -- hash index update --
-update t1 set b = @v4, d = @v5 where c = 103;
-update t1 set b = @v7, d = @v8 where c = 203;
-update t1 set b = @v1, d = @v2 where c = 303;
-select a, sha1(b), c, sha1(d) from t1 order by a;
-
-# -- full scan update --
-update t1 set b = @v5, d = @v6;
-select a, sha1(b), c, sha1(d) from t1 order by a;
-
-# -- range scan update
-update t1 set b = @v1, d = @v2 where 100 < c and c < 200;
-update t1 set b = @v4, d = @v5 where 200 < c and c < 300;
-update t1 set b = @v7, d = @v8 where 300 < c and c < 400;
-select a, sha1(b), c, sha1(d) from t1 order by a;
-
-# -- delete --
-delete from t1 where a = 1 and c = 101;
-delete from t1 where c = 102;
-# delete from t1 where c < 300; # XXX coredump
-delete from t1;
-select a, sha1(b), c, sha1(d) from t1 order by a;
-
-# -- clean up --
-drop table t1;
diff --git a/mysql-test/suite/parts/t/ndb_dd_backuprestore.test b/mysql-test/suite/parts/t/ndb_dd_backuprestore.test
index be6d73e27b4..d2f79028c3f 100644
--- a/mysql-test/suite/parts/t/ndb_dd_backuprestore.test
+++ b/mysql-test/suite/parts/t/ndb_dd_backuprestore.test
@@ -5,6 +5,10 @@
########################################
-- source include/have_ndb.inc
+# range, list and hash partitioning in ndb requires new_mode
+--disable_query_log
+set new=on;
+--enable_query_log
--disable_warnings
DROP TABLE IF EXISTS test.t1;
diff --git a/mysql-test/suite/parts/t/ndb_partition_error.test b/mysql-test/suite/parts/t/ndb_partition_error.test
deleted file mode 100644
index 06581f1270f..00000000000
--- a/mysql-test/suite/parts/t/ndb_partition_error.test
+++ /dev/null
@@ -1,71 +0,0 @@
--- source include/have_ndb.inc
-#--disable_abort_on_error
-#
-# Simple test for the partition storage engine
-# Focuses on range partitioning tests
-#
-#-- source include/have_partition.inc
-
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-#
-# Partition by range, generate node group error
-#
---error 1005
-CREATE TABLE t1 (
-a int not null,
-b int not null,
-c int not null,
-primary key(a,b),
-index (a))
-engine = ndb
-partition by range (a)
-partitions 3
-(partition x1 values less than (5) nodegroup 12,
- partition x2 values less than (10) nodegroup 13,
- partition x3 values less than (20) nodegroup 14);
-show warnings;
-
-#
-# Partition by range, create normal valid table
-#
-CREATE TABLE t1 (
-a int not null,
-b int not null,
-c int not null,
-primary key(a))
-engine = ndb
-partition by range (a)
-partitions 3
-(partition x1 values less than (5),
- partition x2 values less than (10),
- partition x3 values less than (20));
-
-drop table t1;
-
-#
-# Bug #17763 mysqld cores with list partitioning if update to missing partition
-#
-CREATE TABLE t1 (id INT) ENGINE=NDB
- PARTITION BY LIST(id)
- (PARTITION p0 VALUES IN (2, 4),
- PARTITION p1 VALUES IN (42, 142));
-INSERT INTO t1 VALUES (2);
---error ER_NO_PARTITION_FOR_GIVEN_VALUE
-UPDATE t1 SET id=5 WHERE id=2;
-DROP TABLE t1;
-
-#
-# NULL for LIST partition
-#
-create table t1 (a int,b int, c int)
-engine = ndb
-partition by list(a)
-partitions 2
-(partition x123 values in (11, 12),
- partition x234 values in (5, 1));
---error ER_NO_PARTITION_FOR_GIVEN_VALUE
-insert into t1 values (NULL,1,1);
-drop table t1;
diff --git a/mysql-test/suite/parts/t/ndb_partition_key.test b/mysql-test/suite/parts/t/ndb_partition_key.test
deleted file mode 100644
index 36a8a1863aa..00000000000
--- a/mysql-test/suite/parts/t/ndb_partition_key.test
+++ /dev/null
@@ -1,208 +0,0 @@
--- source include/have_ndb.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-#
-# Basic syntax test
-#
-
-# Support for partition key verified
-CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b,c))
- ENGINE = NDB
- PARTITION BY KEY (a,b);
-
-insert into t1 values (1,1,1,1);
-select * from t1;
-update t1 set d = 2 where a = 1 and b = 1 and c = 1;
-select * from t1;
-delete from t1;
-select * from t1;
-
-drop table t1;
-
-# only support for partition key on primary key
---error ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF
-CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b))
- ENGINE = NDB
- PARTITION BY KEY (c);
-
-CREATE TABLE t1 (a int, b int, c int, PRIMARY KEY(a,b))
- ENGINE = NDB
- PARTITION BY KEY (a);
-
-insert into t1 values
- (1,1,3),(1,2,3),(1,3,3),(1,4,3),(1,5,3),(1,6,3),
- (1,7,3),(1,8,3),(1,9,3),(1,10,3),(1,11,3),(1,12,3);
-
-select * from t1 order by b;
-
-DROP TABLE t1;
-
-#
-# Test partition and char support
-#
-
-CREATE TABLE t1 (a INT, b CHAR(10) COLLATE latin1_bin, c INT, d INT,
- PRIMARY KEY (a,b,c) USING HASH)
- ENGINE=NDB
- DEFAULT CHARSET=latin1
- PARTITION BY KEY (b);
-
-insert into t1 values (1,"a",1,1),(2,"a",1,1),(3,"a",1,1);
-
-# should show only one attribute with DISTRIBUTION KEY
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | sed 's/Version: [0-9]*//' | sed 's/\(Length of frm data: \)[0-9]*/\1#/'
-
-#
-# Test that explicit partition info is not shown in show create table
-# result should not contain (PARTITION P0 ... etc) since this is what shows up in
-# mysqldump, and we don't want that info there
-#
-show create table t1;
-
-DROP TABLE t1;
-
-#
-# Bug #13155: Problem in Create Table using SHOW CREATE TABLE syntax
-#
-CREATE TABLE t1 (a int not null primary key)
-PARTITION BY KEY(a)
-(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB);
-
-drop table t1;
-
-CREATE TABLE t1 (a int not null primary key);
-ALTER TABLE t1
-ENGINE = NDB
-PARTITION BY KEY(a)
-(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB);
-
-drop table t1;
-
-CREATE TABLE t1 (a int not null primary key) ENGINE = NDB;
-ALTER TABLE t1
-PARTITION BY KEY(a)
-(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB);
-
-drop table t1;
-
-#
-# Bug #17754 Improper handling of removal of partitioning in ALTER TABLE
-# Also added a number of general test cases in the same area
-#
-create table t1 (a int)
-engine=ndb
-partition by key(a)
-(partition p0, partition p1);
-show create table t1;
-
-alter table t1 engine=heap;
-show create table t1;
-
-alter table t1 engine=ndb;
-show create table t1;
-
-alter table t1 engine=heap remove partitioning;
-show create table t1;
-
-alter table t1 engine=ndb
-partition by key(a)
-(partition p0, partition p1 engine = ndb);
-show create table t1;
-
-alter table t1
-partition by key (a)
-(partition p0 engine=ndb, partition p1 engine=ndb);
-show create table t1;
-
-alter table t1 remove partitioning;
-show create table t1;
-
-#--error ER_MIX_HANDLER_ERROR
-# after fixing bug#31931 this works
-# since it already have ndb on table level
-alter table t1
-partition by key(a)
-(partition p0 engine=ndb, partition p1);
-
-alter table t1
-engine=ndb
-partition by key(a)
-(partition p0 engine=ndb, partition p1 engine = ndb);
-show create table t1;
-
-drop table t1;
-
-#
-# BUG 16810 Out of memory when coalesce partition
-#
-CREATE TABLE t1 (
- c1 MEDIUMINT NOT NULL AUTO_INCREMENT,
- c2 TEXT NOT NULL,
- c3 INT NOT NULL,
- c4 BIT NOT NULL,
- c5 FLOAT,
- c6 VARCHAR(255),
- c7 TIMESTAMP,
- PRIMARY KEY(c1,c3))
- ENGINE=NDB
- PARTITION BY KEY(c3) PARTITIONS 5;
-
-let $j= 11;
---disable_query_log
-while ($j)
-{
- eval INSERT INTO t1 VALUES (NULL, "Tested Remotely from Texas, USA", $j,
-b'0',
- $j.00,"By JBM $j","2006-01-26");
- dec $j;
-}
---enable_query_log
-ALTER TABLE t1 COALESCE PARTITION 4;
-
-DROP TABLE t1;
-
-#
-# Bug 16822: OPTIMIZE TABLE hangs test
-#
-CREATE TABLE t1 (a int primary key)
-ENGINE=NDB
-PARTITION BY KEY(a);
---error 1031
-ALTER TABLE t1 OPTIMIZE PARTITION p0;
---error 1031
-ALTER TABLE t1 CHECK PARTITION p0;
---error 1031
-ALTER TABLE t1 REPAIR PARTITION p0;
---error 1031
-ALTER TABLE t1 ANALYZE PARTITION p0;
---error 1031
-ALTER TABLE t1 REBUILD PARTITION p0;
-DROP TABLE t1;
-
-#
-# BUG 16806: ALTER TABLE fails
-#
-CREATE TABLE t1 (
- c1 MEDIUMINT NOT NULL AUTO_INCREMENT,
- c2 TEXT NOT NULL,
- c3 INT NOT NULL,
- PRIMARY KEY(c1,c3))
- ENGINE=NDB
- PARTITION BY KEY(c3) PARTITIONS 5;
-
-ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1;
-DROP TABLE t1;
-
-CREATE TABLE t1 (
- c1 MEDIUMINT NOT NULL AUTO_INCREMENT,
- c2 TEXT NOT NULL,
- c3 INT NOT NULL,
- PRIMARY KEY(c1,c3))
- ENGINE=NDB
- PARTITION BY KEY(c3);
-
-ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1;
-DROP TABLE t1;
diff --git a/mysql-test/suite/parts/t/ndb_partition_list.test b/mysql-test/suite/parts/t/ndb_partition_list.test
deleted file mode 100644
index 2ad37b8768c..00000000000
--- a/mysql-test/suite/parts/t/ndb_partition_list.test
+++ /dev/null
@@ -1,64 +0,0 @@
---source include/have_ndb.inc
-#
-# Simple test for the partition storage engine
-# Focuses on range partitioning tests
-#
-#-- source include/have_partition.inc
-
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-#
-# Partition by list, basic
-#
-
-CREATE TABLE t1 ( f_int1 INTEGER NOT NULL, f_int2 INTEGER NOT NULL,
- f_char1 CHAR(10),
- f_char2 CHAR(10), f_charbig VARCHAR(1000),
-PRIMARY KEY (f_int1,f_int2))
-ENGINE = NDB
-PARTITION BY LIST(MOD(f_int1 + f_int2,4))
-(PARTITION part_3 VALUES IN (-3),
- PARTITION part_2 VALUES IN (-2),
- PARTITION part_1 VALUES IN (-1),
- PARTITION part0 VALUES IN (0),
- PARTITION part1 VALUES IN (1),
- PARTITION part2 VALUES IN (2),
- PARTITION part3 VALUES IN (3,4,5));
-
-INSERT INTO t1 SET f_int1 = -2, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20===';
-INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
-INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
-INSERT INTO t1 SET f_int1 = 3, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
-INSERT INTO t1 SET f_int1 = 4, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
-INSERT INTO t1 SET f_int1 = 5, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
-INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
-
-SELECT * FROM t1 ORDER BY f_int1;
-
-DROP TABLE t1;
-
-#
-# Partition by list, no pk
-#
-
-CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, f_char1 CHAR(10),
- f_char2 CHAR(10), f_charbig VARCHAR(1000))
-ENGINE = NDB
-PARTITION BY LIST(f_int1)
-(PARTITION part_1 VALUES IN (-1),
- PARTITION part0 VALUES IN (0,1),
- PARTITION part1 VALUES IN (2));
-
-INSERT INTO t1 SET f_int1 = -1, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20===';
-INSERT INTO t1 SET f_int1 = 0, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20===';
-INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
-INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
---error ER_NO_PARTITION_FOR_GIVEN_VALUE
-INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
-
-SELECT * FROM t1 ORDER BY f_int1;
-
-DROP TABLE t1;
-
diff --git a/mysql-test/suite/parts/t/ndb_partition_range.test b/mysql-test/suite/parts/t/ndb_partition_range.test
deleted file mode 100644
index 981467d4055..00000000000
--- a/mysql-test/suite/parts/t/ndb_partition_range.test
+++ /dev/null
@@ -1,260 +0,0 @@
--- source include/have_ndb.inc
-#--disable_abort_on_error
-#
-# Simple test for the partition storage engine
-# Focuses on range partitioning tests
-#
-#-- source include/have_partition.inc
-
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-#
-# Partition by range, basic
-#
-CREATE TABLE t1 (
-a int not null,
-b int not null,
-c int not null,
-primary key(a,b),
-index (a))
-engine = ndb
-partition by range (a)
-partitions 3
-(partition x1 values less than (5),
- partition x2 values less than (10),
- partition x3 values less than (20));
-
-# Simple insert and verify test
-INSERT into t1 values (1, 1, 1);
-INSERT into t1 values (6, 1, 1);
-INSERT into t1 values (10, 1, 1);
-INSERT into t1 values (15, 1, 1);
-
---replace_column 16 # 19 # 20 #
-select * from information_schema.partitions where table_name= 't1';
-
-select * from t1 order by a;
-
-select * from t1 where a=1 order by a;
-select * from t1 where a=15 and b=1 order by a;
-select * from t1 where a=21 and b=1 order by a;
-select * from t1 where a=21 order by a;
-select * from t1 where a in (1,6,10,21) order by a;
-select * from t1 where b=1 and a in (1,6,10,21) order by a;
-
-drop table t1;
-
-#
-# Partition by range, basic
-#
-CREATE TABLE t1 (
-a int not null,
-b int not null,
-c int not null,
-primary key(b),
-unique (a))
-engine = ndb
-partition by range (b)
-partitions 3
-(partition x1 values less than (5),
- partition x2 values less than (10),
- partition x3 values less than (20));
-
-# Simple insert and verify test
-INSERT into t1 values (1, 1, 1);
-INSERT into t1 values (2, 6, 1);
-INSERT into t1 values (3, 10, 1);
-INSERT into t1 values (4, 15, 1);
-
-select * from t1 order by a;
-UPDATE t1 set a = 5 WHERE b = 15;
-select * from t1 order by a;
-UPDATE t1 set a = 6 WHERE a = 5;
-select * from t1 order by a;
-
-select * from t1 where b=1 order by b;
-select * from t1 where b=15 and a=1 order by b;
-select * from t1 where b=21 and a=1 order by b;
-select * from t1 where b=21 order by b;
-select * from t1 where b in (1,6,10,21) order by b;
-select * from t1 where a in (1,2,5,6) order by b;
-select * from t1 where a=1 and b in (1,6,10,21) order by b;
-
-DELETE from t1 WHERE b = 6;
-DELETE from t1 WHERE a = 6;
-
-#
-# Test that explicit partition info _is_ shown in show create table
-# result _should_ contain (PARTITION x1 ... etc)
-#
-show create table t1;
-
-drop table t1;
-
-#
-# Bug #17499, #17687
-# Alter partitioned NDB table causes mysqld to core
-#
-
-CREATE TABLE t1
- (id MEDIUMINT NOT NULL,
- b1 BIT(8),
- vc VARCHAR(255),
- bc CHAR(255),
- d DECIMAL(10,4) DEFAULT 0,
- f FLOAT DEFAULT 0,
- total BIGINT UNSIGNED,
- y YEAR,
- t DATE) ENGINE=NDB
- PARTITION BY RANGE (YEAR(t))
- (PARTITION p0 VALUES LESS THAN (1901),
- PARTITION p1 VALUES LESS THAN (1946),
- PARTITION p2 VALUES LESS THAN (1966),
- PARTITION p3 VALUES LESS THAN (1986),
- PARTITION p4 VALUES LESS THAN (2005),
- PARTITION p5 VALUES LESS THAN MAXVALUE);
-
-INSERT INTO t1 VALUES (0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-SELECT * FROM t1;
-ALTER TABLE t1 ENGINE=MYISAM;
-SELECT * FROM t1;
-DROP TABLE t1;
-
-CREATE LOGFILE GROUP lg1
- ADD UNDOFILE 'undofile.dat'
- INITIAL_SIZE 16M
- UNDO_BUFFER_SIZE=1M
- ENGINE=NDB;
-
-CREATE TABLESPACE ts1
- ADD DATAFILE 'datafile.dat'
- USE LOGFILE GROUP lg1
- INITIAL_SIZE 12M
- ENGINE NDB;
-
-CREATE TABLE test.t1 (
- a1 INT,
- a2 TEXT NOT NULL,
- a3 BIT NOT NULL,
- a4 DECIMAL(8,3),
- a5 INT NOT NULL,
- a6 INT,
- PRIMARY KEY(a1))
- TABLESPACE ts1 STORAGE DISK ENGINE=NDB
- PARTITION BY LIST (a1)
- (PARTITION p0 VALUES IN (1,2,3,4,5),
- PARTITION p1 VALUES IN (6,7,8,9, 10),
- PARTITION p2 VALUES IN (11, 12, 13, 14, 15));
-
-# Alter table directly without any statements inbetween
-ALTER TABLE test.t1 DROP COLUMN a6;
-ALTER TABLE test.t1 ADD COLUMN a6 VARCHAR(255);
-
-let $j= 15;
---disable_query_log
-while ($j)
-{
-eval INSERT INTO test.t1 VALUES ($j, "Tested Remotely from Texas, USA",
-b'1',$j.00,$j+1,"By NIK $j");
-dec $j;
-}
---enable_query_log
-SELECT COUNT(*) FROM test.t1;
-
-ALTER TABLE test.t1 DROP COLUMN a4;
-SELECT COUNT(*) FROM test.t1;
-
-DROP TABLE t1;
-
-CREATE TABLE test.t1 (
- a1 INT,
- a2 TEXT NOT NULL,
- a3 BIT NOT NULL,
- a4 DECIMAL(8,3),
- a5 INT NOT NULL,
- a6 VARCHAR(255),
- PRIMARY KEY(a1))
- TABLESPACE ts1 STORAGE DISK ENGINE=NDB
- PARTITION BY HASH(a1)
- PARTITIONS 4;
-
-let $j= 15;
---disable_query_log
-while ($j)
-{
-eval INSERT INTO test.t1 VALUES ($j, "Tested Remotely from Texas, USA",
-b'1',$j.00,$j+1,"By NIK $j");
-dec $j;
-}
---enable_query_log
-SELECT COUNT(*) FROM test.t1;
-
-ALTER TABLE test.t1 DROP COLUMN a4;
-SELECT COUNT(*) FROM test.t1;
-
-DROP TABLE t1;
-
-ALTER TABLESPACE ts1
- DROP DATAFILE 'datafile.dat'
- ENGINE=NDB;
-DROP TABLESPACE ts1 ENGINE=NDB;
-DROP LOGFILE GROUP lg1 ENGINE=NDB;
-
-
-#
-# Bug #17701 ALTER TABLE t1 ADD PARTITION for PARTITION BY LIST hangs test
-#
-
-CREATE TABLE t1
- (id MEDIUMINT NOT NULL,
- b1 BIT(8),
- vc VARCHAR(255),
- bc CHAR(255),
- d DECIMAL(10,4) DEFAULT 0,
- f FLOAT DEFAULT 0,
- total BIGINT UNSIGNED,
- y YEAR,
- t DATE) ENGINE=NDB
- PARTITION BY LIST(id)
- (PARTITION p0 VALUES IN (2, 4),
- PARTITION p1 VALUES IN (42, 142));
-
-INSERT INTO t1 VALUES (2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-SELECT * FROM t1;
-ALTER TABLE t1 ADD PARTITION
- (PARTITION p2 VALUES IN (412));
-SELECT * FROM t1;
-DROP TABLE t1;
-
-#
-# Bug #17806 Update on NDB table with list partition causes mysqld to core
-# Bug #16385 Partitions: crash when updating a range partitioned NDB table
-#
-CREATE TABLE t1 (
-a int not null,
-b int not null,
-c int not null)
-partition by list(a)
-partitions 2
-(partition x123 values in (1,5,6),
- partition x234 values in (4,7,8));
-INSERT into t1 VALUES (5,1,1);
-select * from t1;
-UPDATE t1 SET a=8 WHERE a=5 AND b=1;
-select * from t1;
-drop table t1;
-
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) engine=ndb
-PARTITION BY RANGE(f1)
-( PARTITION part1 VALUES LESS THAN (2),
-PARTITION part2 VALUES LESS THAN (1000));
-INSERT INTO t1 VALUES(1, '---1---');
-INSERT INTO t1 VALUES(2, '---2---');
-select * from t1 order by f1;
-UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 2;
-select * from t1 order by f1;
-UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 1;
-select * from t1 order by f1;
-drop table t1;
diff --git a/mysql-test/suite/parts/t/part_supported_sql_func_ndb.test b/mysql-test/suite/parts/t/part_supported_sql_func_ndb.test
index c21649ba396..5ac6b2a504f 100644
--- a/mysql-test/suite/parts/t/part_supported_sql_func_ndb.test
+++ b/mysql-test/suite/parts/t/part_supported_sql_func_ndb.test
@@ -1,5 +1,5 @@
################################################################################
-# t/part_supported_sql_funcs_myisam.test #
+# t/part_supported_sql_funcs_ndb.test #
# #
# Purpose: #
# Tests which SQL functions are allowed in partinioning clauses with #
@@ -33,6 +33,14 @@ let $do_long_tests= 1;
##### Storage engine to be tested
--source include/have_ndb.inc
let $engine= 'NDB';
+connection default;
+# range, list and hash partitioning in ndb requires new_mode
+--disable_query_log
+set new=on;
+--enable_query_log
+let $max_8_partitions= 1;
+let $no_reorg_partition= 1;
+let $drop_partition_not_supported= 1;
#------------------------------------------------------------------------------#
--source suite/parts/inc/part_supported_sql_funcs_main.inc
diff --git a/mysql-test/suite/parts/t/partition_alter1_1_2_ndb.test b/mysql-test/suite/parts/t/partition_alter1_1_2_ndb.test
index 29f801afb09..1a8f1f311b6 100644
--- a/mysql-test/suite/parts/t/partition_alter1_1_2_ndb.test
+++ b/mysql-test/suite/parts/t/partition_alter1_1_2_ndb.test
@@ -26,6 +26,7 @@
#------------------------------------------------------------------------------#
# General not engine specific settings and requirements
+--source include/big_test.inc
##### Options, for debugging support #####
let $debug= 0;
diff --git a/mysql-test/suite/parts/t/partition_alter1_1_ndb.test b/mysql-test/suite/parts/t/partition_alter1_1_ndb.test
index fa6f99f8efe..1a031f0ef79 100644
--- a/mysql-test/suite/parts/t/partition_alter1_1_ndb.test
+++ b/mysql-test/suite/parts/t/partition_alter1_1_ndb.test
@@ -26,6 +26,7 @@
#------------------------------------------------------------------------------#
# General not engine specific settings and requirements
+--source include/big_test.inc
##### Options, for debugging support #####
let $debug= 0;
diff --git a/mysql-test/suite/parts/t/partition_alter1_2_ndb.test b/mysql-test/suite/parts/t/partition_alter1_2_ndb.test
index f2e220cd5ab..497898fb089 100644
--- a/mysql-test/suite/parts/t/partition_alter1_2_ndb.test
+++ b/mysql-test/suite/parts/t/partition_alter1_2_ndb.test
@@ -27,6 +27,7 @@
#------------------------------------------------------------------------------#
# General not engine specific settings and requirements
+--source include/big_test.inc
##### Options, for debugging support #####
let $debug= 0;
diff --git a/mysql-test/suite/parts/t/partition_alter2_ndb.test b/mysql-test/suite/parts/t/partition_alter2_ndb.test
index e9b4da93b7a..fd1437ede71 100644
--- a/mysql-test/suite/parts/t/partition_alter2_ndb.test
+++ b/mysql-test/suite/parts/t/partition_alter2_ndb.test
@@ -50,7 +50,12 @@ let $more_pk_ui_tests= 0;
##### Storage engine to be tested
--source include/have_ndb.inc
let $engine= 'ndbcluster';
+connection default;
+# range, list and hash partitioning in ndb requires new_mode
+--disable_query_log
+set new=on;
+--enable_query_log
##### Execute the test of "table" files
# NDB has no files per PK, UI, ...
let $do_file_tests= 0;
diff --git a/mysql-test/suite/parts/t/partition_basic_ndb.test b/mysql-test/suite/parts/t/partition_basic_ndb.test
index 273d92ac80d..48e569006de 100644
--- a/mysql-test/suite/parts/t/partition_basic_ndb.test
+++ b/mysql-test/suite/parts/t/partition_basic_ndb.test
@@ -50,7 +50,12 @@ let $more_pk_ui_tests= 0;
##### Storage engine to be tested
--source include/have_ndb.inc
let $engine= 'ndbcluster';
+connection default;
+# range, list and hash partitioning in ndb requires new_mode
+--disable_query_log
+set new=on;
+--enable_query_log
##### Execute the test of "table" files
# NDB has no files per PK, UI, ...
let $do_file_tests= 0;
diff --git a/mysql-test/suite/parts/t/partition_bit_ndb.test b/mysql-test/suite/parts/t/partition_bit_ndb.test
index 94e4119031c..227d3d53401 100644
--- a/mysql-test/suite/parts/t/partition_bit_ndb.test
+++ b/mysql-test/suite/parts/t/partition_bit_ndb.test
@@ -1,9 +1,9 @@
################################################################################
-# t/partition_bit.test #
+# t/partition_bit_ndb.test #
# #
# Purpose: #
# Tests around bit type #
-# MyISAM branch #
+# NDB branch #
# #
#------------------------------------------------------------------------------#
# Original Author: HH #
@@ -45,7 +45,12 @@ SET @max_row = 20;
##### Storage engine to be tested
--source include/have_ndb.inc
let $engine= 'NDB';
+connection default;
+# range, list and hash partitioning in ndb requires new_mode
+--disable_query_log
+set new=on;
+--enable_query_log
##### Assign a big number smaller than the maximum value for partitions #####
# and smaller than the maximum value of SIGNED INTEGER
let $MAX_VALUE= (2147483646);
diff --git a/mysql-test/suite/parts/t/partition_engine_ndb.test b/mysql-test/suite/parts/t/partition_engine_ndb.test
index 1e185c8ebaa..40d031eab69 100644
--- a/mysql-test/suite/parts/t/partition_engine_ndb.test
+++ b/mysql-test/suite/parts/t/partition_engine_ndb.test
@@ -49,7 +49,12 @@ let $more_pk_ui_tests= 0;
##### Storage engine to be tested
let $engine= 'ndbcluster';
--source include/have_ndb.inc
+connection default;
+# range, list and hash partitioning in ndb requires new_mode
+--disable_query_log
+set new=on;
+--enable_query_log
##### Execute the test of "table" files
# NDB has no files per PK, UI, ...
let $do_file_tests= 0;
diff --git a/mysql-test/suite/parts/t/partition_int_ndb.test b/mysql-test/suite/parts/t/partition_int_ndb.test
index 0a60408292a..5e464ff75b5 100644
--- a/mysql-test/suite/parts/t/partition_int_ndb.test
+++ b/mysql-test/suite/parts/t/partition_int_ndb.test
@@ -1,9 +1,9 @@
################################################################################
-# t/partition_int_ndb.test #
+# t/partition_int_ndb.test #
# #
# Purpose: #
# Tests around integer type #
-# NDB branch #
+# NDB branch #
# #
#------------------------------------------------------------------------------#
# Original Author: HH #
@@ -37,7 +37,14 @@ let $debug= 0;
##### Storage engine to be tested
--source include/have_ndb.inc
let $engine= 'NDB';
+connection default;
+##### max rows to be inserted
+let $maxrows=1024;
+# range, list and hash partitioning in ndb requires new_mode
+--disable_query_log
+set new=on;
+--enable_query_log
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_tinyint.inc
diff --git a/mysql-test/suite/parts/t/partition_syntax_ndb.test b/mysql-test/suite/parts/t/partition_syntax_ndb.test
index 90b74452ab1..c783e9f602e 100644
--- a/mysql-test/suite/parts/t/partition_syntax_ndb.test
+++ b/mysql-test/suite/parts/t/partition_syntax_ndb.test
@@ -49,7 +49,12 @@ let $more_pk_ui_tests= 0;
##### Storage engine to be tested
--source include/have_ndb.inc
let $engine= 'ndbcluster';
+connection default;
+# range, list and hash partitioning in ndb requires new_mode
+--disable_query_log
+set new=on;
+--enable_query_log
##### Execute the test of "table" files
# NDB has no files per PK, UI, ...
let $do_file_tests= 0;
diff --git a/mysql-test/suite/parts/t/partition_value_ndb.test b/mysql-test/suite/parts/t/partition_value_ndb.test
index 91497c3ec42..2f948b95727 100644
--- a/mysql-test/suite/parts/t/partition_value_ndb.test
+++ b/mysql-test/suite/parts/t/partition_value_ndb.test
@@ -49,7 +49,12 @@ let $more_pk_ui_tests= 0;
##### Storage engine to be tested
--source include/have_ndb.inc
let $engine= 'ndbcluster';
+connection default;
+# range, list and hash partitioning in ndb requires new_mode
+--disable_query_log
+set new=on;
+--enable_query_log
##### Execute the test of "table" files
# NDB has no files per PK, UI, ...
let $do_file_tests= 0;
diff --git a/mysql-test/suite/parts/t/rpl_ndb_dd_partitions.test b/mysql-test/suite/parts/t/rpl_ndb_dd_partitions.test
deleted file mode 100644
index 9291f38e8db..00000000000
--- a/mysql-test/suite/parts/t/rpl_ndb_dd_partitions.test
+++ /dev/null
@@ -1,310 +0,0 @@
-#######################################
-# Author: JBM #
-# Date: 2006-03-09 #
-# Purpose: To test the replication of #
-# Cluster Disk Data using partitions #
-#######################################
-
---source include/have_ndb.inc
---source include/have_binlog_format_row.inc
---source include/master-slave.inc
-
---echo --- Doing pre test cleanup ---
-
-connection master;
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_query_log
-
-
-# Start by creating a logfile group
-##################################
-
-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 a tablespace connected to the logfile group
-###################################################
-
-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;
-
-#################################################################
-
---echo --- Start test 2 partition RANGE testing --
---echo --- Do setup --
-
-
-#################################################
-# Requirment: Create table that is partitioned #
-# by range on year i.e. year(t) and replicate #
-# basice operations such at insert, update #
-# delete between 2 different storage engines #
-# Alter table and ensure table is handled #
-# Correctly on the slave #
-#################################################
-
-CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63),
- bc CHAR(63), d DECIMAL(10,4) DEFAULT 0,
- f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
- y YEAR, t DATE)
- TABLESPACE ts1 STORAGE DISK
- ENGINE=NDB
- PARTITION BY RANGE (YEAR(t))
- (PARTITION p0 VALUES LESS THAN (1901),
- PARTITION p1 VALUES LESS THAN (1946),
- PARTITION p2 VALUES LESS THAN (1966),
- PARTITION p3 VALUES LESS THAN (1986),
- PARTITION p4 VALUES LESS THAN (2005),
- PARTITION p5 VALUES LESS THAN MAXVALUE);
-
---echo --- Show table on master ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Show table on slave --
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
-
---source include/rpl_multi_engine3.inc
-
---echo --- Check that simple Alter statements are replicated correctly ---
-
-ALTER TABLE t1 MODIFY vc VARCHAR(255);
-
---echo --- Show the new improved table on the master ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Make sure that our tables on slave are still same engine ---
---echo --- and that the alter statements replicated correctly ---
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
---enable_query_log
-
---source include/rpl_multi_engine3.inc
-
---echo --- End test 2 partition RANGE testing ---
---echo --- Do Cleanup ---
-
-DROP TABLE IF EXISTS t1;
-
-########################################################
-
---echo --- Start test 3 partition LIST testing ---
---echo --- Do setup ---
-#################################################
-
-
-CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63),
- bc CHAR(63), d DECIMAL(10,4) DEFAULT 0,
- f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
- y YEAR, t DATE)
- TABLESPACE ts1 STORAGE DISK
- ENGINE=NDB
- PARTITION BY LIST(id)
- (PARTITION p0 VALUES IN (2, 4),
- PARTITION p1 VALUES IN (42, 142));
-
---echo --- Test 3 Alter to add partition ---
-
-ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412));
-
---echo --- Show table on master ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Show table on slave ---
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
-
---source include/rpl_multi_engine3.inc
-
---echo --- Check that simple Alter statements are replicated correctly ---
-
-ALTER TABLE t1 MODIFY vc VARCHAR(255);
-
---echo --- Show the new improved table on the master ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Make sure that our tables on slave are still same engine ---
---echo --- and that the alter statements replicated correctly ---
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
-
---source include/rpl_multi_engine3.inc
-
---echo --- End test 3 partition LIST testing ---
---echo --- Do Cleanup --
-
-DROP TABLE IF EXISTS t1;
-
-########################################################
-
---echo --- Start test 4 partition HASH testing ---
---echo --- Do setup ---
-#################################################
-
-
-CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63),
- bc CHAR(63), d DECIMAL(10,4) DEFAULT 0,
- f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
- y YEAR, t DATE)
- TABLESPACE ts1 STORAGE DISK
- ENGINE=NDB
- PARTITION BY HASH( YEAR(t) )
- PARTITIONS 4;
-
---echo --- show that tables have been created correctly ---
-
-SHOW CREATE TABLE t1;
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
-
---source include/rpl_multi_engine3.inc
-
---echo --- Check that simple Alter statements are replicated correctly ---
-
-ALTER TABLE t1 MODIFY vc VARCHAR(255);
-
---echo --- Show the new improved table on the master ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Make sure that our tables on slave are still same engine ---
---echo --- and that the alter statements replicated correctly ---
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
-
---source include/rpl_multi_engine3.inc
-
---echo --- End test 4 partition HASH testing ---
---echo --- Do Cleanup --
-
-DROP TABLE IF EXISTS t1;
-
-########################################################
-
---echo --- Start test 5 partition by key testing ---
---echo --- Create Table Section ---
-
-#################################################
-
-CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63),
- bc CHAR(63), d DECIMAL(10,4) DEFAULT 0,
- f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
- y YEAR, t DATE,PRIMARY KEY(id))
- TABLESPACE ts1 STORAGE DISK
- ENGINE=NDB
- PARTITION BY KEY()
- PARTITIONS 4;
-
---echo --- Show that tables on master are ndbcluster tables ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Show that tables on slave ---
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
-
---source include/rpl_multi_engine3.inc
-
-# Okay lets see how it holds up to table changes
---echo --- Check that simple Alter statements are replicated correctly ---
-
-ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total);
-
---echo --- Show the new improved table on the master ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Make sure that our tables on slave are still right type ---
---echo --- and that the alter statements replicated correctly ---
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
-
---source include/rpl_multi_engine3.inc
-
---echo --- Check that simple Alter statements are replicated correctly ---
-
-ALTER TABLE t1 MODIFY vc VARCHAR(255);
-
---echo --- Show the new improved table on the master ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Make sure that our tables on slave are still same engine ---
---echo --- and that the alter statements replicated correctly ---
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
-
---source include/rpl_multi_engine3.inc
-
---echo --- End test 5 key partition testing ---
---echo --- Do Cleanup ---
-
-DROP TABLE IF EXISTS t1;
-alter tablespace ts1
-drop datafile 'datafile.dat'
-engine=ndb;
-alter tablespace ts1
-drop datafile 'datafile02.dat'
-engine=ndb;
-DROP TABLESPACE ts1 ENGINE=NDB;
-DROP LOGFILE GROUP lg1 ENGINE=NDB;
---sync_slave_with_master
-
-# End of 5.1 test case