Skip to content

fix parse statement execute proto bug#576

Open
xuannnaux wants to merge 1 commit intoflike:masterfrom
xuannnaux:master
Open

fix parse statement execute proto bug#576
xuannnaux wants to merge 1 commit intoflike:masterfrom
xuannnaux:master

Conversation

@xuannnaux
Copy link
Copy Markdown

@xuannnaux xuannnaux commented Jul 16, 2020

According to COM_STMT_EXECUTE protocol definition: https://dev.mysql.com/doc/internals/en/com-stmt-execute.html

      if new-params-bound-flag == 1:
    n              type of each parameter, length: num-params * 2
    n              value of each parameter

new-params-bound-flag condition only valid for the first statement type of each parameter.

value of each parameter field should be parsed every time.
Otherwise, the program will visit invalid memory address during the second STMT_EXECUTE.

@xuannnaux xuannnaux marked this pull request as ready for review July 16, 2020 09:37
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.

1 participant