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

*: Make column test stable and fix prepare statement issue #2473

Merged
merged 3 commits into from
Jan 15, 2017

Conversation

zimulala
Copy link
Contributor

ddl: make column test stable
*: fix prepare statement issue when retrying

@coocood
Copy link
Member

coocood commented Jan 15, 2017

LGTM

@@ -561,7 +565,7 @@ func (s *session) DropPreparedStmt(stmtID uint32) error {
if _, ok := vars.PreparedStmts[stmtID]; !ok {
return executor.ErrStmtNotFound
}
delete(vars.PreparedStmts, stmtID)
vars.RetryInfo.DroppedPreparedStmtIDs = append(vars.RetryInfo.DroppedPreparedStmtIDs, stmtID)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not drop statement here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In retry, ExecutePreparedStmt will execute with the same stmtID, so we should not dropping the preparedStmts until finished the transaction, dropping it in ClearRetryInfo.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will we retry prepare statement? Or we only retry execute statement?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only retry execute statement.
Session.PrepareStmt do not add statement history.

@shenli
Copy link
Member

shenli commented Jan 15, 2017

LGTM

@coocood coocood merged commit 244de11 into master Jan 15, 2017
@coocood coocood deleted the zimuxia/ddl-test-schema branch January 15, 2017 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants