Bug #50822 SQL formatter/beautifier
Submitted: 2 Feb 2010 10:27 Modified: 30 Nov 2010 15:02
Reporter: Roger David Nay Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S4 (Feature request)
Version: OS:Any
Assigned to: Alfredo Kojima CPU Architecture:Any
Tags: beautifier, formatter, SQL statement

[2 Feb 2010 10:27] Roger David Nay
Description:
Currently syntax highlighting is included, which is nice, but it would be great to be able to take a single line of SQL and be able to format so that it's easy to read. 

Splitting a single line up into many lines and using tabbing in conjunction with  colour highlighting. Often done when trying to diagnose long queries.

How to repeat:
N/A

Suggested fix:
Add a feature to beautify or format an SQL statement. Something like highlight the query in the editor and select 'Format' to make it more readable.

Lots of examples of these beautifiers on the web.
[2 Feb 2010 17:18] Johannes Taxacher
Bug #50748 has been marked as duplicate of this one
[20 Nov 2010 22:46] Alfredo Kojima
Thank you for your bug report. This issue has been fixed in the latest released version of that product, which you can download at

  http://www.mysql.com/downloads/
[26 Nov 2010 17:25] Johannes Taxacher
basic functionality added to 5.2.30. (couple of fixes and improvements on that already fixed in repository for upcoming release)
[30 Nov 2010 15:02] Tony Bedford
A 'change' entry has been added to the 5.2.30 changelog:

MySQL Workbench has been changed so that the Query Editor in the SQL editor include a SQL formatter. Code can be highlighted and formatted using the menu item Edit, Format.