Description:
Hi,
In the following test case, there are two equivalent queries, the normal SELECT returns 0 and -0 for ref0, while the prepared SELECT only returns 0. If I remove the `SET SESSION internal_tmp_mem_storage_engine = MEMORY;`, then both queries only return `0`.
```
CREATE TABLE t0(c1 DOUBLE ) ;
SET SESSION internal_tmp_mem_storage_engine = MEMORY;
INSERT INTO t0(c1) VALUES(-0.0), ("-0.0");
ref0 ref2
0 0
-0 0
SELECT DISTINCTROW t0.c1 AS ref0, ('a') NOT IN ((- ((CAST(0.8 AS DOUBLE)) LIKE (t0.c1)))) AS ref2 FROM t0 GROUP BY t0.c1, ('a') NOT IN ((- ((CAST(0.8 AS DOUBLE)) LIKE (t0.c1))));
SET @a = 0.8;
SET @b = 0.8;
PREPARE prepare_query FROM "SELECT DISTINCTROW t0.c1 AS ref0, ('a') NOT IN ((- ((CAST(? AS DOUBLE)) LIKE (t0.c1)))) AS ref2 FROM t0 GROUP BY t0.c1, ('a') NOT IN ((- ((CAST(? AS DOUBLE)) LIKE (t0.c1))))";
EXECUTE prepare_query USING @a,@b;
ref0 ref2
0 0
```
How to repeat:
```
CREATE TABLE t0(c1 DOUBLE ) ;
SET SESSION internal_tmp_mem_storage_engine = MEMORY;
INSERT INTO t0(c1) VALUES(-0.0), ("-0.0");
SELECT DISTINCTROW t0.c1 AS ref0, ('a') NOT IN ((- ((CAST(0.8 AS DOUBLE)) LIKE (t0.c1)))) AS ref2 FROM t0 GROUP BY t0.c1, ('a') NOT IN ((- ((CAST(0.8 AS DOUBLE)) LIKE (t0.c1))));
SET @a = 0.8;
SET @b = 0.8;
PREPARE prepare_query FROM "SELECT DISTINCTROW t0.c1 AS ref0, ('a') NOT IN ((- ((CAST(? AS DOUBLE)) LIKE (t0.c1)))) AS ref2 FROM t0 GROUP BY t0.c1, ('a') NOT IN ((- ((CAST(? AS DOUBLE)) LIKE (t0.c1))))";
EXECUTE prepare_query USING @a,@b;
```
Description: Hi, In the following test case, there are two equivalent queries, the normal SELECT returns 0 and -0 for ref0, while the prepared SELECT only returns 0. If I remove the `SET SESSION internal_tmp_mem_storage_engine = MEMORY;`, then both queries only return `0`. ``` CREATE TABLE t0(c1 DOUBLE ) ; SET SESSION internal_tmp_mem_storage_engine = MEMORY; INSERT INTO t0(c1) VALUES(-0.0), ("-0.0"); ref0 ref2 0 0 -0 0 SELECT DISTINCTROW t0.c1 AS ref0, ('a') NOT IN ((- ((CAST(0.8 AS DOUBLE)) LIKE (t0.c1)))) AS ref2 FROM t0 GROUP BY t0.c1, ('a') NOT IN ((- ((CAST(0.8 AS DOUBLE)) LIKE (t0.c1)))); SET @a = 0.8; SET @b = 0.8; PREPARE prepare_query FROM "SELECT DISTINCTROW t0.c1 AS ref0, ('a') NOT IN ((- ((CAST(? AS DOUBLE)) LIKE (t0.c1)))) AS ref2 FROM t0 GROUP BY t0.c1, ('a') NOT IN ((- ((CAST(? AS DOUBLE)) LIKE (t0.c1))))"; EXECUTE prepare_query USING @a,@b; ref0 ref2 0 0 ``` How to repeat: ``` CREATE TABLE t0(c1 DOUBLE ) ; SET SESSION internal_tmp_mem_storage_engine = MEMORY; INSERT INTO t0(c1) VALUES(-0.0), ("-0.0"); SELECT DISTINCTROW t0.c1 AS ref0, ('a') NOT IN ((- ((CAST(0.8 AS DOUBLE)) LIKE (t0.c1)))) AS ref2 FROM t0 GROUP BY t0.c1, ('a') NOT IN ((- ((CAST(0.8 AS DOUBLE)) LIKE (t0.c1)))); SET @a = 0.8; SET @b = 0.8; PREPARE prepare_query FROM "SELECT DISTINCTROW t0.c1 AS ref0, ('a') NOT IN ((- ((CAST(? AS DOUBLE)) LIKE (t0.c1)))) AS ref2 FROM t0 GROUP BY t0.c1, ('a') NOT IN ((- ((CAST(? AS DOUBLE)) LIKE (t0.c1))))"; EXECUTE prepare_query USING @a,@b; ```