pingcap / pingcap/tidb

decimal in (xx,xx) return bad number

Open
#60,541 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

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)

create table chqin(col_decimal decimal(10,0) DEFAULT NULL);
select t3.col_decimal IN ( '0.696731567382812', -1234567891234567891234567890000.123456789123456789123456789123456789123456789 ) from chqin t3;

### 2. What did you expect to see? (Required)
from postgres:
postgres=# select t3.col_decimal IN ( '0.696731567382812', -1234567891234567891234567890000.123456789123456789123456789123456789123456789 ) from chqin t3;
?column?
----------
(0 rows)

from mysql
MySQL [test1]> select t3.col_decimal IN ( '0.696731567382812', -1234567891234567891234567890000.123456789123456789123456789123456789123456789 ) from chqin t3;
Empty set (0.01 sec)

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

mysql> select t3.col_decimal IN ( '0.696731567382812', -1234567891234567891234567890000.123456789123456789123456789123456789123456789 ) from mysql_partition_range_subpartition_key_3 t3;
ERROR 8029 (HY000): Bad Number

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

mysql>
mysql> select version();
+--------------------+
| version() |
+--------------------+
| 8.0.11-TiDB-v8.5.1 |
+--------------------+
1 row in set (0.00 sec)

mysql> SELECT tidb_version()
-> ;
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v8.5.1
Edition: Community
Git Commit Hash: fea86c8e35ad4a86a5e1160701f99493c2ee547c
Git Branch: HEAD
UTC Build Time: 2025-01-16 07:38:34
GoVersion: go1.23.4
Race Enabled: false
Check Table Before Drop: false
Store: tikv |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

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.