pingcap / pingcap/tidb

Unexpected error message on constant

Open
#42,942 3 comments 0 reactions 0 assignees View on GitHub
affects-7.1 fuzz/sqlancer may-affects-4.0 may-affects-5.0 may-affects-5.1 may-affects-5.2 may-affects-5.3 may-affects-5.4 may-affects-6.1 may-affects-6.5 severity/moderate 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)

The following program triggers an unexpected error:

```
USE test;
DROP DATABASE IF EXISTS database45;
CREATE DATABASE database45;
USE database45;
CREATE TABLE t0(c0 FLOAT );
INSERT INTO t0(c0) VALUES (1);
UPDATE t0 SET c0=1;
ALTER TABLE t0 MODIFY c0 TINYINT;
SELECT t0.c0 AS c0 FROM t0 WHERE ((((SUBSTRING_INDEX((((('2')NOT REGEXP(2)))NOT REGEXP(ACOS(INET_ATON((BINARY (t0.c0)))))), t0.c0, t0.c0))))AND( t0.c0 IN (1)));
```

This is the error message:

```
ERROR 1139 (42000) at line 10: Got error '[expression:1411]Incorrect string value: '1
```

But I run this query in MySQL, it can run normally. https://www.db-fiddle.com/f/7hKev8zHsWqek6LKBG9YsT/1

### 2. What did you expect to see? (Required)
No Error.

### 3. What did you see instead (Required)
```
ERROR 1139 (42000) at line 10: Got error '[expression:1411]Incorrect string value: '1
```
### 4. What is your TiDB version? (Required)
```
| Release Version: v7.1.0-alpha-162-gc233969b2
Edition: Community
Git Commit Hash: c233969b2c385b4292a7caaf16517dd8b152d7f1
Git Branch: master
UTC Build Time: 2023-04-11 03:01:14
GoVersion: go1.20.3
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: unistore |
```

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.