diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-10-04 16:46:41 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-10-09 08:55:00 +0200 |
commit | b7408be0c3a4027b505f6122306c8d88ad0e92b2 (patch) | |
tree | 91eedd8f341d730b7b5567ef766af733607cf90b /storage/sequence | |
parent | b1ac1742791ad72695f76cab27e45b3f37cc39bc (diff) | |
download | mariadb-git-b7408be0c3a4027b505f6122306c8d88ad0e92b2.tar.gz |
MDEV-20753: Sequence with limit 0 crashes server
Do not try to push down conditions to engine if query was resolved without tables (and so the engine).
Diffstat (limited to 'storage/sequence')
-rw-r--r-- | storage/sequence/mysql-test/sequence/group_by.result | 6 | ||||
-rw-r--r-- | storage/sequence/mysql-test/sequence/group_by.test | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/storage/sequence/mysql-test/sequence/group_by.result b/storage/sequence/mysql-test/sequence/group_by.result index 2941e85c1f4..7902fe6a348 100644 --- a/storage/sequence/mysql-test/sequence/group_by.result +++ b/storage/sequence/mysql-test/sequence/group_by.result @@ -97,3 +97,9 @@ count(NULL) select count(NULL) from seq_1_to_3; count(NULL) 0 +# +# MDEV-20753: Sequence with limit 0 crashes server +# +select count(NULL) from seq_1_to_3 limit 0; +count(NULL) +# End of 10.3 tests diff --git a/storage/sequence/mysql-test/sequence/group_by.test b/storage/sequence/mysql-test/sequence/group_by.test index b3f4ab58771..18e44cd2ab1 100644 --- a/storage/sequence/mysql-test/sequence/group_by.test +++ b/storage/sequence/mysql-test/sequence/group_by.test @@ -49,3 +49,10 @@ explain select count(*) from seq_1_to_15_step_2 group by mod(seq,2); create temporary table t1 select * from seq_1_to_3; select count(NULL) from t1; select count(NULL) from seq_1_to_3; + +--echo # +--echo # MDEV-20753: Sequence with limit 0 crashes server +--echo # +select count(NULL) from seq_1_to_3 limit 0; + +--echo # End of 10.3 tests |