pingcap / pingcap/tidb

Incompatible query results with MySQL

Open
#44,929 1 comment 0 reactions 0 assignees View on GitHub
may-affects-5.1 may-affects-5.2 may-affects-5.3 may-affects-5.4 may-affects-6.1 may-affects-6.5 may-affects-7.1 severity/minor sig/execution type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)

```SQL
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c0 DOUBLE);
INSERT INTO t1 VALUES (0.5814905564486735);
SELECT * FROM t1 WHERE (~ (CAST(t1.c0 AS DATE))); -- actual: {0.5814905564486735}, expected: {}
```
### 2. What did you expect to see? (Required)
SELECT returns empty.
### 3. What did you see instead (Required)
SELECT returns {0.5814905564486735}.
### 4. What is your TiDB version? (Required)

Release Version: v7.1.0
Edition: Community
Git Commit Hash: 635a4362235e8a3c0043542e629532e3c7bb2756
Git Branch: heads/refs/tags/v7.1.0
UTC Build Time: 2023-05-30 10:58:57
GoVersion: go1.20.3
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: tikv

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.