Bug #26681 Explain button re-adds "EXPLAIN EXTENDED"
Submitted: 27 Feb 2007 13:57 Modified: 27 Apr 2007 7:34
Reporter: Anthony Willard (Basic Quality Contributor) Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:1.2.9 rc OS:Windows (WinXP, SP2)
Assigned to: CPU Architecture:Any

[27 Feb 2007 13:57] Anthony Willard
Description:
The Explain button re-adds the "EXPLAIN EXTENDED" to a statement when the it is already displayed.

How to repeat:
1) Enter a simple query in the SQL Query Area
2) Click the Explain button.  
3) Click the the 2nd result area that contains the reworked SQL statement, the SQL Query Area shows where the "EXPLAIN EXTENDED" was added to the original statement.
4) Click the Explain button at this point, it prepends "EXPLAIN EXTENDED" again, resulting in an server error.

Suggested fix:
Either disable the button when the revised statement pane is active, or don't prepend the "EXPLAIN EXTENDED" to the statement if it already exists.
[27 Feb 2007 15:57] MySQL Verification Team
Thank you for the bug report.
[27 Apr 2007 7:34] Michael G. Zinner
This is by design, because the Explain feature simply rewrites the query adding the appropriate SQL. If you do it a 2nd time even though the SQL is already there, you will get an inconsistent SQL statement.