-
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
Amending transaction accepts DDLs that changes column types but gives wrong result #21470
Comments
The new feature on master branch |
We need to make it compatible with |
The change column type is still in development phase, the severity could be lowerd. We need to add unit tests for the coupled module, such tests for the amend feature about this is needed. |
In the my reproducing step, the the reason is that: column type change will add a brand new column (changing column), the dml which insert in the middle state like write only / rerog only should fill the two columns data (one is for the old column, one is for new column); the dml which insert in the public state of the type changed column should only fill the new column with the new id.
If column type change is finished, the new column won't find any related column with same id in the tblAtStart |
Please edit this comment or add a new comment to complete the following informationNot a bug
Duplicate bug
BugNote: Make Sure that 'component', and 'severity' labels are added 1. Root Cause Analysis (RCA) (optional)The amend transaction checking for modify column is not compatible with new feature change column type. 2. Symptom (optional)Incorrect read results. 3. All Trigger Conditions (optional)Use change column type together with amend transaction, and some transactions are amended before commit. 4. Workaround (optional)Do not use change column type together with amend transaction. 5. Affected versions5.0 6. Fixed versionsmaster |
( AffectedVersions ) fields are empty. |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
begin;
insert into t values (1, "123456789");
alter table t modify column v varchar(5);
commit;
select * from t;
(1, NULL)
2. What did you expect to see? (Required)
Transaction on session 1 fails, either because not support by amend txn or value of
v
too long.3. What did you see instead (Required)
v = NULL in the final result.
4. What is your TiDB version? (Required)
master (c9288d2 )
The text was updated successfully, but these errors were encountered: