diff options
| author | Igor Babaev <igor@askmonty.org> | 2018-08-03 23:27:24 -0700 |
|---|---|---|
| committer | Igor Babaev <igor@askmonty.org> | 2018-08-03 23:27:24 -0700 |
| commit | 0f9efd54ceb0e2b42841f5eb15d30072d210bac2 (patch) | |
| tree | 6d6fd9d1dd2d1b12ce8ef0dc59c1c2866760e848 /mysql-test/main/brackets.test | |
| parent | 980aa3e71dfe0284ae8acb3e22852f29aaebd0bd (diff) | |
| download | mariadb-git-0f9efd54ceb0e2b42841f5eb15d30072d210bac2.tar.gz | |
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 ().
Diffstat (limited to 'mysql-test/main/brackets.test')
| -rw-r--r-- | mysql-test/main/brackets.test | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/main/brackets.test b/mysql-test/main/brackets.test index ac22770ffc2..699c70a900f 100644 --- a/mysql-test/main/brackets.test +++ b/mysql-test/main/brackets.test @@ -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 |
