Bug #70519 Workbench omitting new lines
Submitted: 4 Oct 2013 9:04 Modified: 11 Feb 2014 9:20
Reporter: Marcelo Altmann (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:6.0.6, 6.0.7 OS:Any (Win7(64bit), Mac)
Assigned to: CPU Architecture:Any

[4 Oct 2013 9:04] Marcelo Altmann
Description:
When working with MySQL Workbench SQL editor it does not display new lines characters of rows, instead it display everything in the same line. if you make any update on it, those characters will be lost.

How to repeat:
open mysql command line tool:

mysql [localhost] {root} (test_nl) > CREATE TABLE nl(id INT AUTO_INCREMENT, txt text, PRIMARY KEY(id));
Query OK, 0 rows affected (0.06 sec)

mysql [localhost] {root} (test_nl) > INSERT INTO nl SET txt='this
is
a
text
with
new
lines
';
Query OK, 1 row affected (0.00 sec)

mysql [localhost] {root} (test_nl) > SELECT * FROM nl;
+----+--------------------------------+
| id | txt                            |
+----+--------------------------------+
|  1 | this
is
a
text
with
new
lines
 | 
+----+--------------------------------+
1 row in set (0.00 sec)

Go to MySQL Workbench.
Type SELECT * FROM nl;
Run the query.
Go to result set and change anything on this entry (I will change lower case this to upper case THIS).
Apply your changes.
Then select it again on mysql command line tool:

mysql [localhost] {root} (test_nl) > SELECT * FROM nl;
+----+--------------------------------+
| id | txt                            |
+----+--------------------------------+
|  1 | THIS is a text with new lines  | 
+----+--------------------------------+
1 row in set (0.00 sec)

Suggested fix:
Display and preserve new lines character on Workbench.
[4 Oct 2013 9:48] MySQL Verification Team
Hello Marcelo,

Thank you for the bug report.
Verified as described.

Thanks,
Umesh
[11 Feb 2014 9:20] Philip Olson
Fixed as of the upcoming MySQL Workbench 6.1.2 release, and here's the changelog entry:

The SQL editor could lose newline characters. The new forms editor is
useful for this type of input, as the newlines are preserved.

Thank you for the bug report.