mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge witty.:/Users/mattiasj/clones/mysql-5.1-bug31931.2
into witty.:/Users/mattiasj/clones/topush-51 mysql-test/r/partition.result: Auto merged mysql-test/suite/ndb/r/ndb_partition_key.result: Auto merged mysql-test/suite/ndb/t/ndb_partition_key.test: Auto merged mysql-test/t/partition.test: Auto merged sql/sql_partition.cc: Auto merged sql/partition_info.cc: SCCS merged
This commit is contained in:
@ -530,11 +530,9 @@ t1 CREATE TABLE `t1` (
|
||||
alter table t1
|
||||
partition by key(a)
|
||||
(partition p0, partition p1 engine=heap);
|
||||
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
|
||||
alter table t1
|
||||
partition by key(a)
|
||||
(partition p0 engine=heap, partition p1);
|
||||
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
|
||||
alter table t1
|
||||
engine=heap
|
||||
partition by key (a)
|
||||
|
@ -79,8 +79,7 @@ engine = innodb
|
||||
partition by list (a)
|
||||
(partition p0 values in (0));
|
||||
alter table t1 engine = x;
|
||||
Warnings:
|
||||
Warning 1286 Unknown table engine 'x'
|
||||
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@ -151,9 +150,11 @@ DROP TABLE t1;
|
||||
create table t1 (int_column int, char_column char(5))
|
||||
PARTITION BY RANGE (int_column) subpartition by key (char_column) subpartitions 2
|
||||
(PARTITION p1 VALUES LESS THAN (5) ENGINE = InnoDB);
|
||||
alter table t1 PARTITION BY RANGE (int_column)
|
||||
alter table t1
|
||||
ENGINE = MyISAM
|
||||
PARTITION BY RANGE (int_column)
|
||||
subpartition by key (char_column) subpartitions 2
|
||||
(PARTITION p1 VALUES LESS THAN (5) ENGINE = myisam);
|
||||
(PARTITION p1 VALUES LESS THAN (5));
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
|
@ -105,6 +105,12 @@ PARTITION BY KEY(a)
|
||||
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;
|
||||
@ -160,7 +166,6 @@ t1 CREATE TABLE `t1` (
|
||||
alter table t1
|
||||
partition by key(a)
|
||||
(partition p0 engine=ndb, partition p1);
|
||||
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
|
||||
alter table t1
|
||||
engine=ndb
|
||||
partition by key(a)
|
||||
|
@ -79,6 +79,14 @@ 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);
|
||||
|
||||
@ -116,7 +124,10 @@ show create table t1;
|
||||
alter table t1 remove partitioning;
|
||||
show create table t1;
|
||||
|
||||
--error ER_MIX_HANDLER_ERROR
|
||||
# after bug#31931 was fixed
|
||||
# this is OK, since the storage engine is specified
|
||||
# on table level before.
|
||||
#--error ER_MIX_HANDLER_ERROR
|
||||
alter table t1
|
||||
partition by key(a)
|
||||
(partition p0 engine=ndb, partition p1);
|
||||
|
@ -83,6 +83,7 @@ DROP TABLE t1;
|
||||
--echo # 3 Some but not all named partitions or subpartitions get a storage
|
||||
--echo # engine assigned
|
||||
--echo #------------------------------------------------------------------------
|
||||
--error ER_MIX_HANDLER_ERROR
|
||||
eval CREATE TABLE t1 (
|
||||
$column_list
|
||||
)
|
||||
@ -90,10 +91,7 @@ PARTITION BY HASH(f_int1)
|
||||
( PARTITION part1 STORAGE ENGINE = $engine,
|
||||
PARTITION part2
|
||||
);
|
||||
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
|
||||
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
DROP TABLE t1;
|
||||
--error ER_MIX_HANDLER_ERROR
|
||||
eval CREATE TABLE t1 (
|
||||
$column_list
|
||||
)
|
||||
@ -101,10 +99,7 @@ PARTITION BY HASH(f_int1)
|
||||
( PARTITION part1 ,
|
||||
PARTITION part2 STORAGE ENGINE = $engine
|
||||
);
|
||||
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
|
||||
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
DROP TABLE t1;
|
||||
--error ER_MIX_HANDLER_ERROR
|
||||
eval CREATE TABLE t1 (
|
||||
$column_list
|
||||
)
|
||||
@ -117,10 +112,8 @@ SUBPARTITION BY HASH(f_int1)
|
||||
(SUBPARTITION subpart21 STORAGE ENGINE = $engine,
|
||||
SUBPARTITION subpart22 STORAGE ENGINE = $engine)
|
||||
);
|
||||
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
|
||||
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
DROP TABLE t1;
|
||||
--echo # this should fail with ER_MIX_HANDLER_ERROR
|
||||
--echo # after fixing Bug#33722
|
||||
eval CREATE TABLE t1 (
|
||||
$column_list
|
||||
)
|
||||
@ -142,6 +135,9 @@ DROP TABLE t1;
|
||||
--echo # 4 Storage engine assignment after partition name + after name of
|
||||
--echo # subpartitions belonging to another partition
|
||||
--echo #------------------------------------------------------------------------
|
||||
--echo # this should work
|
||||
--echo # after fixing Bug#33722
|
||||
--error ER_MIX_HANDLER_ERROR
|
||||
eval CREATE TABLE t1 (
|
||||
$column_list
|
||||
)
|
||||
@ -154,10 +150,13 @@ SUBPARTITION BY HASH(f_int1)
|
||||
(SUBPARTITION subpart21 STORAGE ENGINE = $engine,
|
||||
SUBPARTITION subpart22 STORAGE ENGINE = $engine)
|
||||
);
|
||||
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
|
||||
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
DROP TABLE t1;
|
||||
#INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
|
||||
#SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
|
||||
#--source suite/parts/inc/partition_check.inc
|
||||
#DROP TABLE t1;
|
||||
--echo # this should work
|
||||
--echo # after fixing Bug#33722
|
||||
--error ER_MIX_HANDLER_ERROR
|
||||
eval CREATE TABLE t1 (
|
||||
$column_list
|
||||
)
|
||||
@ -170,10 +169,10 @@ SUBPARTITION BY HASH(f_int1)
|
||||
(SUBPARTITION subpart21,
|
||||
SUBPARTITION subpart22)
|
||||
);
|
||||
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
|
||||
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
DROP TABLE t1;
|
||||
#INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
|
||||
#SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
|
||||
#--source suite/parts/inc/partition_check.inc
|
||||
#DROP TABLE t1;
|
||||
#
|
||||
--echo #------------------------------------------------------------------------
|
||||
--echo # 5 Precedence of storage engine assignments (if there is any)
|
||||
@ -210,6 +209,9 @@ DROP TABLE t1;
|
||||
--echo # 6.2 Storage engine assignment after partition name + after
|
||||
--echo # subpartition name
|
||||
# in partition part + in sub partition part
|
||||
--echo # this should work
|
||||
--echo # after fixing Bug#33722
|
||||
--error ER_MIX_HANDLER_ERROR
|
||||
eval CREATE TABLE t1 (
|
||||
$column_list
|
||||
)
|
||||
@ -222,10 +224,10 @@ SUBPARTITION BY HASH(f_int1)
|
||||
(SUBPARTITION subpart21 STORAGE ENGINE = $engine,
|
||||
SUBPARTITION subpart22 STORAGE ENGINE = $engine)
|
||||
);
|
||||
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
|
||||
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
DROP TABLE t1;
|
||||
#INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
|
||||
#SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
|
||||
#--source suite/parts/inc/partition_check.inc
|
||||
#DROP TABLE t1;
|
||||
|
||||
--echo #------------------------------------------------------------------------
|
||||
--echo # 6 Session default engine differs from engine used within create table
|
||||
|
@ -88,6 +88,12 @@ PARTITION BY KEY(a)
|
||||
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;
|
||||
@ -143,7 +149,6 @@ t1 CREATE TABLE `t1` (
|
||||
alter table t1
|
||||
partition by key(a)
|
||||
(partition p0 engine=ndb, partition p1);
|
||||
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
|
||||
alter table t1
|
||||
engine=ndb
|
||||
partition by key(a)
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -75,6 +75,14 @@ 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);
|
||||
|
||||
@ -112,7 +120,9 @@ show create table t1;
|
||||
alter table t1 remove partitioning;
|
||||
show create table t1;
|
||||
|
||||
--error ER_MIX_HANDLER_ERROR
|
||||
#--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);
|
||||
|
@ -53,6 +53,7 @@ create table t1 (id int auto_increment, s1 int, primary key (id));
|
||||
insert into t1 values (null,1);
|
||||
insert into t1 values (null,6);
|
||||
|
||||
-- sorted_result
|
||||
select * from t1;
|
||||
|
||||
alter table t1 partition by range (id) (
|
||||
@ -604,12 +605,14 @@ partition by key (a)
|
||||
(partition p0, partition p1);
|
||||
show create table t1;
|
||||
|
||||
--error ER_MIX_HANDLER_ERROR
|
||||
# Since alter, it already have ENGINE=HEAP from before on table level
|
||||
# -> OK
|
||||
alter table t1
|
||||
partition by key(a)
|
||||
(partition p0, partition p1 engine=heap);
|
||||
|
||||
--error ER_MIX_HANDLER_ERROR
|
||||
# Since alter, it already have ENGINE=HEAP from before on table level
|
||||
# -> OK
|
||||
alter table t1
|
||||
partition by key(a)
|
||||
(partition p0 engine=heap, partition p1);
|
||||
|
@ -86,6 +86,7 @@ engine = innodb
|
||||
partition by list (a)
|
||||
(partition p0 values in (0));
|
||||
|
||||
-- error ER_MIX_HANDLER_ERROR
|
||||
alter table t1 engine = x;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
@ -164,8 +165,10 @@ DROP TABLE t1;
|
||||
create table t1 (int_column int, char_column char(5))
|
||||
PARTITION BY RANGE (int_column) subpartition by key (char_column) subpartitions 2
|
||||
(PARTITION p1 VALUES LESS THAN (5) ENGINE = InnoDB);
|
||||
alter table t1 PARTITION BY RANGE (int_column)
|
||||
alter table t1
|
||||
ENGINE = MyISAM
|
||||
PARTITION BY RANGE (int_column)
|
||||
subpartition by key (char_column) subpartitions 2
|
||||
(PARTITION p1 VALUES LESS THAN (5) ENGINE = myisam);
|
||||
(PARTITION p1 VALUES LESS THAN (5));
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user