phpMyAdmin 5.2.3 export fails with RuntimeException: No statement inside WITH for views containing nested CTEs
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
調査の方向性
まず、ネストされたCTEを持つビューとMariaDBスキーマのSQLエクスポートを使って失敗を再現し、報告されたRuntimeExceptionを入口として調査します。Parserによる一時的な代替ビュー定義の処理を追跡してください。エクスポートが完了し、完全なCREATE VIEW定義が含まれていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
When exporting a database/schema from phpMyAdmin 5.2.3, the export fails if a view contains a nested CTE (WITH inside another WITH).
The view itself is valid in MariaDB and can be created, queried, and retrieved successfully using SHOW CREATE VIEW. However, during phpMyAdmin export, phpMyAdmin creates the temporary stand-in definition for the view and then terminates with:
RuntimeException: No statement inside WITH
Because the export terminates at this point, the final CREATE VIEW definitions that phpMyAdmin normally writes near the end of the export are missing from the generated SQL file.
Simple reproduction steps: (MariaDB 10.11.16)
DROP VIEW IF EXISTS test_nested_cte_view;
CREATE VIEW test_nested_cte_view AS
WITH outer_cte AS
(
WITH inner_cte AS
(
SELECT 1 AS id, 'test' AS name
)
SELECT id, name
FROM inner_cte
)
SELECT id, name
FROM outer_cte;
Then perform a SQL export of the database/schema through phpMyAdmin.
The export then terminates with:
RuntimeException: No statement inside WITH
Expected result
phpMyAdmin should successfully export a valid MariaDB view containing nested CTEs and include its complete CREATE VIEW definition in the SQL export.
- 主要言語
- PHP
- スター
- 485
- フォーク
- 119
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
phpmyadmin/sql-parser のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
phpmyadmin/sql-parser#655 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
phpmyadmin/sql-parser#662 · リアクション 2 件 ·
-
kind/support
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
phpmyadmin/sql-parser#653 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 70/100
phpmyadmin/sql-parser#649 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
phpmyadmin/sql-parser#643 · コメント 1 件 ·
phpmyadmin/sql-parser の issue をすべて見る
似ている issue
-
sync-en
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
-
sync-en
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
-
Перевод устарел
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
-
[6.x]: "Cannot use object of type stdClass as array" loading Users index (regression of #19182) オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100