Bug #30377 | EXPLAIN loses last_query_cost when used with UNION | ||
---|---|---|---|
Submitted: | 12 Aug 2007 14:20 | Modified: | 23 Oct 2007 16:15 |
Reporter: | Tobias Asplund | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 5.0.45 | OS: | Linux |
Assigned to: | Georgi Kodinov | CPU Architecture: | Any |
[12 Aug 2007 14:20]
Tobias Asplund
[13 Aug 2007 7:31]
Valeriy Kravchuk
Thank you for a bug report. Verified just as described.
[22 Aug 2007 13:41]
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/32874 ChangeSet@1.2501, 2007-08-22 16:41:11+03:00, gkodinov@magare.gmz +4 -0 Bug #30377: EXPLAIN loses last_query_cost when used with UNION Currently the Last_query_cost session status variable shows only the cost of a single flat subselect. For complex queries (with subselects or unions etc) Last_query_cost is not valid as it was showing the cost for the last optimized subselect. Fixed by reseting to zero Last_query_cost when the complete cost of the query cannot be determined. Last_query_cost will be non-zero only for single flat queries.
[28 Aug 2007 15:54]
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/33234 ChangeSet@1.2501, 2007-08-28 18:51:03+03:00, gkodinov@magare.gmz +4 -0 Bug #30377: EXPLAIN loses last_query_cost when used with UNION Currently the Last_query_cost session status variable shows only the cost of a single flat subselect. For complex queries (with subselects or unions etc) Last_query_cost is not valid as it was showing the cost for the last optimized subselect. Fixed by reseting to zero Last_query_cost when the complete cost of the query cannot be determined. Last_query_cost will be non-zero only for single flat queries.
[14 Sep 2007 7:44]
Bugs System
Pushed into 5.1.23-beta
[14 Sep 2007 7:46]
Bugs System
Pushed into 5.0.50
[23 Oct 2007 16:15]
Paul DuBois
Noted in 5.0.50, 5.1.23 changelogs.