union + limit returns wrong result

Bug #732124 reported by Michael Widenius
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
Medium
Michael Widenius

Bug Description

create table t1 (a int);
insert into t1 values (10),(10),(10),(2),(3),(4),(5),(6),(7),(8),(9),(1),(10);
select a from t1 where false UNION select a from t1 limit 8;

->
+------+
| a |
+------+
| 10 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
+------+
6 rows in set

Which is wrong as there should be 8 rows in the result

This only happens with union distinct without order by.

Tags: 5.1

Related branches

Michael Widenius (monty)
Changed in maria:
importance: Undecided → Medium
milestone: none → 5.1
assignee: nobody → Michael Widenius (monty)
status: New → In Progress
Revision history for this message
Michael Widenius (monty) wrote :

Fix pushed into 5.1 trunk

Changed in maria:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.