Prepared statement fails with more than 65,528 parameters #371
Unanswered
bgrainger
asked this question in
Bug Reports
Replies: 1 comment 3 replies
-
I've appreciated reading through the discussion posts you created over the weekend to share with us! Reading through your post here there's a lot of good information and if the behavior is inconsistent in the way that you've already described above I'm just going to take this information straight to share as a potential Vitess issue on our end for additional review. Based on what you've shared a fix may be in order, along with perhaps some potential tests to help ensure behavior is consistent when passing in that many parameters. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Executing a prepared statement with more than 65,528 parameters fails in two different ways:
65529 to 65535 parameters
When issuing
COM_STMT_EXECUTE
to execute the prepared statement, the server abruptly closes the connection.>= 65536 parameters
When executing the prepared statement, the server returns an ERR packet with a message like
target: mysqltest.-.primary: vttablet: rpc error: code = InvalidArgument desc = missing bind var v4465 (CallerID: xlc5dtqu00ynckn1otee)
.Expectation
If a client sends a
COM_STMT_PREPARE
packet with >= 65529 parameters, the server should return an ERR packet with error codeER_PS_MANY_PARAM
(1390). It should not be possible to prepare a statement that can't be executed.Reproduction
Beta Was this translation helpful? Give feedback.
All reactions