Bug #58361 Query formatter mangles query when CASE operator is used

Submitted: 21 Nov 2010 15:17 Modified: 25 Nov 2010 16:47
Reporter: Giuseppe Maxia Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:5.2.30 OS:MacOS (10.5.6, 10.6.5)
Assigned to: Alfredo Kojima CPU Architecture:Any

[21 Nov 2010 15:17] Giuseppe Maxia
Description:
A query containing a CASE operator is mangled by the query formatter.
For example:

"select case when @@server_id > 1 then 1 else 0 end from t1 "

becomes

"select 
        casewhen@@server_id > 1then1else0end
    from
        t1
"

How to repeat:
1. open the SQL editor
2. write down this query "select case when @@server_id > 1 then 1 else 0 end from t1"
3. invoke the query formatter/beautifier
[21 Nov 2010 18:11] Valeriy Kravchuk
Thank you for the bug report.
[24 Nov 2010 15:37] Johannes Taxacher
fix confirmed in repository
[25 Nov 2010 16:47] Tony Bedford
An entry has been added to the 5.2.31 changelog:

In the SQL Editor, a query containing a CASE keyword was not handled correctly by the query formatter.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.068 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.