Bug #61944 Crash in Workbench when running a query in SQL editor
Submitted: 21 Jul 2011 15:12 Modified: 21 Aug 2011 16:17
Reporter: Fernando Gonzalez.Sanchez Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.34 OS:Any
Assigned to: CPU Architecture:Any

[21 Jul 2011 15:12] Fernando Gonzalez.Sanchez
Description:
When running a query the workbech crashed.

Non critical, since WB still works

How to repeat:
First I was using WB against MySQL 5.5.13 to get the schema & table creation script for a db (using send to sql editor context menu), then without closing WB, shutdown 5.5.13, launched MySQL 5.1.17

Rerun the scripts generated, highlighted and ran a single line

select * from `a`

and WB crashed.

NOTE: apart from this, I am not sure how to reproduce, since the WB didn't close itself, I tried running the same query again and worked.

Full script follows:

delimiter $$

CREATE DATABASE `abcd` /*!40100 DEFAULT CHARACTER SET utf8 */$$

use abcd;

delimiter $$

CREATE TABLE `a` (
  `idA` int(11) NOT NULL,
  `col1` varchar(45) DEFAULT NULL,
  `col2` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`idA`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8$$

delimiter $$

CREATE TABLE `a2` (
  `idA` int(11) NOT NULL,
  `col3` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`idA`),
  KEY `fk_A2_A1` (`idA`),
  CONSTRAINT `fk_A2_A1` FOREIGN KEY (`idA`) REFERENCES `a` (`idA`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8$$

delimiter $$

CREATE TABLE `b` (
  `idB` int(11) NOT NULL,
  `idA` int(11) NOT NULL,
  `colB` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`idB`),
  KEY `fk_B_A` (`idA`),
  CONSTRAINT `fk_B_A` FOREIGN KEY (`idA`) REFERENCES `a` (`idA`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8$$

INSERT INTO abcd.a VALUES (1, 'aaaa', '111111');
INSERT INTO abcd.a2 VALUES (1, 'a3');
INSERT INTO abcd.b VALUES (1, 1, 'bbbb');
INSERT INTO abcd.a VALUES (2, 'aaaa', '22222');

select * from `a`

Suggested fix:
Fix the minor crash.

Suggestion: maybe in the crash bug report window, would be useful to show more debug info, to include in these kind of reports.
[21 Jul 2011 16:17] Valeriy Kravchuk
If you'll ever get this crash again, please, right click somewhere in the error dialog box with no text and use Copy stack trace to clipboard context menu item. Send stack trace to this report.
[21 Aug 2011 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".