Bug #74040 Cell contents in Result Grid only wrap on spaces
Submitted: 23 Sep 2014 18:50 Modified: 1 Feb 2018 12:27
Reporter: Sam Abboushi Email Updates:
Status: Verified Impact on me:
Category:MySQL Workbench Severity:S4 (Feature request)
Version:6.3.10 OS:Any
Assigned to: CPU Architecture:Any
Tags: cell wrap, space

[23 Sep 2014 18:50] Sam Abboushi
Cell contents in Result Grid will not wrap unless the cell contains spaces (there may be other characters it will wrap on, but I only tested a few others like "-" and "." which did not result in cell wrapping).

How to repeat:
1) Create a table with 2 columns:

CREATE TABLE `test`.`new_table1` (
  `new_tablecol` VARCHAR(45) NULL,
  PRIMARY KEY (`idnew_table`));

2) Create a row in new_table1:

INSERT INTO `test`.`new_table1` (`new_tablecol`) VALUES ('onetwothreefourfivesixseven');

3) Click "Wrap Cell Contents" button to wrap

4) Resize the cell width to fit "onetwothreefour" only within the cell.

Note that "FiveSixSeven" are truncated in the Result Grid even though "Wrap Cell Contents" is enabled.

5) Click in new_tablecol of Row 1.  Position cursor between after "r" in "Four".  Type a space.  Press TAB key or do something else to move focus from the modified cell.

Note how cell wraps at space resulting in "FiveSixSeven" no longer being truncated in the display but instead appears as line 2 of the cell.

Suggested fix:
Wrap cell contents so that no characters are truncated in a cell when Wrap Cell Contents is enabled. DO NOT change current behavior of wrapping at SPACES; the suggested fix applies only to when a string-which-does-not-contain-any-spaces is wider than the cell display width.

Maybe it would be useful to somehow flag when such a string is "broken" in order to wrap it, but simpler solution might be to add the same "Toggle display of invisible characters" button found in the SQL Query pane to the Result Grid so one could see where the spaces are and aren't.
[1 Feb 2018 12:27] MySQL Verification Team
Thank you for the feature request.