Skip to content

Conversation

@kyfk
Copy link
Contributor

@kyfk kyfk commented Apr 20, 2021

There was an issue with go-mysql-driver that a connection returns an error "invalid connection."
article: https://github.blog/2020-05-20-three-bugs-in-the-go-mysql-driver/

And the author of the article fixed it go-sql-driver/mysql#934.

If driver.SessionResetter is implemented, returns ErrBadConn instead of ErrInvalidConn, then it retries to establish a new connection again.

So I added ResetSession to tracedConn to avoid the error occurring.

@gbbr
Copy link
Contributor

gbbr commented Apr 20, 2021

Thanks for this.

@gbbr gbbr added this to the 1.30.0 milestone Apr 20, 2021
@kyfk
Copy link
Contributor Author

kyfk commented Apr 20, 2021

@gbbr Thank you for your reviews. I fixed all the point you mentioned.
Plz review again 🙏

@gbbr gbbr merged commit a27900a into DataDog:v1 Apr 20, 2021
@gbbr
Copy link
Contributor

gbbr commented Apr 20, 2021

Thanks!

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.

2 participants