mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
MDEV-16359 wrong result (extra rows) on the query with UNION and brackets
Due to an obvious bug in st_select_lex_unit::reset_distinct() a union without duplicates of more than 2 selects could return a result set containing duplicate rows if this union was enclosed in ().
This commit is contained in:
parent
980aa3e71d
commit
0f9efd54ce
3 changed files with 20 additions and 1 deletions
|
|
@ -207,4 +207,16 @@ a b
|
|||
1 100
|
||||
3 30
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-16359: union with 3 selects in brackets
|
||||
#
|
||||
select 1 union select 1 union select 1;
|
||||
1
|
||||
1
|
||||
(select 1 union select 1 union select 1);
|
||||
1
|
||||
1
|
||||
((select 1) union (select 1) union (select 1));
|
||||
1
|
||||
1
|
||||
# End of 10.4 tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue