| 1 |
# Test for BUG#43101 "MyISAM&Maria gives rows for <>NULL and >NULL |
| 2 |
# with LIMIT clause" |
| 3 |
|
| 4 |
--source include/have_debug.inc |
| 5 |
|
| 6 |
# Goes away with |
| 7 |
#set session debug_dbug=+d,optimizer_no_icp; |
| 8 |
|
| 9 |
CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NULL, c3 DATE, PRIMARY |
| 10 |
KEY(c1), UNIQUE INDEX(c2)); |
| 11 |
|
| 12 |
insert into t1 values('-838:59:59','-838:59:59','2009-01-21'); |
| 13 |
insert into t1 values('00:00:00','00:00:00','2009-01-09'); |
| 14 |
insert into t1 values('00:00:11','00:00:11','2009-01-20'); |
| 15 |
insert into t1 values('00:00:12','00:00:12','2009-01-13'); |
| 16 |
insert into t1 values('00:00:45','00:00:45','2009-01-07'); |
| 17 |
insert into t1 values('00:11:12','00:11:12','2009-01-19'); |
| 18 |
insert into t1 values('00:12:30','00:12:30','2009-01-23'); |
| 19 |
insert into t1 values('00:12:34','00:12:34','2009-01-14'); |
| 20 |
insert into t1 values('01:23:00','01:23:00','2009-01-03'); |
| 21 |
insert into t1 values('08:03:02','08:03:02','2009-01-18'); |
| 22 |
insert into t1 values('08:29:45',NULL,'2009-02-01'); |
| 23 |
insert into t1 values('09:00:45','09:00:45','2009-01-24'); |
| 24 |
insert into t1 values('09:36:00','09:36:00','2009-01-25'); |
| 25 |
insert into t1 values('10:00:00','10:00:00','2009-01-06'); |
| 26 |
insert into t1 values('10:11:12','10:11:12','2009-01-11'); |
| 27 |
insert into t1 values('10:22:33','10:22:33','2009-01-02'); |
| 28 |
insert into t1 values('11:11:12','11:11:12','2009-01-12'); |
| 29 |
insert into t1 values('11:11:27','11:11:27','2009-01-17'); |
| 30 |
insert into t1 values('12:34:56','12:34:56','2009-01-01'); |
| 31 |
insert into t1 values('12:34:58','12:34:58','2009-01-15'); |
| 32 |
insert into t1 values('12:35:56','12:35:56','2009-01-16'); |
| 33 |
insert into t1 values('491:22:33','491:22:33','2009-01-04'); |
| 34 |
insert into t1 values('825:23:00','825:23:00','2009-01-05'); |
| 35 |
insert into t1 values('838:59:59','838:59:59','2009-01-21'); |
| 36 |
|
| 37 |
SELECT * FROM t1 WHERE c2 <> NULL ORDER BY c2 DESC; |
| 38 |
|
| 39 |
SELECT * FROM t1 WHERE c2 <> NULL ORDER BY c2 DESC LIMIT 2; |
| 40 |
|
| 41 |
drop table t1; |