Description:
Hi, MySQL developers,
Please see the below cases.
```
CREATE TABLE t0(c0 TEXT);
CREATE TABLE t1(c0 INT ZEROFILL);
INSERT INTO t0(c0) VALUES('0.1');
INSERT INTO t1(c0) VALUES(0);
select * from t0 inner join t1 on (((GREATEST(t0.c0, t1.c0)) = (t1.c0)));
-- t0.c0, t1.c0
-- 0.1, 0
select * from t0 inner join t1 on (((GREATEST(t0.c0, t1.c0)) = (t1.c0))) and t1.c0=0.0;
-- t0.c0, t1.c0
-- 0.1, 0
select * from t0 inner join t1 on (((GREATEST(t0.c0, t1.c0)) = (t1.c0))) and t1.c0=0;
-- empty result
-- wrong, should be same as the above two queries
```
In the second query, when we add a true expression 't1.c0=0.0', the query produces the same result as that of the first query. But when we change 't1.c0=0.0' into 't1.c0=0' as shown in the third query, the third query produces an empty result.
How to repeat:
```
CREATE TABLE t0(c0 TEXT);
CREATE TABLE t1(c0 INT ZEROFILL);
INSERT INTO t0(c0) VALUES('0.1');
INSERT INTO t1(c0) VALUES(0);
select * from t0 inner join t1 on (((GREATEST(t0.c0, t1.c0)) = (t1.c0)));
-- t0.c0, t1.c0
-- 0.1, 0
select * from t0 inner join t1 on (((GREATEST(t0.c0, t1.c0)) = (t1.c0))) and t1.c0=0.0;
-- t0.c0, t1.c0
-- 0.1, 0
select * from t0 inner join t1 on (((GREATEST(t0.c0, t1.c0)) = (t1.c0))) and t1.c0=0;
-- empty result
-- wrong, should be same as the above two queries
```