Bug #12000 Whitespace not preserved after carriage return
Submitted: 18 Jul 2005 8:33 Modified: 20 Sep 2005 15:13
Reporter: Stuart Colville Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:1.1.13 OS:Windows (Win 2k)
Assigned to: Vladimir Kolesnikov CPU Architecture:Any

[18 Jul 2005 8:33] Stuart Colville
Description:
When entering a carriage return halfway through a query on the first line, the whitespace is removed from the top line rendering the query invalid.

How to repeat:
1. Enter a query:

SELECT * FROM table

2. Hit enter halfway through line

SELECT * <hit enter here

3. The display shows the following: 

SELECT *
FROM Table

However running this query produces an error.

4. If you put the cursor at the beginning of line two in the query browser and press backspace, the line then reads:

SELECT *FROM Table

Suggested fix:
Don't remove whitespace when carriage returns are entered.
[18 Jul 2005 8:42] Stuart Colville
Strangely if you try the above with a query like this:

SELECT * FROM table t LEFT JOIN secondtable s ON t.columnid = s.columnid

If you hit return just before the capital L of "LEFT" (to put the query onto two lines) the query still runs but if you investigate there is no whitespace after "table t".
[20 Sep 2005 15:13] Vladimir Kolesnikov
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html