Bug #65076 Workbench crashes on specific SQL statement

Submitted: 23 Apr 2012 13:27 Modified: 24 Apr 2012 8:12
Reporter: Sebastian Wiemer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S1 (Critical)
Version:5.2.37 CE (Rev 8576) OS:Windows (Windows 7 x64)
Assigned to: CPU Architecture:Any

[23 Apr 2012 13:27] Sebastian Wiemer
Description:
Workbench crashes on following statement. Statement can be executed using mysql command line client without problems.

SELECT v.*
FROM price_value v
WHERE v.PERIOD_ID in (
select p1.ID from price_period p1, price_period p2
where p2.ID = 4 AND p1.SORT BETWEEN p2.SORT-3 AND p2.SORT-1
ORDER BY p1.SORT
);

Table layouts of the involved tables is:

mysql> describe price_value;
+-----------+---------+------+-----+---------+-------+
| Field     | Type    | Null | Key | Default | Extra |
+-----------+---------+------+-----+---------+-------+
| ID        | int(11) | NO   | PRI | NULL    |       |
| SHOP_ID   | int(11) | YES  | MUL | NULL    |       |
| BRAND_ID  | int(11) | YES  | MUL | NULL    |       |
| PERIOD_ID | int(11) | YES  | MUL | NULL    |       |
| f1        | double  | YES  |     | NULL    |       |
| f2        | double  | YES  |     | NULL    |       |
| f3        | double  | YES  |     | NULL    |       |
| f4        | double  | YES  |     | NULL    |       |
| f5        | double  | YES  |     | NULL    |       |
| f6        | double  | YES  |     | NULL    |       |
| f7        | double  | YES  |     | NULL    |       |
| f8        | double  | YES  |     | NULL    |       |
| f9        | double  | YES  |     | NULL    |       |
| f10       | double  | YES  |     | NULL    |       |
+-----------+---------+------+-----+---------+-------+
mysql> describe price_period;
+-------+--------------+------+-----+---------+-------+
| Field | Type         | Null | Key | Default | Extra |
+-------+--------------+------+-----+---------+-------+
| ID    | int(11)      | NO   | PRI | NULL    |       |
| LABEL | varchar(255) | YES  |     | NULL    |       |
| SORT  | int(11)      | YES  |     | NULL    |       |
| KEY   | varchar(255) | YES  |     | NULL    |       |
+-------+--------------+------+-----+---------+-------+

How to repeat:
Execute statement 

SELECT v.*
FROM price_value v
WHERE v.PERIOD_ID in (
select p1.ID from price_period p1, price_period p2
where p2.ID = 4 AND p1.SORT BETWEEN p2.SORT-3 AND p2.SORT-1
ORDER BY p1.SORT
);

in SQLEditor.
[23 Apr 2012 13:38] Valeriy Kravchuk
Please, check if the same problem still happens with a newer version, 5.2.39.
[24 Apr 2012 8:12] Sebastian Wiemer
fixed in Version 5.2.39 CE (Rev 8757)

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.043 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.