-
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
executor: fix panic and update error data when table has column in write only state (#8792) #8904
executor: fix panic and update error data when table has column in write only state (#8792) #8904
Conversation
/run-all-tests tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0 |
/run-all-tests tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
} | ||
if onDup { | ||
sc.AddAffectedRows(1) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@crazycs520 Please pick the test cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/run-all-tests tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0 |
1 similar comment
/run-all-tests tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0 |
/run-unit-test tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0 |
} | ||
|
||
tid := t.Meta().ID | ||
ctx.StmtAddDirtyTableOP(DirtyTableDeleteRow, tid, h, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why dirty table operation is changed, it should be irrelevant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the row add to dirty table have move to AddRecord
and UpdateRecord
and RemoveRecord
.
Because AddRecord
will backfill default value to row for write-only column. If dirty table doesn't have the value of write-only column, update will panic in transaction. See #8792 description Problem 1.
/run-all-tests tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0 |
1 similar comment
/run-all-tests tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0 |
/run-all-tests tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0 |
1 similar comment
/run-all-tests tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0 |
/run-unit-test tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0 |
/run-unit-test tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0 gofail=etcd-io |
LGTM |
LGTM |
What problem does this PR solve?
cherry-pick #8792
What is changed and how it works?
Check List
Tests
This change is