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 2 times, most recently from 9466640 to 9225771 Compare October 17, 2025 00:04
@serprex serprex force-pushed the client-deprecate-eof branch 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

// EOF Packet
if c.isEOFPacket(data) {
if data[0] == mysql.EOF_HEADER && len(data) <= 0xffffff {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you explain why we change it to len(data) <= 0xffffff?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will add comment later, bit unavailable this week

https://dev.mysql.com/worklog/task/?id=7766

In case of huge data packet with length greater than 16777216L client will treat it as a data packet and process accordingly.

Co-authored-by: lance6716 <[email protected]>
@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

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