Skip to content

Conversation

@gengjun-git
Copy link
Contributor

@gengjun-git gengjun-git commented Aug 25, 2020

Fix #4449
Send fields after first row arrived so that error packet can be send to client when exception thrown from coord.getNext(). Golang and Python can not identify error if fields packet arrived before error packet.

@morningman
Copy link
Contributor

Hi @gengjun-git , you can write "Fix #4449", so that the related issue will be closed automatically when this PR is merged.

if (!isOutfileQuery) {
sendFields(queryStmt.getColLabels(), queryStmt.getResultExprs());
}
boolean isSendFields = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

So the reason is that the fields has been sent but no data is sent following?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, fields has been sent, but query may fail because of timeout. In this case, client will get a fields packet, and error packet, but some language mysql driver cannot recognize the error, and returns a success and no rows result.

@morningman morningman added the kind/fix Categorizes issue or PR as related to a bug. label Aug 25, 2020
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman morningman added the approved Indicates a PR has been approved by one committer. label Aug 26, 2020
@morningman morningman merged commit fe0c21b into apache:master Aug 27, 2020
morningman added a commit that referenced this pull request Sep 4, 2020
Fix bug that query meta fields has been sent twice.
This bug is introduced by #4330 , and related PR is #4450
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. kind/fix Categorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Golang cannot get err when query timeout

2 participants