summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition_innodb.test
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@oracle.com>2010-10-15 10:06:22 +0200
committerMattias Jonsson <mattias.jonsson@oracle.com>2010-10-15 10:06:22 +0200
commit50fcba46f464c55859d305c2f26764386fe6076c (patch)
treeffa08747e95852dbbc2eb34c7dc3fff5be180e21 /mysql-test/t/partition_innodb.test
parenta9ac3cde4952b6c3525fc428add794ecaa4228a0 (diff)
parent2246f67f7ad4357c0639558a4dd19c48cc28dcf8 (diff)
downloadmariadb-git-50fcba46f464c55859d305c2f26764386fe6076c.tar.gz
Manual merge
Diffstat (limited to 'mysql-test/t/partition_innodb.test')
-rw-r--r--mysql-test/t/partition_innodb.test25
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test
index 3e9ac2ce2b5..2ce7e89f9f2 100644
--- a/mysql-test/t/partition_innodb.test
+++ b/mysql-test/t/partition_innodb.test
@@ -9,6 +9,31 @@ 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#54747: Deadlock between REORGANIZE PARTITION and
--echo # SELECT is not detected
--echo #