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

Bug Report: Parsing OK response from MariaDB can fail during import #11795

Closed
dbussink opened this issue Nov 23, 2022 · 0 comments · Fixed by #11796
Closed

Bug Report: Parsing OK response from MariaDB can fail during import #11795

dbussink opened this issue Nov 23, 2022 · 0 comments · Fixed by #11796

Comments

@dbussink
Copy link
Contributor

Overview of the Issue

While MariaDB support is deprecated (see #9518), we still support importing data from MariaDB through an unmanaged tablet.

Since #10871 we always enable session state tracking as a client capability, but it turns out that MariaDB can return a packet where the SERVER_SESSION_STATE_CHANGED bit is set, but subsequently no additional information is available in the packet.

This then errors with the following error:

invalid OK packet session state change length: &{[254 0 0 34 64 0 0] 0}

Reproduction Steps

Import data from a recent MariaDB instance

Binary Version

15 and later

Operating System and Environment details

n/a

Log Fragments

-
@dbussink dbussink added Type: Bug Needs Triage This issue needs to be correctly labelled and triaged Component: Query Serving and removed Needs Triage This issue needs to be correctly labelled and triaged labels Nov 23, 2022
dbussink added a commit to planetscale/vitess that referenced this issue Nov 23, 2022
On MariaDB, it's possible that an OK packet has
`SERVER_SESSION_STATE_CHANGED` set to true, but it has no additional
state change information as the end of the packet is reached.

We should not treat this as an error condition and treat this as a
proper OK packet.

Fixes vitessio#11795

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
systay pushed a commit that referenced this issue Nov 23, 2022
On MariaDB, it's possible that an OK packet has
`SERVER_SESSION_STATE_CHANGED` set to true, but it has no additional
state change information as the end of the packet is reached.

We should not treat this as an error condition and treat this as a
proper OK packet.

Fixes #11795

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
vitess-bot bot pushed a commit that referenced this issue Nov 23, 2022
On MariaDB, it's possible that an OK packet has
`SERVER_SESSION_STATE_CHANGED` set to true, but it has no additional
state change information as the end of the packet is reached.

We should not treat this as an error condition and treat this as a
proper OK packet.

Fixes #11795

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
frouioui pushed a commit that referenced this issue Nov 28, 2022
On MariaDB, it's possible that an OK packet has
`SERVER_SESSION_STATE_CHANGED` set to true, but it has no additional
state change information as the end of the packet is reached.

We should not treat this as an error condition and treat this as a
proper OK packet.

Fixes #11795

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Co-authored-by: Dirkjan Bussink <d.bussink@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant