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

The truncate error message is not compatible with MySQL when modifying the column type #24621

Closed
zimulala opened this issue May 13, 2021 · 4 comments · Fixed by #27556
Closed
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. severity/minor type/bug The issue is confirmed as a bug. type/compatibility

Comments

@zimulala
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t(a char(250));
insert into t values("0123456789abc");
alter table t modify a char(12) null;

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

ERROR 1265 (01000): Data truncated for column 'a' at row 1

3. What did you see instead (Required)

ERROR 1406 (22001): Data Too Long, field len 12, data len 20

4. What is your TiDB version? (Required)

Release Version: v4.0.0-beta.2-2810-g3e0947fd2
Edition: Community
Git Commit Hash: 3e0947f
Git Branch: master

@zimulala zimulala added type/bug The issue is confirmed as a bug. type/compatibility severity/minor labels May 13, 2021
@jyz0309 jyz0309 self-assigned this May 23, 2021
@jyz0309 jyz0309 removed their assignment May 27, 2021
@zimulala zimulala added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Jun 24, 2021
@zhaoxugang
Copy link
Contributor

/assign

@zhaoxugang
Copy link
Contributor

In my option, maybe like 'ERROR 1265 (01000 ) : Data truncated for column 'a ' , value is '0123456789abc' ' is enough , because the row num is not necessary and if get row num we will maintain a variable to record it .@zimulala

@zimulala
Copy link
Contributor Author

@zhaoxugang
Well, I think so, in the reorg state, processing this number of rows is complicated and inaccurate

@ti-srebot
Copy link
Contributor

Please edit this comment or add a new comment to complete the following information

Not a bug

  1. Remove the 'type/bug' label
  2. Add notes to indicate why it is not a bug

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug

Bug

Note: Make Sure that 'component', and 'severity' labels are added
Example for how to fill out the template: #20100

1. Root Cause Analysis (RCA) (optional)

2. Symptom (optional)

3. All Trigger Conditions (optional)

4. Workaround (optional)

5. Affected versions

6. Fixed versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. severity/minor type/bug The issue is confirmed as a bug. type/compatibility
Projects
None yet
4 participants