diff options
author | Igor Babaev <igor@askmonty.org> | 2019-05-01 18:20:06 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2019-05-01 18:20:06 -0700 |
commit | 2b7e080faece853f463f6f546066d54e1cbc330b (patch) | |
tree | 36357b71d6d2f89839dea44f6ad7927eee02ca30 /mysql-test/main/brackets.test | |
parent | ea679c88c323dc2c79d9b5c05d4dba9671ad62bc (diff) | |
download | mariadb-git-2b7e080faece853f463f6f546066d54e1cbc330b.tar.gz |
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.
Diffstat (limited to 'mysql-test/main/brackets.test')
-rw-r--r-- | mysql-test/main/brackets.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/main/brackets.test b/mysql-test/main/brackets.test index 54f7d2714a1..cf1dcc56acc 100644 --- a/mysql-test/main/brackets.test +++ b/mysql-test/main/brackets.test @@ -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 |