Bug #64435 A query which crash the Workbench
Submitted: 23 Feb 2012 13:56 Modified: 26 Mar 2012 4:11
Reporter: Csaba Bukor Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.37 OS:Windows
Assigned to: Juan Rene Ramirez Monarrez CPU Architecture:Any

[23 Feb 2012 13:56] Csaba Bukor
Description:
We have a table in the database:
CREATE TABLE `kep_ertekeles_tipus` (
  `ErtekelesID` smallint(6) unsigned NOT NULL,
  `Tipus` tinyint(3) unsigned NOT NULL COMMENT '0: Nem megfelelt, 1:Megfelelt',
  `Alapertelmezett` tinyint(3) unsigned NOT NULL COMMENT 'A tipuson belül melyik a default',
  `Nev` varchar(128) NOT NULL,
  `Feladat` tinyint(3) unsigned NOT NULL COMMENT '0: Nem kell feladatot generálni, 1: Kell generálni',
  `FeladatSzoveg` varchar(512) DEFAULT NULL,
  `FeladatNev` varchar(256) DEFAULT NULL,
  `last_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `vDatum` datetime DEFAULT NULL,
  PRIMARY KEY (`ErtekelesID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

If we try to run the following query Workbench crash immediately:
select ifnull(max(ErtekelesID), 0)+1 from kep_ertekeles_tipus;

How to repeat:
Try to execute the following query:
select ifnull(max(ErtekelesID), 0)+1 from kep_ertekeles_tipus;
[23 Feb 2012 15:16] Valeriy Kravchuk
Thank you for the bug report. Verified on 32-bit Windows XP.
[23 Feb 2012 17:45] Juan Rene Ramirez Monarrez
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.
[23 Feb 2012 17:47] Juan Rene Ramirez Monarrez
Some fixes were done to the editable select validation that now prevent crashes like the one described here, the fix is available in 5.2.38

Thanks for submitting the bug report!
[26 Mar 2012 4:11] Philip Olson
Fixed as of 5.2.39:

SELECT queries could crash Workbench during
the validation stage of the SQL Editor.