mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Handle default engine type better for
partitioned tables mysql-test/r/partition.result: New test cases for SHOW CREATE TABLE mysql-test/r/partition_range.result: New test cases for SHOW CREATE TABLE mysql-test/t/partition.test: New test cases for SHOW CREATE TABLE mysql-test/t/partition_range.test: New test cases for SHOW CREATE TABLE sql/handler.h: Handle default engine type better sql/sql_partition.cc: Handle default engine type better sql/sql_show.cc: Handle default engine type better sql/sql_table.cc: Handle default engine type better sql/sql_yacc.yy: Handle default engine type better sql/table.cc: Handle default engine type better sql/unireg.cc: Handle default engine type better
This commit is contained in:
@ -19,6 +19,14 @@ a b c
|
||||
6 1 1
|
||||
10 1 1
|
||||
15 1 1
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL,
|
||||
`b` int(11) NOT NULL,
|
||||
`c` int(11) NOT NULL,
|
||||
PRIMARY KEY (`a`,`b`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) (PARTITION x1 VALUES LESS THAN (5) TABLESPACE = ts1 ENGINE = MyISAM, PARTITION x2 VALUES LESS THAN (10) TABLESPACE = ts2 ENGINE = MyISAM, PARTITION x3 VALUES LESS THAN MAXVALUE TABLESPACE = ts3 ENGINE = MyISAM)
|
||||
ALTER TABLE t1
|
||||
partition by range (a)
|
||||
partitions 3
|
||||
@ -31,6 +39,14 @@ a b c
|
||||
6 1 1
|
||||
10 1 1
|
||||
15 1 1
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL,
|
||||
`b` int(11) NOT NULL,
|
||||
`c` int(11) NOT NULL,
|
||||
PRIMARY KEY (`a`,`b`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) (PARTITION x1 VALUES LESS THAN (5) TABLESPACE = ts1 ENGINE = MyISAM, PARTITION x2 VALUES LESS THAN (10) TABLESPACE = ts2 ENGINE = MyISAM, PARTITION x3 VALUES LESS THAN MAXVALUE TABLESPACE = ts3 ENGINE = MyISAM)
|
||||
drop table if exists t1;
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
@ -120,6 +136,24 @@ subpartition x22)
|
||||
);
|
||||
SELECT * from t1;
|
||||
a b c
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL,
|
||||
`b` int(11) NOT NULL,
|
||||
`c` int(11) NOT NULL,
|
||||
PRIMARY KEY (`a`,`b`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) SUBPARTITION BY HASH (a+b) (PARTITION x1 VALUES LESS THAN (1) (SUBPARTITION x11 ENGINE = MyISAM, SUBPARTITION x12 ENGINE = MyISAM), PARTITION x2 VALUES LESS THAN (5) (SUBPARTITION x21 ENGINE = MyISAM, SUBPARTITION x22 ENGINE = MyISAM))
|
||||
ALTER TABLE t1 ADD COLUMN d int;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL,
|
||||
`b` int(11) NOT NULL,
|
||||
`c` int(11) NOT NULL,
|
||||
`d` int(11) default NULL,
|
||||
PRIMARY KEY (`a`,`b`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) SUBPARTITION BY HASH (a+b) (PARTITION x1 VALUES LESS THAN (1) (SUBPARTITION x11 ENGINE = MyISAM, SUBPARTITION x12 ENGINE = MyISAM), PARTITION x2 VALUES LESS THAN (5) (SUBPARTITION x21 ENGINE = MyISAM, SUBPARTITION x22 ENGINE = MyISAM))
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
|
Reference in New Issue
Block a user