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

expose capability and charset of connections to server #588

Merged
merged 1 commit into from
Jun 16, 2021

Conversation

skoef
Copy link
Contributor

@skoef skoef commented Jun 16, 2021

For a project of mine I need to be able to read the capabilities and default charset of a client connecting to my server. This PR exposes those 2 properties. Charset perhaps used to be decoded before into a type called CollationId but this doesn't exist (anymore) and I'm perfectly fine with the collation ID as an uint8.

I also took the liberty to refactor readFirstPacket a bit so it is easier to test its behaviour

refactored readFirstPacket for improved testability
@lance6716 lance6716 merged commit 735aad5 into go-mysql-org:master Jun 16, 2021
@skoef
Copy link
Contributor Author

skoef commented Jun 16, 2021

Awesome, thanks for your swift action!

@skoef skoef deleted the clientCharsetCapability branch June 16, 2021 13:48
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