Bug #118749 internal_tmp_mem_storage_engine=memory make the query generate different result on -0 and 0
Submitted: 30 Jul 2:41 Modified: 30 Jul 11:57
Reporter: chi zhang Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:9.3.0 OS:Any
Assigned to: CPU Architecture:Any

[30 Jul 2:41] chi zhang
Description:
The following test case generates `-0` and `0`, however, if I remove `SET SESSION internal_tmp_mem_storage_engine = MEMORY;`, the test case only generates `-0`

```
CREATE TABLE t0(c0 FLOAT) ;
INSERT INTO t0(c0) VALUES('-0.0'), ('0');
SET SESSION internal_tmp_mem_storage_engine = MEMORY;
SELECT DISTINCTROW t0.c0 FROM t0;
c0
-0
0
```

```
CREATE TABLE t0(c0 FLOAT) ;
INSERT INTO t0(c0) VALUES('-0.0'), ('0');
SELECT DISTINCTROW t0.c0 FROM t0;
c0
-0
```

How to repeat:
```
CREATE TABLE t0(c0 FLOAT) ;
INSERT INTO t0(c0) VALUES('-0.0'), ('0');
SET SESSION internal_tmp_mem_storage_engine = MEMORY;
SELECT DISTINCTROW t0.c0 FROM t0;
c0
-0
0
```
[30 Jul 11:57] MySQL Verification Team
Hello Chi Zhang,

Thank you for the bug report.
Imho this is duplicate of Bug #115654, please see Bug #115654.

Regards,
Ashwini Patil