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

Enhancement CLIENT_DEPRECATE_EOF #140

Merged
merged 2 commits into from
Nov 26, 2022
Merged

Conversation

shiyuhang0
Copy link
Contributor

Optimize #139

when CLIENT_DEPRECATE_EOF is set. EOF_Packet can also be Ok_Packet.

https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_com_query_response_text_resultset.html

@shiyuhang0
Copy link
Contributor Author

shiyuhang0 commented Nov 26, 2022

I also have a question about this code in connection.ts

  this.capabilities = handshakePacket.serverCapabilities;

The capabilities should be handshakePacket.serverCapabilities or HandshakeResponse's client_flag?

@shiyuhang0
Copy link
Contributor Author

@lideming PTAL

@shiyuhang0 shiyuhang0 changed the title Enhancement CLIENT_DEPRECATE_EO Enhancement CLIENT_DEPRECATE_EOF Nov 26, 2022
@lideming
Copy link
Collaborator

But I wonder why it works without this change.

The capabilities should be handshakePacket.serverCapabilities or HandshakeResponse's client_flag?

I think both should work. As we response with the flags that server advertised and client recognized.

@shiyuhang0
Copy link
Contributor Author

Because we judge EOF package by 0xFE. And OK packet can be either 0x00 or 0xFE.
When the client and server both support CLIENT_DEPRECATE_EOF, serve will send OK packet. If it is 0xFE ,it happens to work. But if it is 0x00, I think we can't work.

Copy link
Collaborator

@lideming lideming left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@lideming lideming merged commit e3359d0 into denodrivers:master Nov 26, 2022
lideming added a commit to lideming/deno_mysql that referenced this pull request Sep 13, 2023
lideming added a commit to lideming/deno_mysql that referenced this pull request Sep 13, 2023
lideming added a commit that referenced this pull request Sep 13, 2023
* test: select empty string

* ci: disable fail-fast

* Revert "Enhancement CLIENT_DEPRECATE_EOF (#140)"
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