diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-11-26 14:51:48 +0200 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-11-26 14:51:48 +0200 |
commit | c5987223db0158389602e57c25c13368aad80b34 (patch) | |
tree | c48ad0e6cae3c6805e0e56810c191edf4210919f /mysql-test/t/partition_innodb.test | |
parent | 7074a99580ea7b89aef387838205778401d002c3 (diff) | |
parent | dce374bb663c0450546a6836cea763e8c3eca8dd (diff) | |
download | mariadb-git-c5987223db0158389602e57c25c13368aad80b34.tar.gz |
merge
Diffstat (limited to 'mysql-test/t/partition_innodb.test')
-rw-r--r-- | mysql-test/t/partition_innodb.test | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index e1ac7b4c7eb..dc8bcbb4cb9 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -8,6 +8,30 @@ drop table if exists t1, t2; let $MYSQLD_DATADIR= `SELECT @@datadir`; --echo # +--echo # Bug#56287: crash when using Partition datetime in sub in query +--echo # +CREATE TABLE t1 +(c1 bigint(20) unsigned NOT NULL AUTO_INCREMENT, + c2 varchar(40) not null default '', + c3 datetime not NULL, + PRIMARY KEY (c1,c3), + KEY partidx(c3)) +ENGINE=InnoDB +PARTITION BY RANGE (TO_DAYS(c3)) +(PARTITION p200912 VALUES LESS THAN (to_days('2010-01-01')), + PARTITION p201103 VALUES LESS THAN (to_days('2011-04-01')), + PARTITION p201912 VALUES LESS THAN MAXVALUE); + +insert into t1(c2,c3) values ("Test row",'2010-01-01 00:00:00'); + +SELECT PARTITION_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test'; +SELECT count(*) FROM t1 p where c3 in +(select c3 from t1 t where t.c3 < date '2011-04-26 19:19:44' + and t.c3 > date '2011-04-26 19:18:44') ; + +DROP TABLE t1; + +--echo # --echo # Bug#51830: Incorrect partition pruning on range partition (regression) --echo # CREATE TABLE t1 (a INT NOT NULL) @@ -401,3 +425,16 @@ connection default; SELECT * FROM t1; COMMIT; DROP TABLE t1; + +# +# Bug #55146 Assertion `m_part_spec.start_part == m_part_spec.end_part' in index_read_idx_map +# + +CREATE TABLE t1 (i1 int NOT NULL primary key, f1 int) ENGINE = InnoDB + PARTITION BY HASH(i1) PARTITIONS 2; + +INSERT INTO t1 VALUES (1,1), (2,2); + +SELECT * FROM t1 WHERE i1 = ( SELECT i1 FROM t1 WHERE f1=0 LIMIT 1 ); + +DROP TABLE t1; |