mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-31237 Assertion `!(tab->select && tab->select->quick)' failed in make_join_readinfo
The problem was a wrong assert. I changed it to match the code in best_access_path(). The given test case was a bit tricky for the optimizer, which first decided on using a index scan (because of force index), but then test_if_skip_sort_order() decided to use range anyway to handle distinct.
This commit is contained in:
@ -2602,6 +2602,18 @@ WHERE (b > 'TX' OR b BETWEEN 'NE' AND 'SC') AND id IN (1,7,8) AND a = 5
|
||||
GROUP BY id;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-31237 Assertion `!(tab->select && tab->select->quick)' failed
|
||||
--echo # in make_join_readinfo
|
||||
--echo #
|
||||
|
||||
CREATE TABLE lineitem (l_orderkey int, l_linenumber int, l_receiptDATE date DEFAULT NULL, PRIMARY KEY (l_orderkey,l_linenumber), KEY i_l_receiptdate (l_receiptDATE), KEY i_l_orderkey (l_orderkey)) ENGINE=InnoDB;
|
||||
INSERT INTO lineitem VALUES (291,1,'1994-06-23'),(291,2,'1994-06-19'),
|
||||
(291,3,'1994-03-24'),(292,1,'1992-03-18'),(292,2,'1992-04-20');
|
||||
EXPLAIN SELECT DISTINCT l_orderkey FROM lineitem FORCE KEY (i_l_orderkey, i_l_receiptdate) WHERE l_orderkey > 1 ORDER BY l_receiptdate;
|
||||
SELECT DISTINCT l_orderkey FROM lineitem FORCE KEY (i_l_orderkey, i_l_receiptdate) WHERE l_orderkey > 1 ORDER BY l_receiptdate;
|
||||
DROP TABLE lineitem;
|
||||
|
||||
--echo #
|
||||
--echo # End of 11.0 tests
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user