mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-32612 Assertion `tab->select->quick' failed in test_if_skip_sort_order
Fixup for MDEV-31983, incorrect test for checking ability to use quick select. Approved by Sergei Petrunia
This commit is contained in:
@@ -2699,6 +2699,19 @@ INSERT INTO t3 VALUES ('2012-11-11',5),('2012-12-12',6);
|
|||||||
UPDATE t1, t2 SET t1.a = 26 WHERE t2.b IN (SELECT MIN(d) FROM t3 WHERE c >= '2012-01');
|
UPDATE t1, t2 SET t1.a = 26 WHERE t2.b IN (SELECT MIN(d) FROM t3 WHERE c >= '2012-01');
|
||||||
ERROR 22007: Incorrect datetime value: '2012-01' for column `test`.`t3`.`c` at row 1
|
ERROR 22007: Incorrect datetime value: '2012-01' for column `test`.`t3`.`c` at row 1
|
||||||
DROP TABLE t1, t2, t3;
|
DROP TABLE t1, t2, t3;
|
||||||
|
#
|
||||||
|
# MDEV-32612 Assertion `tab->select->quick' failed in test_if_skip_sort_order
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (l_orderkey int, l_linenumber int, l_quantity double,
|
||||||
|
PRIMARY KEY (l_orderkey,l_linenumber), KEY (l_orderkey),
|
||||||
|
KEY (l_orderkey,l_quantity)) engine=MyISAM;
|
||||||
|
INSERT INTO t1 VALUES (290,1,35),(290,2,2);
|
||||||
|
SELECT * FROM t1
|
||||||
|
WHERE l_quantity = 31
|
||||||
|
AND (l_quantity = 50 OR l_orderkey = 41)
|
||||||
|
ORDER BY l_orderkey, l_linenumber;
|
||||||
|
l_orderkey l_linenumber l_quantity
|
||||||
|
DROP TABLE t1;
|
||||||
# end of 10.6 tests
|
# end of 10.6 tests
|
||||||
set @subselect_mat_test_optimizer_switch_value=null;
|
set @subselect_mat_test_optimizer_switch_value=null;
|
||||||
set @@optimizer_switch='materialization=on,in_to_exists=off,semijoin=off';
|
set @@optimizer_switch='materialization=on,in_to_exists=off,semijoin=off';
|
||||||
|
@@ -2741,4 +2741,17 @@ INSERT INTO t3 VALUES ('2012-11-11',5),('2012-12-12',6);
|
|||||||
UPDATE t1, t2 SET t1.a = 26 WHERE t2.b IN (SELECT MIN(d) FROM t3 WHERE c >= '2012-01');
|
UPDATE t1, t2 SET t1.a = 26 WHERE t2.b IN (SELECT MIN(d) FROM t3 WHERE c >= '2012-01');
|
||||||
ERROR 22007: Incorrect datetime value: '2012-01' for column `test`.`t3`.`c` at row 1
|
ERROR 22007: Incorrect datetime value: '2012-01' for column `test`.`t3`.`c` at row 1
|
||||||
DROP TABLE t1, t2, t3;
|
DROP TABLE t1, t2, t3;
|
||||||
|
#
|
||||||
|
# MDEV-32612 Assertion `tab->select->quick' failed in test_if_skip_sort_order
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (l_orderkey int, l_linenumber int, l_quantity double,
|
||||||
|
PRIMARY KEY (l_orderkey,l_linenumber), KEY (l_orderkey),
|
||||||
|
KEY (l_orderkey,l_quantity)) engine=MyISAM;
|
||||||
|
INSERT INTO t1 VALUES (290,1,35),(290,2,2);
|
||||||
|
SELECT * FROM t1
|
||||||
|
WHERE l_quantity = 31
|
||||||
|
AND (l_quantity = 50 OR l_orderkey = 41)
|
||||||
|
ORDER BY l_orderkey, l_linenumber;
|
||||||
|
l_orderkey l_linenumber l_quantity
|
||||||
|
DROP TABLE t1;
|
||||||
# end of 10.6 tests
|
# end of 10.6 tests
|
||||||
|
@@ -2436,4 +2436,18 @@ UPDATE t1, t2 SET t1.a = 26 WHERE t2.b IN (SELECT MIN(d) FROM t3 WHERE c >= '201
|
|||||||
# Cleanup
|
# Cleanup
|
||||||
DROP TABLE t1, t2, t3;
|
DROP TABLE t1, t2, t3;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-32612 Assertion `tab->select->quick' failed in test_if_skip_sort_order
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (l_orderkey int, l_linenumber int, l_quantity double,
|
||||||
|
PRIMARY KEY (l_orderkey,l_linenumber), KEY (l_orderkey),
|
||||||
|
KEY (l_orderkey,l_quantity)) engine=MyISAM;
|
||||||
|
INSERT INTO t1 VALUES (290,1,35),(290,2,2);
|
||||||
|
SELECT * FROM t1
|
||||||
|
WHERE l_quantity = 31
|
||||||
|
AND (l_quantity = 50 OR l_orderkey = 41)
|
||||||
|
ORDER BY l_orderkey, l_linenumber;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo # end of 10.6 tests
|
--echo # end of 10.6 tests
|
||||||
|
@@ -24750,14 +24750,14 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
|
|||||||
tab->join->unit->
|
tab->join->unit->
|
||||||
lim.get_select_limit(),
|
lim.get_select_limit(),
|
||||||
TRUE, TRUE, FALSE, FALSE);
|
TRUE, TRUE, FALSE, FALSE);
|
||||||
if (res != SQL_SELECT::OK)
|
// if we cannot use quick select
|
||||||
|
if (res != SQL_SELECT::OK || !tab->select->quick)
|
||||||
{
|
{
|
||||||
if (res == SQL_SELECT::ERROR)
|
if (res == SQL_SELECT::ERROR)
|
||||||
*fatal_error= true;
|
*fatal_error= true;
|
||||||
select->cond= save_cond;
|
select->cond= save_cond;
|
||||||
goto use_filesort;
|
goto use_filesort;
|
||||||
}
|
}
|
||||||
DBUG_ASSERT(tab->select->quick);
|
|
||||||
tab->type= JT_ALL;
|
tab->type= JT_ALL;
|
||||||
tab->ref.key= -1;
|
tab->ref.key= -1;
|
||||||
tab->ref.key_parts= 0;
|
tab->ref.key_parts= 0;
|
||||||
|
Reference in New Issue
Block a user