Bug #61021 Beautify query removes space around time interval
Submitted: 2 May 2011 7:43 Modified: 2 Feb 2012 23:57
Reporter: Matthias Maier Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.33 OS:Any
Assigned to: CPU Architecture:Any
Tags: beautify query space interval

[2 May 2011 7:43] Matthias Maier
Description:
When using the command Beautify Query [CTRL+B], it removes the spaces around time interval in functions like date_add().

How to repeat:
Use any query like:
SELECT DATE_ADD(CURDATE(), INTERVAL 7 DAY);
SELECT TIMESTAMP(CURDATE()+ INTERVAL 1 SECOND);
SELECT DATE_ADD(CURDATE(), INTERVAL '-1 10' DAY_HOUR);

Will result in:
SELECT DATE_ADD(CURDATE(), INTERVAL7DAY);
SELECT TIMESTAMP(CURDATE()+ INTERVAL 1SECOND);
SELECT 
    DATE_ADD(CURDATE(),
        INTERVAL'-1 10'DAY_HOUR)
;
[2 May 2011 8:00] Valeriy Kravchuk
Thank you for the bug report.
[2 Feb 2012 23:57] Philip Olson
Fixed as of 5.2.38:

The "Beautify Query" wizard would remove spaces
from MySQL date function parameter values that contain "INTERVAL".