diff options
author | Georgi Kodinov <joro@sun.com> | 2009-07-07 15:52:34 +0300 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-07-07 15:52:34 +0300 |
commit | 33380cf0b780cfa2e7f2b2aac7e2ccaa56156cfa (patch) | |
tree | e660e9a45760423b72f8951702a83f487559eda9 /mysql-test/include/mix1.inc | |
parent | 5ff7e351299d6bf6f0b93d560215610b07746ccd (diff) | |
download | mariadb-git-33380cf0b780cfa2e7f2b2aac7e2ccaa56156cfa.tar.gz |
Bug #36259 (Optimizing with ORDER BY) and bug#45828 (Optimizer won't
use partial primary key if another index can prevent filesort
The fix for bug #28404 causes the covering ordering indexes to be
preferred unconditionally over non-covering and ref indexes.
Fixed by comparing the cost of using a covering index to the cost of
using a ref index even for covering ordering indexes.
Added an assertion to clarify the condition the local variables should
be in.
mysql-test/include/mix1.inc:
Bug #36259: fixed a non-stable test case
mysql-test/r/innodb_mysql.result:
Bug #36259 and #45828 : test case
mysql-test/t/innodb_mysql.test:
Bug #36259 and #45828 : test case
sql/sql_select.cc:
Bug #36259 and #45828 : don't consider covering indexes supperior to
ref keys.
Diffstat (limited to 'mysql-test/include/mix1.inc')
-rw-r--r-- | mysql-test/include/mix1.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc index 3f7b44bd9ef..19a327d079e 100644 --- a/mysql-test/include/mix1.inc +++ b/mysql-test/include/mix1.inc @@ -1498,9 +1498,9 @@ INSERT INTO t1 VALUES (4,1,3,'pk',NULL),(5,1,3,'c2',NULL), (2,1,4,'c_extra',NULL),(3,1,4,'c_extra',NULL); -EXPLAIN SELECT * FROM t1 WHERE tid = 1 AND vid = 3 ORDER BY idx DESC; +EXPLAIN SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE tid = 1 AND vid = 3 ORDER BY idx DESC; -SELECT * FROM t1 WHERE tid = 1 AND vid = 3 ORDER BY idx DESC; +SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE tid = 1 AND vid = 3 ORDER BY idx DESC; DROP TABLE t1; |