1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Backported the test case for bug 43617 fixed by the patch for bug 42580.

Backported the test case for bug 49906 fixed by the patch for LP bug 625841.
Slightly optimized the code of the fix for LP bug 625841.
This commit is contained in:
Igor Babaev
2011-05-27 15:20:19 -07:00
parent deb3b9a174
commit d86ad1861a
7 changed files with 287 additions and 6 deletions

View File

@ -86,6 +86,78 @@ SELECT * FROM t1 WHERE c2 <=> NULL ORDER BY c1,c2 LIMIT 2;
--echo
DROP TABLE t1;
--echo #
--echo # Bug#43617 - Innodb returns wrong results with timestamp's range value
--echo # in IN clause
--echo # (Note: Fixed by patch for BUG#42580)
--echo #
CREATE TABLE t1(
c1 TIMESTAMP NOT NULL,
c2 TIMESTAMP NULL,
c3 DATE,
c4 DATETIME,
PRIMARY KEY(c1),
UNIQUE INDEX(c2)
);
INSERT INTO t1 VALUES
('0000-00-00 00:00:00','0000-00-00 00:00:00','2008-01-04','2008-01-05 00:00:00'),
('1971-01-01 00:00:01','1980-01-01 00:00:01','2009-01-01','2009-01-02 00:00:00'),
('1999-01-01 00:00:00','1999-01-01 00:00:00', NULL, NULL),
('2007-05-23 09:15:28','2007-05-23 09:15:28','2007-05-24','2007-05-24 09:15:28'),
('2007-05-27 00:00:00','2007-05-25 00:00:00','2007-05-26','2007-05-26 00:00:00'),
('2008-01-01 00:00:00', NULL, '2008-01-02','2008-01-03 00:00:00'),
('2009-01-29 11:11:27','2009-01-29 11:11:27','2009-01-29','2009-01-29 11:11:27'),
('2038-01-09 03:14:07','2038-01-09 03:14:07','2009-01-05','2009-01-06 00:00:00');
--echo
SELECT *
FROM t1
WHERE c2 IN ('1971-01-01 00:00:01','2038-01-09 03:14:07')
ORDER BY c2;
--echo
SELECT *
FROM t1
WHERE c2 IN ('1971-01-01 00:00:01','2038-01-09 03:14:07')
ORDER BY c2 LIMIT 2;
--echo
SELECT *
FROM t1
WHERE c2 IN ('1971-01-01 00:00:01','2038-01-09 03:14:07')
ORDER BY c2 DESC;
--echo
SELECT *
FROM t1
WHERE c2 IN ('1971-01-01 00:00:01','2038-01-09 03:14:07')
ORDER BY c2 DESC LIMIT 2;
--echo
DROP TABLE t1;
--echo #
--echo # BUG#49906: Assertion failed - Field_varstring::val_str in field.cc
--echo # (Note: Fixed by patch for LP BUG#625841)
--echo #
CREATE TABLE t1 (
f1 VARCHAR(1024),
f2 VARCHAR(10),
INDEX test_idx USING BTREE (f2,f1(5))
);
INSERT INTO t1 VALUES ('a','c'), ('b','d');
SELECT f1
FROM t1
WHERE f2 LIKE 'd'
ORDER BY f1;
DROP TABLE t1;
--echo #
--echo # Bug#40992 - InnoDB: Crash when engine_condition_pushdown is on
--echo #
@ -102,6 +174,7 @@ SELECT * FROM t WHERE a > 2 FOR UPDATE;
DROP TABLE t;
--echo #
--echo # Bug#35080 - Innodb crash at mem_block_get_len line 72
--echo #