mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
mysql-5.5 merge
This commit is contained in:
@ -204,4 +204,30 @@ SELECT BIT_XOR(t1.b) FROM t1 JOIN t2 ON t1.c=t2.c WHERE t1.pk=1;
|
||||
BIT_XOR(t1.b)
|
||||
0
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug#12713907: STRANGE OPTIMIZE & WRONG RESULT UNDER ORDER BY
|
||||
# COUNT(*) LIMIT.
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
id BIGINT(20) ,
|
||||
member_id_to INT(11) ,
|
||||
r_date DATE ,
|
||||
PRIMARY KEY (id,r_date),
|
||||
KEY r_date_idx (r_date),
|
||||
KEY t1_idx01 (member_id_to)
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES
|
||||
(107924526,518491,'2011-05-01'),
|
||||
(107924527,518491,'2011-05-01'),
|
||||
(107924534,518491,'2011-06-21'),
|
||||
(107924535,518491,'2011-06-21'),
|
||||
(107924542,1601319,'2011-06-21'),
|
||||
(107924543,1601319,'2011-06-21'),
|
||||
(107924544,1601319,'2011-06-21'),
|
||||
(107924545,1601319,'2011-06-21');
|
||||
SELECT member_id_to, COUNT(*) FROM t1 WHERE r_date =
|
||||
'2011-06-21' GROUP BY member_id_to ORDER BY 2 LIMIT 1;
|
||||
member_id_to COUNT(*)
|
||||
518491 2
|
||||
DROP TABLE t1;
|
||||
End of 5.5 tests
|
||||
|
Reference in New Issue
Block a user