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

Fix COM_STMT_EXECUTE packet decode #7020

Merged
merged 5 commits into from
Nov 13, 2020
Merged

Conversation

harshit-gangal
Copy link
Member

@harshit-gangal harshit-gangal commented Nov 12, 2020

Fixes: #6986

MYSQL_TYPE_YEAR in binary protocol needs to be handled as Varbinary than YEAR i.e. treat as length encoded string over uint16.

@harshit-gangal harshit-gangal marked this pull request as ready for review November 12, 2020 13:36
@harshit-gangal
Copy link
Member Author

Decision needs to be taken if this is safe to be merged. More details are in issue linked to this PR.

go/mysql/query_test.go Outdated Show resolved Hide resolved
@harshit-gangal harshit-gangal changed the title Fix COM_STMT_PREPARE_OK packet Fix COM_STMT_EXECUTE packet decode Nov 12, 2020
Signed-off-by: Harshit Gangal <[email protected]>
@systay systay merged commit 941aa99 into vitessio:master Nov 13, 2020
@systay systay deleted the fix-prep-ok branch November 13, 2020 07:52
@askdba askdba added this to the v9.0 milestone Nov 27, 2020
dbussink added a commit to dbussink/vitess that referenced this pull request Jul 23, 2024
In vitessio#7020 the logic was changed to
always map YEAR to binary. But that is wrong, since this breaks the text
protocol.

Instead, we need to make sure that when we parse the binary data for
prepared statements, we treat YEAR there as binary. That ensures we can
parse it the way it's encoded in practice in the protocol (and not how
it is documented).

Signed-off-by: Dirkjan Bussink <[email protected]>
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.

errCode = 2027, errState = "HY000", errMsg = "decoding parameter value failed: 6167" with mysql-haskell
3 participants