Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.4(EOL)
-
None
Description
CREATE TABLE t1 (b int); |
INSERT INTO t1 VALUES(1),(2),(3),(4); |
|
CREATE TABLE t2 (b int); |
INSERT INTO t2 VALUES (4),(5),(6),(7); |
|
(select b from t1 UNION select b from t2) limit 1; |
(select b from t1 UNION select b from t2) order by b desc; |
MariaDB [test]> (select b from t1 UNION select b from t2) limit 1;
|
+------+
|
| b |
|
+------+
|
| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
+------+
|
7 rows in set (0.001 sec)
|
|
MariaDB [test]> (select b from t1 UNION select b from t2) order by b desc;
|
+------+
|
| b |
|
+------+
|
| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
+------+
|
7 rows in set (0.001 sec)
|
|
MariaDB [test]> (select b from t1 UNION select b from t2 limit 1);
|
+------+
|
| b |
|
+------+
|
| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
+------+
|
7 rows in set (0.002 sec)
|
expected :
|
MariaDB [test]> select b from t1 UNION select b from t2 limit 1;
|
+------+
|
| b |
|
+------+
|
| 1 |
|
+------+
|
1 row in set (0.001 sec)
|
Attachments
Issue Links
- relates to
-
MDEV-11953 support of brackets (parentheses) in UNION/EXCEPT/INTERSECT operations
-
- Closed
-
-
MDEV-16317 Testing for brackets (parentheses) in UNION/EXCEPT/INTERSECT operations
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue relates to |
Assignee | Oleksandr Byelkin [ sanja ] |
Link |
This issue relates to |
Description |
{code:sql}
CREATE TABLE t1 (b int); INSERT INTO t1 VALUES(1),(2),(3),(4); CREATE TABLE t2 (b int); INSERT INTO t2 VALUES (4),(5),(6),(7); (select b from t1 UNION select b from t2) limit 1; (select b from t1 UNION select b from t2) order by b desc; {code} {noformat} MariaDB [test]> (select b from t1 UNION select b from t2) limit 1; +------+ | b | +------+ | 1 | | 2 | | 3 | | 4 | | 5 | | 6 | | 7 | +------+ 7 rows in set (0.001 sec) MariaDB [test]> (select b from t1 UNION select b from t2) order by b desc; +------+ | b | +------+ | 1 | | 2 | | 3 | | 4 | | 5 | | 6 | | 7 | +------+ 7 rows in set (0.001 sec) {noformat} |
{code:sql}
CREATE TABLE t1 (b int); INSERT INTO t1 VALUES(1),(2),(3),(4); CREATE TABLE t2 (b int); INSERT INTO t2 VALUES (4),(5),(6),(7); (select b from t1 UNION select b from t2) limit 1; (select b from t1 UNION select b from t2) order by b desc; {code} {noformat} MariaDB [test]> (select b from t1 UNION select b from t2) limit 1; +------+ | b | +------+ | 1 | | 2 | | 3 | | 4 | | 5 | | 6 | | 7 | +------+ 7 rows in set (0.001 sec) MariaDB [test]> (select b from t1 UNION select b from t2) order by b desc; +------+ | b | +------+ | 1 | | 2 | | 3 | | 4 | | 5 | | 6 | | 7 | +------+ 7 rows in set (0.001 sec) MariaDB [test]> (select b from t1 UNION select b from t2 limit 1); +------+ | b | +------+ | 1 | | 2 | | 3 | | 4 | | 5 | | 6 | | 7 | +------+ 7 rows in set (0.002 sec) expected : MariaDB [test]> select b from t1 UNION select b from t2 limit 1; +------+ | b | +------+ | 1 | +------+ 1 row in set (0.001 sec) {noformat} |
Assignee | Oleksandr Byelkin [ sanja ] | Igor Babaev [ igor ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Assignee | Igor Babaev [ igor ] | Oleksandr Byelkin [ sanja ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Oleksandr Byelkin [ sanja ] | Igor Babaev [ igor ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Component/s | Parser [ 10201 ] | |
Fix Version/s | 10.4.0 [ 23115 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 87598 ] | MariaDB v4 [ 154455 ] |