diff options
author | Igor Babaev <igor@askmonty.org> | 2012-09-01 14:21:59 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2012-09-01 14:21:59 -0700 |
commit | a6b88f1431238152643e41979ce10b9bbdac2a82 (patch) | |
tree | 42482ef66f3c59b255d299fc58ace8c1b0c518ea /mysql-test/r/subselect_innodb.result | |
parent | 5a86a61219826aadf8d08cbc447fe438f2bf50c3 (diff) | |
download | mariadb-git-a6b88f1431238152643e41979ce10b9bbdac2a82.tar.gz |
MDEV-415: Back-port of the WL task #1393 from the mysql-5.6 code line.
The task adds a more efficient handling of the queries with
ORDER BY order LIMIT n, such that n is small enough and
no indexes are used for order.
Diffstat (limited to 'mysql-test/r/subselect_innodb.result')
-rw-r--r-- | mysql-test/r/subselect_innodb.result | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/mysql-test/r/subselect_innodb.result b/mysql-test/r/subselect_innodb.result index a0f05a26a46..5808aa45219 100644 --- a/mysql-test/r/subselect_innodb.result +++ b/mysql-test/r/subselect_innodb.result @@ -248,6 +248,47 @@ NULL drop procedure p1; drop tables t1,t2,t3; # +# Bug #58756 +# Crash in heap_rrnd on query with HAVING ... IN (subquery) + LIMIT +# +CREATE TABLE t1 ( +col_time_key time DEFAULT NULL, +col_datetime_key datetime DEFAULT NULL, +col_varchar_nokey varchar(1) DEFAULT NULL, +KEY col_time_key (col_time_key), +KEY col_datetime_key (col_datetime_key) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +INSERT INTO t1 VALUES ('17:53:30','2005-11-10 12:40:29','h'); +INSERT INTO t1 VALUES ('11:35:49','2009-04-25 00:00:00','b'); +INSERT INTO t1 VALUES (NULL,'2002-11-27 00:00:00','s'); +INSERT INTO t1 VALUES ('06:01:40','2004-01-26 20:32:32','e'); +INSERT INTO t1 VALUES ('05:45:11','2007-10-26 11:41:40','j'); +INSERT INTO t1 VALUES ('00:00:00','2005-10-07 00:00:00','e'); +INSERT INTO t1 VALUES ('00:00:00','2000-07-15 05:00:34','f'); +INSERT INTO t1 VALUES ('06:11:01','2000-04-03 16:33:32','v'); +INSERT INTO t1 VALUES ('13:02:46',NULL,'x'); +INSERT INTO t1 VALUES ('21:44:25','2001-04-25 01:26:12','m'); +INSERT INTO t1 VALUES ('22:43:58','2000-12-27 00:00:00','c'); +CREATE TABLE t2 ( +col_time_key time DEFAULT NULL, +col_datetime_key datetime DEFAULT NULL, +col_varchar_nokey varchar(1) DEFAULT NULL, +KEY col_time_key (col_time_key), +KEY col_datetime_key (col_datetime_key) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +INSERT INTO t2 VALUES ('11:28:45','2004-10-11 18:13:16','w'); +SELECT col_time_key, col_datetime_key +FROM +( SELECT * FROM t1 ) AS table1 +HAVING ( 'r' , 'e' ) IN +( SELECT col_varchar_nokey , col_varchar_nokey FROM t2 ) +ORDER BY col_datetime_key +LIMIT 10; +col_time_key col_datetime_key +DROP TABLE t1; +DROP TABLE t2; +# End of Bug #58756 +# # Bug#60085 crash in Item::save_in_field() with time data type # CREATE TABLE t1(a date, b int, unique(b), unique(a), key(b)) engine=innodb; |