Bug #18237 | COUNT(*) on view returns different results than base table | ||
---|---|---|---|
Submitted: | 14 Mar 2006 19:01 | Modified: | 11 Apr 2006 13:26 |
Reporter: | Kolbe Kegel | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Views | Severity: | S2 (Serious) |
Version: | 5.0.19 | OS: | Linux (Linux) |
Assigned to: | Igor Babaev | CPU Architecture: | Any |
[14 Mar 2006 19:01]
Kolbe Kegel
[4 Apr 2006 19:55]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/4459
[8 Apr 2006 17:13]
Igor Babaev
ChangeSet 1.2138 06/04/04 12:55:02 igor@rurik.mysql.com +3 -0 Fixed bug #18237. The code in opt_sum_query that prevented the COUNT/MIN/MAX optimization from being applied to outer joins was not adjusted after introducing nested joins. As a result if an outer join contained a reference to a view as an inner table the code of opt_sum_query missed the presence of an on expressions and erroneously applied the mentioned optimization. The fix will appear in 5.0.21. It was merged into 5.1
[11 Apr 2006 13:26]
Paul DuBois
Noted in 5.0.21, 5.1.9 changelog. <literal>COUNT(*)</literal> on a <literal>MyISAM</literal> table could return different results for the base table and a view on the base table. (Bug #18237)