-
Notifications
You must be signed in to change notification settings - Fork 1k
fix: init Resultset in Result when handling ddl statement #578
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
Conversation
After bisecting changes, I discovered that this will make my client using
I will see if I can come up with some minimal code to reproduce this |
Ooops. I will wait for a little for your reproducing, then I will try it myself. |
It goes wrong on this line: https://github.com/go-mysql-org/go-mysql/blob/master/server/resp.go#L186 What happens (in my application) is that a client connects to my server and after all kinds of middleware, its query is forwarded to the actual mysql machine and is returned to the client. If this query is a SELECT or anything that builds up a ResultSet, that's fine. But on for instance an INSERT, it should only result in an OK packet. But now that ResultSet is no longer nil, it will always handle it like a resultset in writeResultset. |
this PR is to fix issue #577
as I only use client module of this repository and didn't use other modules like replication, server...etc, I'm not sure if this fix may impact the behavior of those modules, need some to review this.