Bug #58850 sql-editor has problems interpreting and loading text
Submitted: 9 Dec 2010 22:12 Modified: 6 Jan 2011 10:46
Reporter: Håkan Elmqvist Email Updates:
Status: Closed Impact on me:
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:5.2.31 OS:Windows (7)
Assigned to: Alfredo Kojima CPU Architecture:Any
Tags: regression, sql-editor, sql-file

[9 Dec 2010 22:12] Håkan Elmqvist
An example of the behaviour is:
I have the cursor on the following line in the sql-editor:

select timestamp, levelc, levelprognosis, levelestimate, skovelc from su.el where timestamp>'2010-11-25' order by timestamp desc;

Pressing ctrl-enter I get an error 1064 and in the action window I can see:


(this is a fragment of text somewhere else in the editor) 
It seems that the sql-editor has problems interpreting the text. Loading a sql-file the sql-editor inserts new empty lines between each line of original text.

A similar problem surfaced in an earlier workbench version but disappeared in 5.2.28 and has now reappeared in 5.2.31. 

How to repeat:
see above
[10 Dec 2010 13:44] Alfredo Kojima
Can you upload the script file that shows the problem?
[10 Dec 2010 16:03] Håkan Elmqvist
example sql-file

Attachment: sundsvik.sql (application/octet-stream, text), 2.40 KiB.

[11 Dec 2010 9:53] Håkan Elmqvist
In a text editor my sql-file has 43 rows in sql-editor it shows 85 rows.
When I in sql-editor do ctrl-A, ctrl-C and paste into a text editor I get a file identical with the original with 43 rows.
[11 Dec 2010 10:20] Håkan Elmqvist
unix format

Attachment: unix.sql (application/octet-stream, text), 80 bytes.

[11 Dec 2010 10:20] Håkan Elmqvist
dos format

Attachment: dos.sql (application/octet-stream, text), 88 bytes.

[11 Dec 2010 10:24] Håkan Elmqvist
Problems seems to have something to do with file format, pls compare the behaviour of the two supplied files.
[13 Dec 2010 13:12] Johannes Taxacher
fix confirmed in repositories
[6 Jan 2011 10:46] Tony Bedford
An entry has been added to the 5.2.31a and 5.2.32 changelogs:

SQL Editor did not load certain text files correctly, and inserted erroneous empty lines between text.