Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#703 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
go
Lĩnh vực
backend, databases

Hướng nghiên cứu

Bắt đầu bằng cách theo dõi cách các gói COM_STMT_PREPARE và COM_STMT_EXECUTE được phân tích trong quá trình phát lại lưu lượng, tập trung vào paramNum, paramTypes và việc khôi phục trạng thái session. Tái hiện báo cáo bằng cách ghi lại một câu lệnh có tham số, phát lại câu lệnh đó sau khi xóa một cơ sở dữ liệu và kiểm tra sample_stmt trong tiproxy_traffic_replay.fail. Hoàn tất khi các tham số đã ghi được hiển thị chính xác.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Go
Star
73
Fork
41
Merge trung bình
10 giờ 52 phút
Pull request đã merge (30 ngày)
20

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pingcap/tiproxy

Tất cả issue của pingcap/tiproxy

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.