MySQL: `FLUSH TABLES` consumes the `;`, so the next statement is rejected

Đang mở
#2,764 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.

  • #2789 của @slopgobblercobbler — đã đóng, không merge

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust, sql

Hướng nghiên cứu

Start by reading the MySQL parser handling for FLUSH TABLES and the statement-separation tests; the issue points to #1775 and its fix in #1786 as a precedent. Reproduce the reported cases with FLUSH TABLES; SELECT 1, FLUSH TABLES t1, t2; SELECT 1, and FLUSH TABLES WITH READ LOCK; SELECT 1, then add coverage showing each parses as two statements.

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

Mô tả

MySQL Prolific Author

FLUSH TABLES followed by another statement doesn't parse:

FLUSH TABLES; SELECT 1
  -> sql parser error: Expected: end of statement, found: SELECT at Line: 1, Column: 15
FLUSH TABLES t1, t2; SELECT 1
FLUSH TABLES WITH READ LOCK; SELECT 1
  -> same error
FLUSH PRIVILEGES; SELECT 1
  -> 2 statements (fine)

Each statement parses on its own. Snowflake's ALTER SESSION had the same problem (#1775, fixed in #1786).

Tested on main c45d1f4e (also 0.63.0 and 0.58.0).

Found with a property-based fuzzer (round trip and statement-separation checks); I used AI assistance for triage and verified every case above.

Ngôn ngữ chính
Rust
Star
3.5k
Fork
805
Merge trung bình
2 ngày 3 giờ
Pull request đã merge (30 ngày)
116

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

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

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 apache/datafusion-sqlparser-rs

Tất cả issue của apache/datafusion-sqlparser-rs

Issue tương tự

Thêm issue về Rust

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.