Skip to content

Conversation

@serprex
Copy link
Contributor

@serprex serprex commented Oct 14, 2025

Taking a stab at #980

Part of investigating #1056

Something I noticed was that server capabilities aren't limited by what's sent as client capabilities. Reading docs it seems like both ends are expected to look at the intersection of each others flags. So I decided to tweaks things so that c.capabilities is that intersection, rather than whatever server sends

Seems to be working with latest mysql, but on 8.0.25 instead of a hang I get an empty result set back (while go-sql-driver/mysql still pulls the non-empty result)

@serprex serprex force-pushed the client-deprecate-eof branch 3 times, most recently from 9225771 to 19e6e0e Compare October 17, 2025 00:05
@serprex serprex marked this pull request as ready for review October 17, 2025 00:16
@serprex
Copy link
Contributor Author

serprex commented Oct 19, 2025

https://bugs.mysql.com/bug.php?id=91533

This seems to contradict mysql documentation which states that client should not enable flags not supported by server.

Maybe masking added here should also apply to what we send back to server

if s.columns > 0 {
if err := s.conn.readUntilEOF(); err != nil {
return nil, errors.Trace(err)
// TODO process when CLIENT_CACHE_METADATA enabled
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you mean MARIADB_CLIENT_CACHE_METADATA? https://mariadb.com/docs/server/reference/clientserver-protocol/mariadb-protocol-differences-with-mysql

I want to understand what's the effect after this PR. Hope it will not break existing program with that capabilities flag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't currently support those flags, so it won't affect. We have code that reads until eof to skip info that certain options would omit from protocol

@serprex serprex force-pushed the client-deprecate-eof branch from 577c6ab to 03f84cc Compare November 2, 2025 16:46
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