#At file:///home/jonas/src/telco-6.2/ based on
revid:jonas@stripped
2925 Jonas Oreland 2009-05-15
ndb - bug#40709
Update a surprisingly large no of testcases that due to missing check in
ha_ndbcluster run code which is not handled by ndb (and not supported)
M mysql-test/extra/rpl_tests/rpl_ndb_2multi_eng.test
M mysql-test/suite/ndb/r/ndb_partition_error.result
M mysql-test/suite/ndb/r/ndb_partition_key.result
M mysql-test/suite/ndb/r/ndb_partition_list.result
M mysql-test/suite/ndb/r/ndb_partition_range.result
M mysql-test/suite/ndb/t/ndb_partition_error.test
M mysql-test/suite/ndb/t/ndb_partition_key.test
M mysql-test/suite/ndb/t/ndb_partition_list.test
M mysql-test/suite/ndb/t/ndb_partition_range.test
M mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result
M mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result
M mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result
M mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result
M mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result
M mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test
=== modified file 'mysql-test/extra/rpl_tests/rpl_ndb_2multi_eng.test'
--- a/mysql-test/extra/rpl_tests/rpl_ndb_2multi_eng.test 2008-02-11 14:14:24 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_ndb_2multi_eng.test 2009-05-15 14:00:51 +0000
@@ -92,7 +92,7 @@ DROP TABLE IF EXISTS t1;
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)
+ y YEAR, t DATE, primary key(t))
PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901),
PARTITION p1 VALUES LESS THAN (1946),
@@ -117,7 +117,7 @@ SHOW CREATE TABLE t1;
--echo --- Check that simple Alter statements are replicated correctly ---
-ALTER TABLE t1 ADD PRIMARY KEY(t,id);
+ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(t, id);
ALTER TABLE t1 MODIFY vc TEXT;
--echo --- Show the new improved table on the master ---
@@ -159,7 +159,7 @@ DROP TABLE IF EXISTS t1;
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)
+ y YEAR, t DATE, primary key(id))
PARTITION BY LIST(id)
(PARTITION p0 VALUES IN (2, 4),
PARTITION p1 VALUES IN (42, 142));
@@ -184,7 +184,6 @@ SHOW CREATE TABLE t1;
--echo --- Check that simple Alter statements are replicated correctly ---
-ALTER TABLE t1 ADD PRIMARY KEY(id);
ALTER TABLE t1 MODIFY vc TEXT;
--echo --- Show the new improved table on the master ---
@@ -224,7 +223,7 @@ DROP TABLE IF EXISTS t1;
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)
+ y YEAR, t DATE, primary key(t))
PARTITION BY HASH( YEAR(t) )
PARTITIONS 4;
@@ -241,7 +240,7 @@ SHOW CREATE TABLE t1;
--echo --- Check that simple Alter statements are replicated correctly ---
-ALTER TABLE t1 ADD PRIMARY KEY(t,id);
+ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(t,id);
ALTER TABLE t1 MODIFY vc TEXT;
--echo --- Show the new improved table on the master ---
=== modified file 'mysql-test/suite/ndb/r/ndb_partition_error.result'
--- a/mysql-test/suite/ndb/r/ndb_partition_error.result 2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/ndb/r/ndb_partition_error.result 2009-05-15 14:00:51 +0000
@@ -28,7 +28,7 @@ partitions 3
partition x2 values less than (10),
partition x3 values less than (20));
drop table t1;
-CREATE TABLE t1 (id INT) ENGINE=NDB
+CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=NDB
PARTITION BY LIST(id)
(PARTITION p0 VALUES IN (2, 4),
PARTITION p1 VALUES IN (42, 142));
@@ -36,12 +36,12 @@ INSERT INTO t1 VALUES (2);
UPDATE t1 SET id=5 WHERE id=2;
ERROR HY000: Table has no partition for value 5
DROP TABLE t1;
-create table t1 (a int,b int, c int)
+create table t1 (a int,b int, c int, primary key(a))
engine = ndb
partition by list(a)
partitions 2
(partition x123 values in (11, 12),
partition x234 values in (5, 1));
insert into t1 values (NULL,1,1);
-ERROR HY000: Table has no partition for value NULL
+Got one of the listed errors
drop table t1;
=== modified file 'mysql-test/suite/ndb/r/ndb_partition_key.result'
--- a/mysql-test/suite/ndb/r/ndb_partition_key.result 2009-01-08 10:52:44 +0000
+++ b/mysql-test/suite/ndb/r/ndb_partition_key.result 2009-05-15 14:00:51 +0000
@@ -115,14 +115,15 @@ ALTER TABLE t1
PARTITION BY KEY(a)
(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB);
drop table t1;
-create table t1 (a int)
+create table t1 (a int primary key)
engine=ndb
partition by key(a)
(partition p0, partition p1);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL
+ `a` int(11) NOT NULL,
+ PRIMARY KEY (`a`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a)
(PARTITION p0 ENGINE = ndbcluster,
@@ -131,7 +132,8 @@ alter table t1 engine=heap;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL
+ `a` int(11) NOT NULL,
+ PRIMARY KEY (`a`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a)
(PARTITION p0 ENGINE = MEMORY,
@@ -140,7 +142,8 @@ alter table t1 engine=ndb;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL
+ `a` int(11) NOT NULL,
+ PRIMARY KEY (`a`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a)
(PARTITION p0 ENGINE = ndbcluster,
@@ -149,7 +152,8 @@ alter table t1 engine=heap remove partit
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL
+ `a` int(11) NOT NULL,
+ PRIMARY KEY (`a`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1
alter table t1 engine=ndb
partition by key(a)
@@ -157,7 +161,8 @@ partition by key(a)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL
+ `a` int(11) NOT NULL,
+ PRIMARY KEY (`a`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a)
(PARTITION p0 ENGINE = ndbcluster,
@@ -168,7 +173,8 @@ partition by key (a)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL
+ `a` int(11) NOT NULL,
+ PRIMARY KEY (`a`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a)
(PARTITION p0 ENGINE = ndbcluster,
@@ -177,7 +183,8 @@ alter table t1 remove partitioning;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL
+ `a` int(11) NOT NULL,
+ PRIMARY KEY (`a`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
alter table t1
partition by key(a)
@@ -189,7 +196,8 @@ partition by key(a)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL
+ `a` int(11) NOT NULL,
+ PRIMARY KEY (`a`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a)
(PARTITION p0 ENGINE = ndbcluster,
=== modified file 'mysql-test/suite/ndb/r/ndb_partition_list.result'
--- a/mysql-test/suite/ndb/r/ndb_partition_list.result 2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/ndb/r/ndb_partition_list.result 2009-05-15 14:00:51 +0000
@@ -29,23 +29,3 @@ f_int1 f_int2 f_char1 f_char2 f_charbig
5 1 1 1 ===1===
20 1 1 1 ===1===
DROP TABLE t1;
-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===';
-INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig =
'===1===';
-ERROR HY000: Table has no partition for value 20
-SELECT * FROM t1 ORDER BY f_int1;
-f_int1 f_int2 f_char1 f_char2 f_charbig
--1 20 20 20 ===20===
-0 20 20 20 ===20===
-1 1 1 1 ===1===
-2 1 1 1 ===1===
-DROP TABLE t1;
=== modified file 'mysql-test/suite/ndb/r/ndb_partition_range.result'
--- a/mysql-test/suite/ndb/r/ndb_partition_range.result 2008-11-04 07:43:21 +0000
+++ b/mysql-test/suite/ndb/r/ndb_partition_range.result 2009-05-15 14:00:51 +0000
@@ -138,7 +138,7 @@ d DECIMAL(10,4) DEFAULT 0,
f FLOAT DEFAULT 0,
total BIGINT UNSIGNED,
y YEAR,
-t DATE) ENGINE=NDB
+t DATE PRIMARY KEY) ENGINE=NDB
PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901),
PARTITION p1 VALUES LESS THAN (1946),
@@ -146,14 +146,14 @@ 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);
+INSERT INTO t1 VALUES (0,NULL,NULL,NULL,NULL,NULL,NULL,NULL, '2009-05-15');
SELECT * FROM t1;
id b1 vc bc d f total y t
-0 NULL NULL NULL NULL NULL NULL NULL NULL
+0 NULL NULL NULL NULL NULL NULL NULL 2009-05-15
ALTER TABLE t1 ENGINE=MYISAM;
SELECT * FROM t1;
id b1 vc bc d f total y t
-0 NULL NULL NULL NULL NULL NULL NULL NULL
+0 NULL NULL NULL NULL NULL NULL NULL 2009-05-15
DROP TABLE t1;
CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat'
@@ -213,7 +213,7 @@ ENGINE=NDB;
DROP TABLESPACE ts1 ENGINE=NDB;
DROP LOGFILE GROUP lg1 ENGINE=NDB;
CREATE TABLE t1
-(id MEDIUMINT NOT NULL,
+(id MEDIUMINT NOT NULL PRIMARY KEY,
b1 BIT(8),
vc VARCHAR(255),
bc CHAR(255),
@@ -236,7 +236,7 @@ id b1 vc bc d f total y t
2 NULL NULL NULL NULL NULL NULL NULL NULL
DROP TABLE t1;
CREATE TABLE t1 (
-a int not null,
+a int not null PRIMARY KEY,
b int not null,
c int not null)
partition by list(a)
@@ -252,7 +252,7 @@ select * from t1;
a b c
8 1 1
drop table t1;
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) engine=ndb
+CREATE TABLE t1 ( f1 INTEGER PRIMARY KEY, f2 char(20)) engine=ndb
PARTITION BY RANGE(f1)
( PARTITION part1 VALUES LESS THAN (2),
PARTITION part2 VALUES LESS THAN (1000));
=== modified file 'mysql-test/suite/ndb/t/ndb_partition_error.test'
--- a/mysql-test/suite/ndb/t/ndb_partition_error.test 2007-07-04 20:38:53 +0000
+++ b/mysql-test/suite/ndb/t/ndb_partition_error.test 2009-05-15 14:00:51 +0000
@@ -51,7 +51,7 @@ drop table t1;
#
# Bug #17763 mysqld cores with list partitioning if update to missing partition
#
-CREATE TABLE t1 (id INT) ENGINE=NDB
+CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=NDB
PARTITION BY LIST(id)
(PARTITION p0 VALUES IN (2, 4),
PARTITION p1 VALUES IN (42, 142));
@@ -63,12 +63,12 @@ DROP TABLE t1;
#
# NULL for LIST partition
#
-create table t1 (a int,b int, c int)
+create table t1 (a int,b int, c int, primary key(a))
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
+--error ER_BAD_NULL_ERROR,ER_NO_PARTITION_FOR_GIVEN_VALUE
insert into t1 values (NULL,1,1);
drop table t1;
=== modified file 'mysql-test/suite/ndb/t/ndb_partition_key.test'
--- a/mysql-test/suite/ndb/t/ndb_partition_key.test 2008-08-11 18:02:03 +0000
+++ b/mysql-test/suite/ndb/t/ndb_partition_key.test 2009-05-15 14:00:51 +0000
@@ -96,7 +96,7 @@ 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)
+create table t1 (a int primary key)
engine=ndb
partition by key(a)
(partition p0, partition p1);
=== modified file 'mysql-test/suite/ndb/t/ndb_partition_list.test'
--- a/mysql-test/suite/ndb/t/ndb_partition_list.test 2007-07-04 20:38:53 +0000
+++ b/mysql-test/suite/ndb/t/ndb_partition_list.test 2009-05-15 14:00:51 +0000
@@ -43,26 +43,3 @@ 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;
-
=== modified file 'mysql-test/suite/ndb/t/ndb_partition_range.test'
--- a/mysql-test/suite/ndb/t/ndb_partition_range.test 2007-12-18 12:40:35 +0000
+++ b/mysql-test/suite/ndb/t/ndb_partition_range.test 2009-05-15 14:00:51 +0000
@@ -116,7 +116,7 @@ CREATE TABLE t1
f FLOAT DEFAULT 0,
total BIGINT UNSIGNED,
y YEAR,
- t DATE) ENGINE=NDB
+ t DATE PRIMARY KEY) ENGINE=NDB
PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901),
PARTITION p1 VALUES LESS THAN (1946),
@@ -125,7 +125,7 @@ CREATE TABLE t1
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);
+INSERT INTO t1 VALUES (0,NULL,NULL,NULL,NULL,NULL,NULL,NULL, '2009-05-15');
SELECT * FROM t1;
ALTER TABLE t1 ENGINE=MYISAM;
SELECT * FROM t1;
@@ -217,7 +217,7 @@ DROP LOGFILE GROUP lg1 ENGINE=NDB;
#
CREATE TABLE t1
- (id MEDIUMINT NOT NULL,
+ (id MEDIUMINT NOT NULL PRIMARY KEY,
b1 BIT(8),
vc VARCHAR(255),
bc CHAR(255),
@@ -242,7 +242,7 @@ DROP TABLE t1;
# Bug #16385 Partitions: crash when updating a range partitioned NDB table
#
CREATE TABLE t1 (
-a int not null,
+a int not null PRIMARY KEY,
b int not null,
c int not null)
partition by list(a)
@@ -255,7 +255,7 @@ 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
+CREATE TABLE t1 ( f1 INTEGER PRIMARY KEY, f2 char(20)) engine=ndb
PARTITION BY RANGE(f1)
( PARTITION part1 VALUES LESS THAN (2),
PARTITION part2 VALUES LESS THAN (1000));
=== modified file 'mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result'
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result 2009-02-03 14:35:26 +0000
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result 2009-05-15 14:00:51 +0000
@@ -172,7 +172,7 @@ DROP TABLE IF EXISTS t1;
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)
+y YEAR, t DATE, primary key(t))
PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901),
PARTITION p1 VALUES LESS THAN (1946),
@@ -192,7 +192,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster,
@@ -213,7 +214,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB,
@@ -263,7 +265,7 @@ COUNT(*)
4
DELETE FROM t1;
--- Check that simple Alter statements are replicated correctly ---
-ALTER TABLE t1 ADD PRIMARY KEY(t,id);
+ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(t, id);
ALTER TABLE t1 MODIFY vc TEXT;
--- Show the new improved table on the master ---
SHOW CREATE TABLE t1;
@@ -358,7 +360,7 @@ DROP TABLE IF EXISTS t1;
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)
+y YEAR, t DATE, primary key(id))
PARTITION BY LIST(id)
(PARTITION p0 VALUES IN (2, 4),
PARTITION p1 VALUES IN (42, 142));
@@ -376,7 +378,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date DEFAULT NULL,
+ PRIMARY KEY (`id`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (id)
(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster,
@@ -394,7 +397,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date DEFAULT NULL,
+ PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (id)
(PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB,
@@ -441,7 +445,6 @@ COUNT(*)
4
DELETE FROM t1;
--- Check that simple Alter statements are replicated correctly ---
-ALTER TABLE t1 ADD PRIMARY KEY(id);
ALTER TABLE t1 MODIFY vc TEXT;
--- Show the new improved table on the master ---
SHOW CREATE TABLE t1;
@@ -530,7 +533,7 @@ DROP TABLE IF EXISTS t1;
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)
+y YEAR, t DATE, primary key(t))
PARTITION BY HASH( YEAR(t) )
PARTITIONS 4;
--- show that tables have been created correctly ---
@@ -545,7 +548,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH ( YEAR(t))
PARTITIONS 4 */
@@ -560,7 +564,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH ( YEAR(t))
PARTITIONS 4 */
@@ -605,7 +610,7 @@ COUNT(*)
4
DELETE FROM t1;
--- Check that simple Alter statements are replicated correctly ---
-ALTER TABLE t1 ADD PRIMARY KEY(t,id);
+ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(t,id);
ALTER TABLE t1 MODIFY vc TEXT;
--- Show the new improved table on the master ---
SHOW CREATE TABLE t1;
=== modified file 'mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result'
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result 2009-02-03 14:35:26 +0000
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result 2009-05-15 14:00:51 +0000
@@ -172,7 +172,7 @@ DROP TABLE IF EXISTS t1;
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)
+y YEAR, t DATE, primary key(t))
PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901),
PARTITION p1 VALUES LESS THAN (1946),
@@ -192,7 +192,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster,
@@ -213,7 +214,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM,
@@ -263,7 +265,7 @@ COUNT(*)
4
DELETE FROM t1;
--- Check that simple Alter statements are replicated correctly ---
-ALTER TABLE t1 ADD PRIMARY KEY(t,id);
+ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(t, id);
ALTER TABLE t1 MODIFY vc TEXT;
--- Show the new improved table on the master ---
SHOW CREATE TABLE t1;
@@ -358,7 +360,7 @@ DROP TABLE IF EXISTS t1;
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)
+y YEAR, t DATE, primary key(id))
PARTITION BY LIST(id)
(PARTITION p0 VALUES IN (2, 4),
PARTITION p1 VALUES IN (42, 142));
@@ -376,7 +378,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date DEFAULT NULL,
+ PRIMARY KEY (`id`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (id)
(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster,
@@ -394,7 +397,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date DEFAULT NULL,
+ PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (id)
(PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM,
@@ -441,7 +445,6 @@ COUNT(*)
4
DELETE FROM t1;
--- Check that simple Alter statements are replicated correctly ---
-ALTER TABLE t1 ADD PRIMARY KEY(id);
ALTER TABLE t1 MODIFY vc TEXT;
--- Show the new improved table on the master ---
SHOW CREATE TABLE t1;
@@ -530,7 +533,7 @@ DROP TABLE IF EXISTS t1;
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)
+y YEAR, t DATE, primary key(t))
PARTITION BY HASH( YEAR(t) )
PARTITIONS 4;
--- show that tables have been created correctly ---
@@ -545,7 +548,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH ( YEAR(t))
PARTITIONS 4 */
@@ -560,7 +564,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH ( YEAR(t))
PARTITIONS 4 */
@@ -605,7 +610,7 @@ COUNT(*)
4
DELETE FROM t1;
--- Check that simple Alter statements are replicated correctly ---
-ALTER TABLE t1 ADD PRIMARY KEY(t,id);
+ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(t,id);
ALTER TABLE t1 MODIFY vc TEXT;
--- Show the new improved table on the master ---
SHOW CREATE TABLE t1;
=== modified file 'mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result'
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result 2008-11-04 07:43:21 +0000
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result 2009-05-15 14:00:51 +0000
@@ -29,7 +29,7 @@ ENGINE=NDB;
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)
+y YEAR, t DATE, primary key(t))
TABLESPACE ts1 STORAGE DISK
ENGINE=NDB
PARTITION BY RANGE (YEAR(t))
@@ -51,7 +51,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster,
@@ -72,7 +73,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster,
@@ -135,7 +137,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster,
@@ -157,7 +160,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster,
@@ -214,7 +218,7 @@ DROP TABLE IF EXISTS t1;
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)
+y YEAR, t DATE, primary key(id))
TABLESPACE ts1 STORAGE DISK
ENGINE=NDB
PARTITION BY LIST(id)
@@ -234,7 +238,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date DEFAULT NULL,
+ PRIMARY KEY (`id`)
) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (id)
(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster,
@@ -252,7 +257,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date DEFAULT NULL,
+ PRIMARY KEY (`id`)
) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (id)
(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster,
@@ -312,7 +318,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date DEFAULT NULL,
+ PRIMARY KEY (`id`)
) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (id)
(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster,
@@ -331,7 +338,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date DEFAULT NULL,
+ PRIMARY KEY (`id`)
) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (id)
(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster,
@@ -385,7 +393,7 @@ DROP TABLE IF EXISTS t1;
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)
+y YEAR, t DATE, primary key(t))
TABLESPACE ts1 STORAGE DISK
ENGINE=NDB
PARTITION BY HASH( YEAR(t) )
@@ -402,7 +410,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH ( YEAR(t))
PARTITIONS 4 */
@@ -417,7 +426,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH ( YEAR(t))
PARTITIONS 4 */
@@ -475,7 +485,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH ( YEAR(t))
PARTITIONS 4 */
@@ -492,7 +503,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH ( YEAR(t))
PARTITIONS 4 */
=== modified file 'mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result'
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result 2008-11-04 07:43:21 +0000
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result 2009-05-15 14:00:51 +0000
@@ -165,7 +165,7 @@ DROP TABLE IF EXISTS t1;
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)
+y YEAR, t DATE, primary key(t))
PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901),
PARTITION p1 VALUES LESS THAN (1946),
@@ -185,7 +185,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB,
@@ -206,7 +207,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster,
@@ -256,7 +258,7 @@ COUNT(*)
4
DELETE FROM t1;
--- Check that simple Alter statements are replicated correctly ---
-ALTER TABLE t1 ADD PRIMARY KEY(t,id);
+ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(t, id);
ALTER TABLE t1 MODIFY vc TEXT;
--- Show the new improved table on the master ---
SHOW CREATE TABLE t1;
@@ -351,7 +353,7 @@ DROP TABLE IF EXISTS t1;
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)
+y YEAR, t DATE, primary key(id))
PARTITION BY LIST(id)
(PARTITION p0 VALUES IN (2, 4),
PARTITION p1 VALUES IN (42, 142));
@@ -369,7 +371,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date DEFAULT NULL,
+ PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (id)
(PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB,
@@ -387,7 +390,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date DEFAULT NULL,
+ PRIMARY KEY (`id`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (id)
(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster,
@@ -434,7 +438,6 @@ COUNT(*)
4
DELETE FROM t1;
--- Check that simple Alter statements are replicated correctly ---
-ALTER TABLE t1 ADD PRIMARY KEY(id);
ALTER TABLE t1 MODIFY vc TEXT;
--- Show the new improved table on the master ---
SHOW CREATE TABLE t1;
@@ -523,7 +526,7 @@ DROP TABLE IF EXISTS t1;
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)
+y YEAR, t DATE, primary key(t))
PARTITION BY HASH( YEAR(t) )
PARTITIONS 4;
--- show that tables have been created correctly ---
@@ -538,7 +541,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH ( YEAR(t))
PARTITIONS 4 */
@@ -553,7 +557,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH ( YEAR(t))
PARTITIONS 4 */
@@ -598,7 +603,7 @@ COUNT(*)
4
DELETE FROM t1;
--- Check that simple Alter statements are replicated correctly ---
-ALTER TABLE t1 ADD PRIMARY KEY(t,id);
+ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(t,id);
ALTER TABLE t1 MODIFY vc TEXT;
--- Show the new improved table on the master ---
SHOW CREATE TABLE t1;
=== modified file 'mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result'
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result 2008-11-04 07:43:21 +0000
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result 2009-05-15 14:00:51 +0000
@@ -165,7 +165,7 @@ DROP TABLE IF EXISTS t1;
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)
+y YEAR, t DATE, primary key(t))
PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901),
PARTITION p1 VALUES LESS THAN (1946),
@@ -185,7 +185,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM,
@@ -206,7 +207,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster,
@@ -256,7 +258,7 @@ COUNT(*)
4
DELETE FROM t1;
--- Check that simple Alter statements are replicated correctly ---
-ALTER TABLE t1 ADD PRIMARY KEY(t,id);
+ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(t, id);
ALTER TABLE t1 MODIFY vc TEXT;
--- Show the new improved table on the master ---
SHOW CREATE TABLE t1;
@@ -351,7 +353,7 @@ DROP TABLE IF EXISTS t1;
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)
+y YEAR, t DATE, primary key(id))
PARTITION BY LIST(id)
(PARTITION p0 VALUES IN (2, 4),
PARTITION p1 VALUES IN (42, 142));
@@ -369,7 +371,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date DEFAULT NULL,
+ PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (id)
(PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM,
@@ -387,7 +390,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date DEFAULT NULL,
+ PRIMARY KEY (`id`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (id)
(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster,
@@ -434,7 +438,6 @@ COUNT(*)
4
DELETE FROM t1;
--- Check that simple Alter statements are replicated correctly ---
-ALTER TABLE t1 ADD PRIMARY KEY(id);
ALTER TABLE t1 MODIFY vc TEXT;
--- Show the new improved table on the master ---
SHOW CREATE TABLE t1;
@@ -523,7 +526,7 @@ DROP TABLE IF EXISTS t1;
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)
+y YEAR, t DATE, primary key(t))
PARTITION BY HASH( YEAR(t) )
PARTITIONS 4;
--- show that tables have been created correctly ---
@@ -538,7 +541,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH ( YEAR(t))
PARTITIONS 4 */
@@ -553,7 +557,8 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` date DEFAULT NULL
+ `t` date NOT NULL DEFAULT '0000-00-00',
+ PRIMARY KEY (`t`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH ( YEAR(t))
PARTITIONS 4 */
@@ -598,7 +603,7 @@ COUNT(*)
4
DELETE FROM t1;
--- Check that simple Alter statements are replicated correctly ---
-ALTER TABLE t1 ADD PRIMARY KEY(t,id);
+ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(t,id);
ALTER TABLE t1 MODIFY vc TEXT;
--- Show the new improved table on the master ---
SHOW CREATE TABLE t1;
=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test 2009-02-04 08:03:04 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test 2009-05-15 14:00:51 +0000
@@ -64,7 +64,7 @@ ENGINE=NDB;
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)
+ y YEAR, t DATE, primary key(t))
TABLESPACE ts1 STORAGE DISK
ENGINE=NDB
PARTITION BY RANGE (YEAR(t))
@@ -124,7 +124,7 @@ DROP TABLE IF EXISTS t1;
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)
+ y YEAR, t DATE, primary key(id))
TABLESPACE ts1 STORAGE DISK
ENGINE=NDB
PARTITION BY LIST(id)
@@ -183,7 +183,7 @@ DROP TABLE IF EXISTS t1;
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)
+ y YEAR, t DATE, primary key(t))
TABLESPACE ts1 STORAGE DISK
ENGINE=NDB
PARTITION BY HASH( YEAR(t) )
Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20090515140051-i7gcqzrg3bhashsc.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-6.2 branch (jonas:2925) Bug#40709 | Jonas Oreland | 15 May 2009 |