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

The params of COM_STMT_EXECUTE may not be shown in tiproxy_traffic_replay.fail #703

Open
djshow832 opened this issue Oct 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@djshow832
Copy link
Collaborator

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. Prepare a statement and then capture traffic
  2. Execute the statement with parameters
  3. Stop capture and replay with errors (such as replay after dropping the database)
  4. Check the sample_stmt in the table tiproxy_traffic_replay.fail

2. What did you expect to see? (Required)

The parameters are correct

3. What did you see instead (Required)

The parameter is nil.
Reason:
paramNum is contained in the ComStmtPrepare but paramTypes is contained in the first ComStmtExecute (with newParamBoundFlag==1). TiDB parses the paramTypes by the paramNum and then stores it.
If the prepared statement is not executed before and is parsed from the session states, the paramTypes is empty. Besides, the paramNum is not in the session states. When the first ComStmtExecute comes, TiProxy is unable to parse paramTypes because it doesn't know the paramNum.

4. What is your version? (Required)

v1.3.0

@djshow832 djshow832 added the bug Something isn't working label Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant