Bug #118224 When a constant value is replaced by the LEST function, the sql returns different value;
Submitted: 19 May 2:46 Modified: 19 May 7:47
Reporter: SamonBing SamonBing Email Updates:
Status: Analyzing Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:8.0.41 OS:Any
Assigned to: MySQL Verification Team CPU Architecture:Any

[19 May 2:46] SamonBing SamonBing
Description:
When a constant value is replaced by the LEST function, the return value of the LEST function is the same as that of the constant, but the query result is different.

How to repeat:
mysql> SELECT ALL hbtest.c0 AS ref0 FROM hbtest WHERE 0.7401335565101936 IN (hbtest.c0);
Empty set (0.00 sec)

mysql> select LEAST(0.8044314491415255, 0.7401335565101936);
+-----------------------------------------------+
| LEAST(0.8044314491415255, 0.7401335565101936) |
+-----------------------------------------------+
|                            0.7401335565101936 |
+-----------------------------------------------+
1 row in set (0.00 sec)

mysql> SELECT ALL hbtest.c0 AS ref0 FROM hbtest WHERE LEAST(0.8044314491415255, 0.7401335565101936) IN (hbtest.c0);
+------+
| ref0 |
+------+
|    1 |
+------+
1 row in set (0.00 sec)
[19 May 7:46] SamonBing SamonBing
Supplement the table structure and data:

CREATE TABLE `hbtest` (
  `c0` bigint /*!50606 STORAGE DISK */ DEFAULT NULL COMMENT 'asdf',
  KEY `i0` (`c0`)
);

insert into hbtest values(1);
[19 May 7:47] SamonBing SamonBing
Supplement the table structure and data:

CREATE TABLE `hbtest` (
  `c0` bigint /*!50606 STORAGE DISK */ DEFAULT NULL COMMENT 'asdf',
  KEY `i0` (`c0`)
);

insert into hbtest values(1);