mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-5.1
into xiphis.org:/home/antony/work2/p2-bug20168.4
This commit is contained in:
@ -1,4 +1,33 @@
|
||||
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)
|
||||
@ -779,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));
|
||||
@ -865,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));
|
||||
|
@ -554,6 +554,10 @@ PARTITION BY RANGE (a) (PARTITION p1 VALUES LESS THAN(5));
|
||||
insert into t1 values (10);
|
||||
ERROR HY000: Table has no partition for value 10
|
||||
drop table t1;
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (-1));
|
||||
ERROR HY000: Partition constant is out of partition function domain
|
||||
create table t1 (v varchar(12))
|
||||
partition by range (ascii(v))
|
||||
(partition p0 values less than (10));
|
||||
|
@ -363,6 +363,33 @@ SELECT COUNT(*) FROM t1 WHERE c3 < '2000-12-31';
|
||||
COUNT(*)
|
||||
10
|
||||
DROP TABLE t1;
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (10),
|
||||
partition p1 values less than (0));
|
||||
ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (0),
|
||||
partition p1 values less than (10));
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bigint(20) unsigned DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (0) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (10) ENGINE = MyISAM)
|
||||
drop table t1;
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (2),
|
||||
partition p1 values less than (10));
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bigint(20) unsigned DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (2) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (10) ENGINE = MyISAM)
|
||||
insert into t1 values (0xFFFFFFFFFFFFFFFF);
|
||||
ERROR HY000: Table has no partition for value 18446744073709551615
|
||||
drop table t1;
|
||||
create table t1 (a int)
|
||||
partition by range (MOD(a,3))
|
||||
subpartition by hash(a)
|
||||
|
@ -9,6 +9,35 @@
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# BUG 16002: Handle unsigned integer functions properly
|
||||
#
|
||||
--error 1064
|
||||
create table t1 (a bigint)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (0xFFFFFFFFFFFFFFFF),
|
||||
partition p1 values less than (10));
|
||||
--error 1064
|
||||
create table t1 (a bigint)
|
||||
partition by list (a)
|
||||
(partition p0 values in (0xFFFFFFFFFFFFFFFF),
|
||||
partition p1 values in (10));
|
||||
|
||||
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;
|
||||
select * from t1 where (a + 1) > 10;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug 19307: CSV engine crashes
|
||||
#
|
||||
@ -19,6 +48,7 @@ partition by list (a)
|
||||
(partition p0 values in (null));
|
||||
|
||||
#
|
||||
# Added test case
|
||||
#
|
||||
create table t1 (a int)
|
||||
partition by key(a)
|
||||
@ -919,6 +949,12 @@ create table t1 (f1 smallint)
|
||||
partition by list (f1) (partition p0 values in (null));
|
||||
insert into t1 values (null);
|
||||
select * from t1 where f1 is null;
|
||||
select * from t1 where f1 < 1;
|
||||
select * from t1 where f1 <= NULL;
|
||||
select * from t1 where f1 < NULL;
|
||||
select * from t1 where f1 >= NULL;
|
||||
select * from t1 where f1 > NULL;
|
||||
select * from t1 where f1 > 1;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (f1 smallint)
|
||||
@ -985,6 +1021,23 @@ PARTITION p2 VALUES LESS THAN (30) ENGINE = MyISAM);
|
||||
SHOW TABLE STATUS;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
#BUG 16002 Erroneus handling of unsigned partition functions
|
||||
#
|
||||
--error ER_PARTITION_CONST_DOMAIN_ERROR
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by list (a)
|
||||
(partition p0 values in (0-1));
|
||||
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (10));
|
||||
|
||||
--error ER_NO_PARTITION_FOR_GIVEN_VALUE
|
||||
insert into t1 values (0xFFFFFFFFFFFFFFFF);
|
||||
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
#BUG 18750 Problems with partition names
|
||||
#
|
||||
|
@ -748,6 +748,10 @@ CREATE TABLE t1(a int)
|
||||
insert into t1 values (10);
|
||||
drop table t1;
|
||||
|
||||
--error ER_PARTITION_CONST_DOMAIN_ERROR
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (-1));
|
||||
#
|
||||
# Bug 18198 Partitions: Verify that erroneus partition functions doesn't work
|
||||
#
|
||||
|
@ -388,6 +388,31 @@ SELECT COUNT(*) FROM t1 WHERE c3 BETWEEN '1996-12-31' AND '2000-12-31';
|
||||
SELECT COUNT(*) FROM t1 WHERE c3 < '2000-12-31';
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# BUG 16002: Unsigned partition functions not handled correctly
|
||||
#
|
||||
--error ER_RANGE_NOT_INCREASING_ERROR
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (10),
|
||||
partition p1 values less than (0));
|
||||
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (0),
|
||||
partition p1 values less than (10));
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (2),
|
||||
partition p1 values less than (10));
|
||||
show create table t1;
|
||||
--error ER_NO_PARTITION_FOR_GIVEN_VALUE
|
||||
insert into t1 values (0xFFFFFFFFFFFFFFFF);
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG 18962 Errors in DROP PARTITION
|
||||
#
|
||||
|
Reference in New Issue
Block a user