pingcap / pingcap/tidb

TiKV and TiFlash process INET_ATON() function with different results

Open
#61,417 0 comments 0 reactions 0 assignees View on GitHub
severity/moderate sig/execution type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

1. Minimal reproduce step (Required)
```
DROP TABLE IF EXISTS t0;
CREATE TABLE t0(c0 MEDIUMINT ZEROFILL);
ALTER TABLE t0 SET TIFLASH REPLICA 1;
ALTER TABLE t0 MODIFY c0 FLOAT;
INSERT INTO t0 VALUES (1.4E-45);

SELECT /*+ read_from_storage(tiflash[t0]) */ t0.c0 FROM t0 WHERE INET_ATON(t0.c0);
SELECT /*+ read_from_storage(tikv[t0]) */ t0.c0 FROM t0 WHERE INET_ATON(t0.c0);
```
2. What did you expect to see? (Required)
The same query returns the same results on both TiKV and TiFlash.
3. What did you see instead (Required)
```
mysql> SELECT /*+ read_from_storage(tiflash[t0]) */ t0.c0 FROM t0 WHERE INET_ATON(t0.c0);
Empty set (0.01 sec)

mysql> SELECT /*+ read_from_storage(tikv[t0]) */ t0.c0 FROM t0 WHERE INET_ATON(t0.c0);
+------------+
| c0 |
+------------+
| 1.4013e-45 |
+------------+
1 row in set (0.00 sec)
```
4. What is your TiDB version? (Required)
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v8.5.0
Edition: Community
Git Commit Hash: d13e52ed6e22cc5789bed7c64c861578cd2ed55b
Git Branch: HEAD
UTC Build Time: 2024-12-18 02:26:06
GoVersion: go1.23.3
Race Enabled: false
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.