Unexpected error "Incorrect string value: '0.8949238218722565' for function inet_aton"
- 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)
Hi,
In the following test case, the view v0 triggers an error "Incorrect string value: '0.8949238218722565' for function inet_aton", however, if I run SELECT INET_ATON(0.8949238218722565); the query will return NULL.
```
CREATE TABLE t67(c0 DOUBLE);
REPLACE INTO t67(c0) VALUES (-1.930236983E9);
CREATE VIEW v0(c4) AS SELECT ((t67.c0)<(BIT_COUNT(INET_ATON(0.8949238218722565)))) FROM t67;
SET @a = 'a';
PREPARE prepare_query FROM 'SELECT ((v0.c4)AND(?)) FROM v0';
EXECUTE prepare_query USING @a; -- ERROR 1411 (HY000) at line 11: Incorrect string value: '0.8949238218722565' for function inet_aton
```
Furthermore, if I replace the value of a from 'a' to TRUE, the query also returns NULL.
### 2. What did you expect to see? (Required)
There is no error in EXECUTE statement.
### 3. What did you see instead (Required)
The EXECUTE statement triggers an error "Incorrect string value: '0.8949238218722565' for function inet_aton"
### 4. What is your TiDB version? (Required)
tidb_version()
Release Version: v9.0.0-beta.2.pre-551-g71caddf56d\nEdition: Community\nGit Commit Hash: 71caddf56d9c1887650568101590417558149e3f\nGit Branch: master\nUTC Build Time: 2025-10-11 06:46:47\nGoVersion: go1.23.12\nRace Enabled: false\nCheck Table Before Drop: false\nStore: unistore\nKernel Type: Classic
Contributor guide
Assessment
This issue has not been assessed yet.