Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#703 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
go
領域
backend, databases

調査の方向性

まず、トラフィックのリプレイ中に COM_STMT_PREPARE パケットと COM_STMT_EXECUTE パケットがどのようにパースされるかを追跡します。paramNum、paramTypes、セッション状態の復元に重点を置いてください。パラメーター化されたステートメントをキャプチャし、データベースを削除した後にリプレイして、tiproxy_traffic_replay.fail 内の sample_stmt を確認することで、報告内容を再現します。記録されたパラメーターが正しく表示されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug

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

主要言語
Go
スター
73
フォーク
41
平均マージ
12時間 38分
マージ済み PR(30日)
21

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pingcap/tiproxy のほかの issue

pingcap/tiproxy の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。