mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
5.1-bugteam->trunk-merge merge
This commit is contained in:
@ -707,6 +707,36 @@ AND f5 = 'abcdefghijklmnopwrst' AND f2 = 1221457 AND f4 = 0 ;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#51431 Wrong sort order after import of dump file
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (
|
||||
f1 INT(11) NOT NULL,
|
||||
f2 int(11) NOT NULL,
|
||||
f3 int(11) NOT NULL,
|
||||
f4 tinyint(1) NOT NULL,
|
||||
PRIMARY KEY (f1),
|
||||
UNIQUE KEY (f2, f3),
|
||||
KEY (f4)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t1 VALUES
|
||||
(1,1,991,1), (2,1,992,1), (3,1,993,1), (4,1,994,1), (5,1,995,1),
|
||||
(6,1,996,1), (7,1,997,1), (8,1,998,1), (10,1,999,1), (11,1,9910,1),
|
||||
(16,1,9911,1), (17,1,9912,1), (18,1,9913,1), (19,1,9914,1), (20,1,9915,1),
|
||||
(21,1,9916,1), (22,1,9917,1), (23,1,9918,1), (24,1,9919,1), (25,1,9920,1),
|
||||
(26,1,9921,1), (27,1,9922,1);
|
||||
|
||||
FLUSH TABLES;
|
||||
|
||||
SELECT * FROM t1 WHERE f2 = 1 AND f4 = TRUE
|
||||
ORDER BY f1 DESC LIMIT 5;
|
||||
EXPLAIN SELECT * FROM t1 WHERE f2 = 1 AND f4 = TRUE
|
||||
ORDER BY f1 DESC LIMIT 5;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user