-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Data truncated for column '%s' at row %d" #52672
Labels
affects-5.3
This bug affects 5.3.x versions.
affects-5.4
This bug affects the 5.4.x(LTS) versions.
affects-6.1
This bug affects the 6.1.x(LTS) versions.
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-7.5
This bug affects the 7.5.x(LTS) versions.
affects-8.1
This bug affects the 8.1.x(LTS) versions.
fuzz/comp
Issues found by comp fuzz test.
severity/major
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
type/regression
Comments
aytrack
added
type/bug
The issue is confirmed as a bug.
sig/execution
SIG execution
type/regression
severity/major
labels
Apr 17, 2024
ti-chi-bot
bot
added
may-affects-5.4
This bug maybe affects 5.4.x versions.
may-affects-6.1
may-affects-6.5
may-affects-7.1
may-affects-7.5
may-affects-8.1
labels
Apr 17, 2024
aytrack
added
affects-8.1
This bug affects the 8.1.x(LTS) versions.
and removed
may-affects-8.1
labels
Apr 17, 2024
It's a bit strange, I can execute it fine on one clustered environment, but not on another! [10:03:11]TiDB root:coms> select col1, tan(col1) from PK_PRECISION10063 where tan(col1) < tan(9021874879467600608071521900001091070693729763119983979);
+---------------------+---------------------+
| col1 | tan(col1) |
+---------------------+---------------------+
| 8320145330174776428 | 0.06084016242886609 |
+---------------------+---------------------+
1 row in set
Time: 0.064s
[10:03:18]TiDB root:coms> explain select col1, tan(col1) from PK_PRECISION10063 where tan(col1) < tan(9021874879467600608071521900001091070693729763119983979);
+-----------------------+---------+-----------+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
| id | estRows | task | access object | operator info |
+-----------------------+---------+-----------+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
| Projection_4 | 0.80 | root | | coms.pk_precision10063.col1, tan(cast(coms.pk_precision10063.col1, double BINARY))->Column#6 |
| └─Selection_5 | 0.80 | root | | lt(tan(cast(coms.pk_precision10063.col1, double BINARY)), tan(cast(9021874879467600608071521900001091070693729763119983979, double BINARY))) |
| └─TableReader_7 | 1.00 | root | | data:TableFullScan_6 |
| └─TableFullScan_6 | 1.00 | cop[tikv] | table:PK_PRECISION10063 | keep order:false, stats:pseudo |
+-----------------------+---------+-----------+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
4 rows in set
Time: 0.046s
[10:03:29]TiDB root:coms> select tidb_version();
+-----------------------------------------------------------+
| tidb_version() |
+-----------------------------------------------------------+
| Release Version: v8.0.0 |
| Edition: Community |
| Git Commit Hash: 8ba1fa452b1ccdbfb85879ea94b9254aabba2916 |
| Git Branch: HEAD |
| UTC Build Time: 2024-03-28 14:22:15 |
| GoVersion: go1.21.4 |
| Race Enabled: false |
| Check Table Before Drop: false |
| Store: tikv |
+-----------------------------------------------------------+
1 row in set
Time: 0.058s another same version cluster mysql> select col1, tan(col1) from PK_PRECISION10063 where tan(col1) < tan(9021874879467600608071521900001091070693729763119983979);
ERROR 1265 (01000): Data truncated for column '%s' at row %d
mysql> explain select col1, tan(col1) from PK_PRECISION10063 where tan(col1) < tan(9021874879467600608071521900001091070693729763119983979);
+---------------------------+----------+-----------+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
| id | estRows | task | access object | operator info |
+---------------------------+----------+-----------+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
| Projection_4 | 8000.00 | root | | test.pk_precision10063.col1, tan(cast(test.pk_precision10063.col1, double BINARY))->Column#6 |
| └─Selection_5 | 8000.00 | root | | lt(tan(cast(test.pk_precision10063.col1, double BINARY)), tan(cast(9021874879467600608071521900001091070693729763119983979, double BINARY))) |
| └─TableReader_7 | 10000.00 | root | | data:TableFullScan_6 |
| └─TableFullScan_6 | 10000.00 | cop[tikv] | table:PK_PRECISION10063 | keep order:false, stats:pseudo |
+---------------------------+----------+-----------+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
4 rows in set, 1 warning (0.00 sec)
mysql> select tidb_version();
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v8.0.0
Edition: Community
Git Commit Hash: 8ba1fa452b1ccdbfb85879ea94b9254aabba2916
Git Branch: HEAD
UTC Build Time: 2024-03-28 14:22:15
GoVersion: go1.21.4
Race Enabled: false
Check Table Before Drop: false
Store: tikv |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)
|
It seems tidb doesn't try to handle truncate error inside builtinCastDecimalAsRealSig::evalReal: tidb/pkg/expression/builtin_cast.go Line 1231 in 024fdd2
|
13 tasks
windtalker
added
affects-5.3
This bug affects 5.3.x versions.
affects-5.4
This bug affects the 5.4.x(LTS) versions.
affects-6.1
This bug affects the 6.1.x(LTS) versions.
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-7.5
This bug affects the 7.5.x(LTS) versions.
and removed
may-affects-5.4
This bug maybe affects 5.4.x versions.
may-affects-6.1
may-affects-6.5
may-affects-7.1
may-affects-7.5
labels
May 7, 2024
13 tasks
terry1purcell
pushed a commit
to terry1purcell/tidb
that referenced
this issue
May 17, 2024
RidRisR
pushed a commit
to RidRisR/tidb
that referenced
this issue
May 23, 2024
Facing this issue as well. |
/label fuzz/comp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-5.3
This bug affects 5.3.x versions.
affects-5.4
This bug affects the 5.4.x(LTS) versions.
affects-6.1
This bug affects the 6.1.x(LTS) versions.
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-7.5
This bug affects the 7.5.x(LTS) versions.
affects-8.1
This bug affects the 8.1.x(LTS) versions.
fuzz/comp
Issues found by comp fuzz test.
severity/major
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
type/regression
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
v8.1.0
The text was updated successfully, but these errors were encountered: