mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into bk-internal.mysql.com:/data0/bk/mysql-5.1-kt
This commit is contained in:
@ -1,4 +1,38 @@
|
||||
drop table if exists t1;
|
||||
create table t1 (a bigint)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (0xFFFFFFFFFFFFFFFF),
|
||||
partition p1 values less than (10));
|
||||
ERROR 42000: VALUES value must be of same type as partition function near '),
|
||||
partition p1 values less than (10))' at line 3
|
||||
create table t1 (a bigint)
|
||||
partition by list (a)
|
||||
(partition p0 values in (0xFFFFFFFFFFFFFFFF),
|
||||
partition p1 values in (10));
|
||||
ERROR 42000: VALUES value must be of same type as partition function near '),
|
||||
partition p1 values in (10))' at line 3
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (100),
|
||||
partition p1 values less than MAXVALUE);
|
||||
insert into t1 values (1);
|
||||
drop table t1;
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by hash (a);
|
||||
insert into t1 values (0xFFFFFFFFFFFFFFFD);
|
||||
insert into t1 values (0xFFFFFFFFFFFFFFFE);
|
||||
select * from t1 where (a + 1) < 10;
|
||||
a
|
||||
select * from t1 where (a + 1) > 10;
|
||||
a
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
drop table t1;
|
||||
create table t1 (a int)
|
||||
engine = csv
|
||||
partition by list (a)
|
||||
(partition p0 values in (null));
|
||||
ERROR HY000: CSV handler cannot be used in partitioned tables
|
||||
create table t1 (a int)
|
||||
partition by key(a)
|
||||
(partition p0 engine = MEMORY);
|
||||
@ -12,13 +46,13 @@ show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) SUBPARTITION BY KEY (a) (PARTITION p0 VALUES LESS THAN (1) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (2) ENGINE = MyISAM) */
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) SUBPARTITION BY KEY (a) (PARTITION p0 VALUES LESS THAN (1) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (2) ENGINE = MyISAM)*/
|
||||
alter table t1 reorganize partition p1 into (partition p1 values less than (3));
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) SUBPARTITION BY KEY (a) (PARTITION p0 VALUES LESS THAN (1) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (3) ENGINE = MyISAM) */
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) SUBPARTITION BY KEY (a) (PARTITION p0 VALUES LESS THAN (1) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (3) ENGINE = MyISAM)*/
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
@ -774,6 +808,18 @@ insert into t1 values (null);
|
||||
select * from t1 where f1 is null;
|
||||
f1
|
||||
NULL
|
||||
select * from t1 where f1 < 1;
|
||||
f1
|
||||
select * from t1 where f1 <= NULL;
|
||||
f1
|
||||
select * from t1 where f1 < NULL;
|
||||
f1
|
||||
select * from t1 where f1 >= NULL;
|
||||
f1
|
||||
select * from t1 where f1 > NULL;
|
||||
f1
|
||||
select * from t1 where f1 > 1;
|
||||
f1
|
||||
drop table t1;
|
||||
create table t1 (f1 smallint)
|
||||
partition by range (f1) (partition p0 values less than (0));
|
||||
@ -860,6 +906,16 @@ SHOW TABLE STATUS;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MyISAM 10 Dynamic 0 0 0 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
|
||||
DROP TABLE t1;
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by list (a)
|
||||
(partition p0 values in (0-1));
|
||||
ERROR HY000: Partition constant is out of partition function domain
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (10));
|
||||
insert into t1 values (0xFFFFFFFFFFFFFFFF);
|
||||
ERROR HY000: Table has no partition for value 18446744073709551615
|
||||
drop table t1;
|
||||
create table t1 (a int)
|
||||
partition by list (a)
|
||||
(partition `s1 s2` values in (0));
|
||||
|
Reference in New Issue
Block a user