/usr/lib/mysql-testsuite/t/bug57430.test is in percona-server-test-5.6 5.6.22-rel71.0-0ubuntu4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 | #
# Test for http://bugs.mysql.com/bug.php?id=57430.
#
--source include/have_innodb.inc
CREATE TABLE t2970 (a INT, b INT, c INT, d INT, KEY(a), KEY(a, b)) ENGINE=InnoDB;
INSERT INTO t2970 VALUES (1,1,1,1), (1,2,3,4);
# With the bug present the server will choose KEY(a) over KEY(a, b), because they have the same
# row estimate count and its definition comes first, while the second key should be chosen
# because it's covering.
--query_vertical EXPLAIN SELECT a, COUNT(b), MAX(b) FROM t2970 WHERE a > 0 GROUP BY a ORDER BY a;
DROP TABLE t2970;
|