summaryrefslogtreecommitdiff
path: root/mysql-test/main/bug39022.result
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2022-01-13 15:53:44 +0300
committerSergei Petrunia <psergey@askmonty.org>2022-01-19 14:04:10 +0300
commit7259b299a5e6fa6d555f3beec53aedc57d9e4491 (patch)
treefbc2ea61cee0c2ba75504bc8c735ad9d7137408a /mysql-test/main/bug39022.result
parentbe8113861c2d12bb0f7048523f886cab53326d8e (diff)
downloadmariadb-git-bb-10.5-mdev27382-v2.tar.gz
MDEV-27382: OFFSET is ignored when combined with DISTINCTbb-10.5-mdev27382-v2
A query in form SELECT DISTINCT expr_that_is_inferred_to_be_const LIMIT 0 OFFSET n produces one row when it should produce none. The issue was in JOIN_TAB::remove_duplicates() in the piece of logic that tried to avoid duplicate removal for such cases but didn't account for possible "LIMIT 0". Fixed by making Select_limit_counters::set_limit() change OFFSET to 0 when LIMIT is 0.
Diffstat (limited to 'mysql-test/main/bug39022.result')
0 files changed, 0 insertions, 0 deletions