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

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

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

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

  • #2789 @slopgobblercobbler による — マージされずにクローズ

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust, sql

調査の方向性

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.

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

説明

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.

主要言語
Rust
スター
3.5k
フォーク
805
平均マージ
2日 3時間
マージ済み PR(30日)
116

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

apache/datafusion-sqlparser-rs のほかの issue

apache/datafusion-sqlparser-rs の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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