Bug #76245 Inserting new rows via GUI crashes workbench
Submitted: 10 Mar 2015 16:32 Modified: 14 Jul 2015 14:47
Reporter: Mike Reid Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:6.3.4 OS:MacOS (10.10.3)
Assigned to: CPU Architecture:Any
Tags: crash, GUI, new row, phantom, result grid, sql editor

[10 Mar 2015 16:32] Mike Reid
Description:
When inserting new rows via the SQL Editor / Result Grid, I have noticed two reoccurring issues:

1. MySQL Workbench crashes after clicking "Apply" (rows still get inserted, however)

2. Phantom rows show up below the newly inserted rows (visible only when Workbench does NOT crash)

Not sure if the two are related, but neither should happen :)

How to repeat:
1. Connect to database, open SQL Editor.

2. Using the GUI (Result Grid), add multiple rows for a schema of your choice.

3. Attempt to insert the new rows by clicking "Apply" button.

4. Watch as either Workbench crashes, or the see the newly inserted rows with "NULL phantom rows" visible beneath the new records.

Suggested fix:
Review insert handling logic to prevent frequent crashing on insert via GUI. Remove previous new row placeholders after successful INSERT (via GUI New Row > "Apply")
[10 Mar 2015 16:33] Mike Reid
Example of "phantom rows" shown beneath newly inserted rows, added via Results Grid / GUI.

Attachment: Phantom_Rows.png (image/png, text), 25.23 KiB.

[10 Mar 2015 16:38] Mike Reid
One step I did not mention:

Prior to adding the new rows via the GUI, write a simple SELECT statement, ordered by PK DESC, and LIMIT 5 (for example.)

Not sure if this matters, but in many cases I am working on an ordered result set, often limited. Also, the latest crash occurred against MySQL 5.6.16.
[11 Mar 2015 0:36] MySQL Verification Team
Call Stack

Attachment: callstack_bug76245.txt (text/plain), 90.99 KiB.

[11 Mar 2015 0:37] MySQL Verification Team
Thank you for the bug report.
[19 Mar 2015 5:32] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 6.3.3 release, and here's the changelog entry:

On OS X, inserting a new row of data via the results grid would either
crash MySQL Workbench after clicking "Apply", or insert the rows along with
additional empty NULL filled rows.

Thank you for the bug report.
[29 Apr 2015 18:13] Mike Reid
I can confirm that as of 6.3.3 GA, this issue is experienced much less... however, the app crash has occurred for me again, during row insertion via the grid.

Accompanying 6.3.3 crash log to follow.
[29 Apr 2015 18:14] Mike Reid
6.3.3 crash log

Attachment: MySQLWorkbench_2015-04-27-144240_bug76245.crash (application/octet-stream, text), 100.88 KiB.

[29 Apr 2015 21:39] MySQL Verification Team
I couldn't repeat with 6.3.3 with my own table, a specific table maybe? are you able to provide the create table statement and 2 insert data command which makes repeatable on your side?. Thanks.
[1 May 2015 21:10] Mike Reid
This happened to me again just now. I will provide you with an example of the schema and the insert statement generated (since inserting via result grid / GUI), as well as associated .crash log (see next post)

NOTE: This does not always happen, I have not found the reproducible steps yet, but perhaps this information can be of assistance. Also, when the crash occurs, the corresponding SQL history is not logged.

### MYSQL VERSION

5.6.16-log (Ubuntu, source compiled)

### TABLE

CREATE TABLE `table_variants` (
  `variant_id` int(10) unsigned NOT NULL,
  `item_id` int(10) unsigned NOT NULL,
  `default` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `field1` varchar(32) NOT NULL DEFAULT '',
  `filed2` varchar(20) NOT NULL DEFAULT '',
  PRIMARY KEY (`variant_id`,`item_id`,`field1`,`filed2`),
  KEY `variant_id` (`variant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

### GENERATED SQL STATEMENT

INSERT INTO `table_variants` (`variant_id`, `item_id`, `default`, `field1`, `filed2`) VALUES ('155', '503', '1', '', '');
[1 May 2015 21:11] Mike Reid
another 6.3.3 crash log (in case helpful)

Attachment: MySQLWorkbench_2015-05-01-145528_bug76245.crash (application/octet-stream, text), 101.11 KiB.

[4 May 2015 18:22] Mike Reid
Updated synopsis to remove reference to the (now fixed) additional empty NULL filled rows. Also, clarifies row insertion via GUI (e.g. result grid)
[16 Jun 2015 23:43] MySQL Verification Team
Please try version 6.3.4. Thanks.
[29 Jun 2015 21:51] Mike Reid
Unfortunately, still experiencing in 6.3.4 as well (see attached .crash log)

Attachment: MySQLWorkbench_2015-06-29-154641_bug76245.crash (application/octet-stream, text), 98.93 KiB.

[29 Jun 2015 21:52] Mike Reid
Updated to reflect impacted version.
[14 Jul 2015 14:47] MySQL Verification Team
This bug report was already processed as closed. Please open a new bug report if you continue with same/related issue. Thanks.