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

executor: fix panic and update error data when table has column in write only state (#8792) #8904

Merged

Conversation

Projects
None yet
5 participants
@crazycs520
Copy link
Contributor

crazycs520 commented Jan 2, 2019

What problem does this PR solve?

cherry-pick #8792

What is changed and how it works?

Check List

Tests


This change is Reviewable

@crazycs520

This comment has been minimized.

Copy link
Contributor Author

crazycs520 commented Jan 2, 2019

/run-all-tests tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0

@crazycs520

This comment has been minimized.

Copy link
Contributor Author

crazycs520 commented Jan 2, 2019

@crazycs520

This comment has been minimized.

Copy link
Contributor Author

crazycs520 commented Jan 2, 2019

/run-all-tests tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0

@crazycs520 crazycs520 requested review from tiancaiamao and jackysp and removed request for tiancaiamao Jan 2, 2019

@winkyao
Copy link
Member

winkyao left a comment

LGTM

@winkyao
Copy link
Member

winkyao left a comment

.

Show resolved Hide resolved executor/write.go Outdated
}
if onDup {
sc.AddAffectedRows(1)
}

This comment has been minimized.

Copy link
@lysu

lysu Jan 2, 2019

Member

is this cherry-pick by #8233 & #6656

maybe better cherry their testcase to here too, look good to me but cannot confirm it works well without testcase... 🤣

This comment has been minimized.

Copy link
@winkyao

winkyao Jan 2, 2019

Member

@crazycs520 Please pick the test cases.

This comment has been minimized.

Copy link
@crazycs520

crazycs520 Jan 2, 2019

Author Contributor

I have cherry-picked test of #6656, But I can't cherry-pick the test of #8233, There have some other problems.

This comment has been minimized.

Copy link
@crazycs520

crazycs520 Jan 2, 2019

Author Contributor

I add a part of tests from #8233, PTAL. @lysu

crazycs520 added some commits Jan 2, 2019

@crazycs520

This comment has been minimized.

Copy link
Contributor Author

crazycs520 commented Jan 2, 2019

/run-all-tests tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0

1 similar comment
@crazycs520

This comment has been minimized.

Copy link
Contributor Author

crazycs520 commented Jan 2, 2019

/run-all-tests tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0

@crazycs520

This comment has been minimized.

Copy link
Contributor Author

crazycs520 commented Jan 2, 2019

/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)

This comment has been minimized.

Copy link
@tiancaiamao

tiancaiamao Jan 2, 2019

Contributor

Why dirty table operation is changed, it should be irrelevant

This comment has been minimized.

Copy link
@crazycs520

crazycs520 Jan 2, 2019

Author Contributor

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.

@crazycs520

This comment has been minimized.

Copy link
Contributor Author

crazycs520 commented Jan 2, 2019

/run-all-tests tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0

1 similar comment
@crazycs520

This comment has been minimized.

Copy link
Contributor Author

crazycs520 commented Jan 2, 2019

/run-all-tests tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0

@crazycs520

This comment has been minimized.

Copy link
Contributor Author

crazycs520 commented Jan 2, 2019

/run-all-tests tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0

1 similar comment
@crazycs520

This comment has been minimized.

Copy link
Contributor Author

crazycs520 commented Jan 2, 2019

/run-all-tests tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0

@crazycs520

This comment has been minimized.

Copy link
Contributor Author

crazycs520 commented Jan 2, 2019

/run-unit-test tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0

@zyguan

This comment has been minimized.

Copy link
Contributor

zyguan commented Jan 2, 2019

/run-unit-test tikv=release-2.0 tidb-test=release-2.0 pd=release-2.0 gofail=etcd-io

@lysu

This comment has been minimized.

Copy link
Member

lysu commented Jan 2, 2019

LGTM

@lysu lysu added the status/LGT2 label Jan 2, 2019

@tiancaiamao

This comment has been minimized.

Copy link
Contributor

tiancaiamao commented Jan 2, 2019

LGTM

@tiancaiamao tiancaiamao added status/LGT3 and removed status/LGT2 labels Jan 2, 2019

@winkyao winkyao merged commit ef9b85c into pingcap:release-2.0 Jan 2, 2019

12 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/common-test job succeeded
Details
idc-jenkins-ci-tidb/integration-common-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/integration-compatibility-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/integration-ddl-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/mybatis-test job succeeded
Details
idc-jenkins-ci-tidb/sqllogic-test-1 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/sqllogic-test-2 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/unit-test Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

tiancaiamao added a commit that referenced this pull request Jan 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.