Skip to content
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

StrToInt not return the error like mysql in convert.go #22423

Open
erwadba opened this issue Jan 18, 2021 · 0 comments
Open

StrToInt not return the error like mysql in convert.go #22423

erwadba opened this issue Jan 18, 2021 · 0 comments
Labels
severity/minor sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@erwadba
Copy link
Contributor

erwadba commented Jan 18, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> drop table if exists ti;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> create table ti(id int);
Query OK, 0 rows affected (0.11 sec)
mysql> insert into ti values('100.1asdf');
ERROR 1264 (22003): Out of range value for column 'id' at row 1
mysql> 

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

mysql>  insert into t1(id1) values('100.1asdf');
ERROR 1265 (01000): Data truncated for column 'id1' at row 1
mysql>

3. What did you see instead (Required)

mysql> insert into ti values('100.1asdf');
ERROR 1264 (22003): Out of range value for column 'id' at row 1
mysql> 

4. What is your TiDB version? (Required)

mysql> select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v4.0.8
Edition: Community
Git Commit Hash: 66ac9fc31f1733e5eb8d11891ec1b38f9c422817
Git Branch: heads/refs/tags/v4.0.8
UTC Build Time: 2020-10-30 08:21:16
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.00 sec)

mysql> 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/minor sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants