| Bug #25445 | LIMIT returns incorrect result when used with LEFT JOIN, GROUP BY, and DISTINCT | ||
|---|---|---|---|
| Submitted: | 6 Jan 2007 2:44 | Modified: | 6 Jan 2007 3:08 |
| Reporter: | Jared Luxenberg | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S2 (Serious) |
| Version: | 5.0.24a | OS: | Linux (Ubuntu (Debian)) |
| Assigned to: | CPU Architecture: | Any | |
[6 Jan 2007 2:44]
Jared Luxenberg
[6 Jan 2007 3:08]
MySQL Verification Team
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at
http://www.mysql.com/downloads/
mysql> select type, count(distinct(tmp.id)) count from tmp group by type limit 0,2;
+------+-------+
| type | count |
+------+-------+
| bar | 5 |
| foo | 5 |
+------+-------+
2 rows in set (0.05 sec)
mysql> select type, count(distinct(tmp.id)) count from tmp left join tmp_properties tp
-> on tp.id = tmp.type group by type limit 0,2;
+------+-------+
| type | count |
+------+-------+
| bar | 5 |
| foo | 5 |
+------+-------+
2 rows in set (0.06 sec)
mysql> select version();
+---------------------+
| version() |
+---------------------+
| 5.0.27-community-nt |
+---------------------+
1 row in set (0.00 sec)
mysql>
