pingcap / pingcap/tidb

Unexpected Result byCRC32() and SIN() Functions

Open
#60,664 5 comments 0 reactions 0 assignees View on GitHub
fuzz/sqlancer severity/minor sig/execution type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

### 1. Minimal reproduce step (Required)

```sql
CREATE TABLE t0(c0 BIGINT);
INSERT t0 VALUES(1674610777);
SELECT t0.c0 FROM t0 WHERE CRC32(SIN(t0.c0)) >= t0.c0; -- Empty set
```

### 2. What did you expect to see? (Required)
`CRC32(SIN(t0.c0))` = 1782146908, which is greater than 1674610777, so this query should return one row, instead of empty.

### 3. What did you see instead (Required)

### 4. What is your TiDB version? (Required)

```bash
+--------------------------------------------+
| version() |
+--------------------------------------------+
| 8.0.11-TiDB-v9.0.0-beta.1.pre-563-gea52376 |
+--------------------------------------------+
```

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.