Description:
This case highlights a bug caused by the use of ZEROFILL in a DOUBLE column, leading to inconsistent query behavior. In the first query, the c0 column is DOUBLE ZEROFILL, while the second query uses a standard DOUBLE. Both queries perform the same comparison (IFNULL(-1, '')) IN (t0.c0).
Expected Behavior: The ZEROFILL attribute should only affect the display of the value, padding it with zeros, without altering the underlying data. Therefore, the comparison between -1 and 0 should yield the same result in both queries. However, the queries return different results, which indicates a bug.
How to repeat:
```sql
-- query 1
drop database d0;
create database d0;
use d0;
CREATE TABLE IF NOT EXISTS t0(c0 DOUBLE ZEROFILL) ;
CREATE INDEX i0 ON t0(c0 DESC);
INSERT INTO t0(c0) VALUES(0);
SELECT c0 FROM t0 WHERE (IFNULL(-1, '')) IN (t0.c0);
-- query 2
drop database d0;
create database d0;
use d0;
CREATE TABLE IF NOT EXISTS t0(c0 DOUBLE ) ;
CREATE INDEX i0 ON t0(c0 DESC);
INSERT INTO t0(c0) VALUES(0);
SELECT c0 FROM t0 WHERE (IFNULL(-1, '')) IN (t0.c0);
-- result 1
+------------------------+
| c0 |
+------------------------+
| 0000000000000000000000 |
+------------------------+
1 row in set (0.00 sec)
-- result 2
Empty set (0.00 sec)
```