mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-19363 Assertion `select_lex' failed in LEX::pop_select
This patch corrects the patch for MDEV-19324. The latter did not work properly in the cases when the transformation (SELECT ... ORDER BY ...) LIMIT ... => SELECT ... ORDER BY ... LIMIT ... was applied to the operands of a set operation.
This commit is contained in:
@ -139,5 +139,20 @@ eval explain format=json $q2;
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-19363: ((SELECT ...) ORDER BY col ) LIMIT n UNION ...
|
||||
--echo #
|
||||
|
||||
create table t1 (pk int);
|
||||
insert into t1 values (5),(4),(1),(2),(3);
|
||||
|
||||
let $q=
|
||||
((select * from t1 order by pk) limit 2) union (select * from t1 where pk > 4);
|
||||
eval $q;
|
||||
eval explain extended $q;
|
||||
eval explain format=json $q;
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo # End of 10.4 tests
|
||||
|
||||
|
Reference in New Issue
Block a user