Details
-
Bug
-
Status: Stalled (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.2(EOL)
-
None
-
None
-
10.2.7-1
Description
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a INT) ENGINE=MyISAM; |
SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); |
SHOW WARNINGS;
|
+---------+------+---------------+
|
| Level | Code | Message |
|
+---------+------+---------------+
|
| Warning | 1365 | Division by 0 |
|
+---------+------+---------------+
|
Notice, the IN predicate is evaluated on an empty table. Looks wrong. The record buffer is not initialized to any valid data in case of an empty table, so calling Item_field::val_xxx() is not correct.
Note, if I change ENGINE from MYISAM to InnoDB, the warning goes away.