mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03: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:
@ -80,5 +80,13 @@ select a,b from t1 order by 1 limit 3;
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-16359: union with 3 selects in brackets
|
||||
--echo #
|
||||
|
||||
select 1 union select 1 union select 1;
|
||||
(select 1 union select 1 union select 1);
|
||||
((select 1) union (select 1) union (select 1));
|
||||
|
||||
--echo # End of 10.4 tests
|
||||
|
||||
|
Reference in New Issue
Block a user