Bug #65076 Workbench crashes on specific SQL statement
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.
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.