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

RowsAffected is incorrect #7415

Closed
deepthi opened this issue Jan 30, 2021 · 0 comments · Fixed by #7380
Closed

RowsAffected is incorrect #7415

deepthi opened this issue Jan 30, 2021 · 0 comments · Fixed by #7380

Comments

@deepthi
Copy link
Member

deepthi commented Jan 30, 2021

Overview of the Issue

We are setting RowsAffected on a query result to the number of rows returned.
This is incorrect. According to the mysql C-API, mysql_rows_affected() returns the number of rows affected by a DML.
It is not considered relevant for queries, and gets set to -1.

Reproduction Steps

Unit test query_test.go:
https://github.com/vitessio/vitess/blob/master/go/mysql/query_test.go#L418

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants