mirror of
https://github.com/MariaDB/server.git
synced 2025-11-08 00:28:29 +03:00
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.1
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint mysql-test/t/disabled.def: Auto merged
This commit is contained in:
@@ -14,11 +14,13 @@
|
||||
#events : BUG#17619 2006-02-21 andrey Race conditions
|
||||
#events_scheduling : BUG#19170 2006-04-26 andrey Test case of 19170 fails on some platforms. Has to be checked.
|
||||
#im_instance_conf : Bug#20294 2006-06-06 monty Instance manager test im_instance_conf fails randomly
|
||||
#im_options : Bug#20294 2006-06-06 monty Instance manager test im_instance_conf fails randomly
|
||||
im_options : Bug#20294 2006-07-24 stewart Instance manager test im_instance_conf fails randomly
|
||||
#im_life_cycle : Bug#20368 2006-06-10 alik im_life_cycle test fails
|
||||
ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
|
||||
ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
|
||||
ndb_binlog_ignore_db : BUG#21279 2006-07-25 ingo Randomly throws a warning
|
||||
ndb_load : BUG#17233 2006-05-04 tomas failed load data from infile causes mysqld dbug_assert, binlog not flushed
|
||||
ndb_restore_compat : BUG#21283 2006-07-26 ingo Test fails randomly
|
||||
partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table
|
||||
ps_7ndb : BUG#18950 2006-02-16 jmiller create table like does not obtain LOCK_open
|
||||
rpl_ndb_2innodb : BUG#19227 2006-04-20 pekka pk delete apparently not replicated
|
||||
|
||||
@@ -383,16 +383,6 @@ drop table t1, t2, t3;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
# BUG#10952 - alter table ... lost data without errors and warnings
|
||||
#
|
||||
drop table if exists t1;
|
||||
create table t1 (c char(20)) engine=MyISAM;
|
||||
insert into t1 values ("Monty"),("WAX"),("Walrus");
|
||||
--error 1031
|
||||
alter table t1 engine=MERGE;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG#19648 - Merge table does not work with bit types
|
||||
#
|
||||
|
||||
@@ -192,7 +192,10 @@ CREATE TABLE t1 (
|
||||
c3 INT NOT NULL,
|
||||
PRIMARY KEY(c1,c3))
|
||||
ENGINE=NDB
|
||||
PARTITION BY KEY(c3);
|
||||
PARTITION BY KEY(c3)
|
||||
(PARTITION p0 NODEGROUP 0, PARTITION p1 NODEGROUP 0);
|
||||
|
||||
ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1;
|
||||
SELECT NODEGROUP,PARTITION_NAME FROM information_schema.partitions WHERE
|
||||
table_name = "t1";
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -9,6 +9,36 @@
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# More partition pruning tests, especially on interval walking
|
||||
#
|
||||
create table t1 (a int unsigned)
|
||||
partition by hash(a div 2)
|
||||
partitions 4;
|
||||
insert into t1 values (null),(0),(1),(2),(3),(4),(5),(6),(7);
|
||||
select * from t1 where a < 0;
|
||||
select * from t1 where a is null or (a >= 5 and a <= 7);
|
||||
select * from t1 where a is null;
|
||||
select * from t1 where a is not null;
|
||||
select * from t1 where a >= 1 and a < 3;
|
||||
select * from t1 where a >= 3 and a <= 5;
|
||||
select * from t1 where a > 2 and a < 4;
|
||||
select * from t1 where a > 3 and a <= 6;
|
||||
select * from t1 where a > 5;
|
||||
select * from t1 where a >= 1 and a <= 5;
|
||||
explain partitions select * from t1 where a < 0;
|
||||
explain partitions select * from t1 where a is null or (a >= 5 and a <= 7);
|
||||
explain partitions select * from t1 where a is null;
|
||||
explain partitions select * from t1 where a is not null;
|
||||
explain partitions select * from t1 where a >= 1 and a < 3;
|
||||
explain partitions select * from t1 where a >= 3 and a <= 5;
|
||||
explain partitions select * from t1 where a > 2 and a < 4;
|
||||
explain partitions select * from t1 where a > 3 and a <= 6;
|
||||
explain partitions select * from t1 where a > 5;
|
||||
explain partitions select * from t1 where a >= 1 and a <= 5;
|
||||
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Partition by hash, basic
|
||||
#
|
||||
|
||||
@@ -9,6 +9,49 @@
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# Bug 20733: Zerofill columns gives wrong result with partitioned tables
|
||||
#
|
||||
create table t1 (a int unsigned)
|
||||
partition by list (a)
|
||||
(partition p0 values in (0),
|
||||
partition p1 values in (1),
|
||||
partition pnull values in (null),
|
||||
partition p2 values in (2));
|
||||
|
||||
insert into t1 values (null),(0),(1),(2);
|
||||
select * from t1 where a < 2;
|
||||
select * from t1 where a <= 0;
|
||||
select * from t1 where a < 1;
|
||||
select * from t1 where a > 0;
|
||||
select * from t1 where a > 1;
|
||||
select * from t1 where a >= 0;
|
||||
select * from t1 where a >= 1;
|
||||
select * from t1 where a is null;
|
||||
select * from t1 where a is not null;
|
||||
select * from t1 where a is null or a > 0;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a int unsigned, b int)
|
||||
partition by list (a)
|
||||
subpartition by hash (b)
|
||||
subpartitions 2
|
||||
(partition p0 values in (0),
|
||||
partition p1 values in (1),
|
||||
partition pnull values in (null, 2),
|
||||
partition p3 values in (3));
|
||||
insert into t1 values (0,0),(0,1),(1,0),(1,1),(null,0),(null,1);
|
||||
insert into t1 values (2,0),(2,1),(3,0),(3,1);
|
||||
|
||||
explain partitions select * from t1 where a is null;
|
||||
select * from t1 where a is null;
|
||||
explain partitions select * from t1 where a = 2;
|
||||
select * from t1 where a = 2;
|
||||
select * from t1 where a <= 0;
|
||||
select * from t1 where a < 3;
|
||||
select * from t1 where a >= 1 or a is null;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test ordinary list partitioning that it works ok
|
||||
#
|
||||
@@ -136,3 +179,4 @@ insert into t1 values (null);
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
|
||||
|
||||
@@ -137,6 +137,32 @@ explain partitions select * from t6 where a >= 3 and a <= 8;
|
||||
|
||||
explain partitions select * from t6 where a > 3 and a < 5;
|
||||
|
||||
drop table t6;
|
||||
|
||||
create table t6 (a int unsigned not null) partition by LIST(a) (
|
||||
partition p1 values in (1),
|
||||
partition p3 values in (3),
|
||||
partition p5 values in (5),
|
||||
partition p7 values in (7),
|
||||
partition p9 values in (9)
|
||||
);
|
||||
insert into t6 values (1),(3),(5);
|
||||
|
||||
explain partitions select * from t6 where a < 1;
|
||||
explain partitions select * from t6 where a <= 1;
|
||||
explain partitions select * from t6 where a > 9;
|
||||
explain partitions select * from t6 where a >= 9;
|
||||
|
||||
explain partitions select * from t6 where a > 0 and a < 5;
|
||||
explain partitions select * from t6 where a > 5 and a < 12;
|
||||
explain partitions select * from t6 where a > 3 and a < 8 ;
|
||||
|
||||
explain partitions select * from t6 where a >= 0 and a <= 5;
|
||||
explain partitions select * from t6 where a >= 5 and a <= 12;
|
||||
explain partitions select * from t6 where a >= 3 and a <= 8;
|
||||
|
||||
explain partitions select * from t6 where a > 3 and a < 5;
|
||||
|
||||
# RANGE(field) partitioning, interval analysis.
|
||||
create table t7 (a int not null) partition by RANGE(a) (
|
||||
partition p10 values less than (10),
|
||||
@@ -162,6 +188,32 @@ explain partitions select * from t7 where a >= 90;
|
||||
# misc intervals
|
||||
explain partitions select * from t7 where a > 11 and a < 29;
|
||||
|
||||
drop table t7;
|
||||
|
||||
create table t7 (a int unsigned not null) partition by RANGE(a) (
|
||||
partition p10 values less than (10),
|
||||
partition p30 values less than (30),
|
||||
partition p50 values less than (50),
|
||||
partition p70 values less than (70),
|
||||
partition p90 values less than (90)
|
||||
);
|
||||
insert into t7 values (10),(30),(50);
|
||||
|
||||
# leftmost intervals
|
||||
explain partitions select * from t7 where a < 5;
|
||||
explain partitions select * from t7 where a < 10;
|
||||
explain partitions select * from t7 where a <= 10;
|
||||
explain partitions select * from t7 where a = 10;
|
||||
|
||||
#rightmost intervals
|
||||
explain partitions select * from t7 where a < 90;
|
||||
explain partitions select * from t7 where a = 90;
|
||||
explain partitions select * from t7 where a > 90;
|
||||
explain partitions select * from t7 where a >= 90;
|
||||
|
||||
# misc intervals
|
||||
explain partitions select * from t7 where a > 11 and a < 29;
|
||||
|
||||
# LIST(monontonic_func) partitioning
|
||||
create table t8 (a date not null) partition by RANGE(YEAR(a)) (
|
||||
partition p0 values less than (1980),
|
||||
|
||||
@@ -9,6 +9,50 @@
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# More checks for partition pruning
|
||||
#
|
||||
create table t1 (a int unsigned)
|
||||
partition by range (a)
|
||||
(partition pnull values less than (0),
|
||||
partition p0 values less than (1),
|
||||
partition p1 values less than(2));
|
||||
insert into t1 values (null),(0),(1);
|
||||
|
||||
select * from t1 where a is null;
|
||||
select * from t1 where a >= 0;
|
||||
select * from t1 where a < 0;
|
||||
select * from t1 where a <= 0;
|
||||
select * from t1 where a > 1;
|
||||
explain partitions select * from t1 where a is null;
|
||||
explain partitions select * from t1 where a >= 0;
|
||||
explain partitions select * from t1 where a < 0;
|
||||
explain partitions select * from t1 where a <= 0;
|
||||
explain partitions select * from t1 where a > 1;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a int unsigned, b int unsigned)
|
||||
partition by range (a)
|
||||
subpartition by hash (b)
|
||||
subpartitions 2
|
||||
(partition pnull values less than (0),
|
||||
partition p0 values less than (1),
|
||||
partition p1 values less than(2));
|
||||
insert into t1 values (null,0),(null,1),(0,0),(0,1),(1,0),(1,1);
|
||||
|
||||
select * from t1 where a is null;
|
||||
select * from t1 where a >= 0;
|
||||
select * from t1 where a < 0;
|
||||
select * from t1 where a <= 0;
|
||||
select * from t1 where a > 1;
|
||||
explain partitions select * from t1 where a is null;
|
||||
explain partitions select * from t1 where a >= 0;
|
||||
explain partitions select * from t1 where a < 0;
|
||||
explain partitions select * from t1 where a <= 0;
|
||||
explain partitions select * from t1 where a > 1;
|
||||
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Partition by range, basic
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user