phpMyAdmin 5.2.3 export fails with RuntimeException: No statement inside WITH for views containing nested CTEs
還沒有人認領這個 Issue。
評估
- 難度
- 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
- 星號
- 486
- 分支
- 119
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
phpmyadmin/sql-parser 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
phpmyadmin/sql-parser#671 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
phpmyadmin/sql-parser#655 · 1 個 reaction ·
-
難度 3/5 1-2 天 新手友好度 65/100
phpmyadmin/sql-parser#662 · 2 個 reaction ·
-
kind/support
難度 3/5 1-2 天 新手友好度 45/100
phpmyadmin/sql-parser#653 · 1 個 reaction ·
-
難度 3/5 1-2 天 新手友好度 70/100
phpmyadmin/sql-parser#649 ·
查看 phpmyadmin/sql-parser 的全部 Issue
相似的 Issue
-
bug No Code Attached Yet
難度 2/5 1-3 小時 新手友好度 88/100
joomla/joomla-cms#48556 · 1 則留言 ·
維護者通常 1 天內回覆
-
sync-en
難度 1/5 1 小時以內 新手友好度 92/100
維護者通常 1 天內回覆
-
sync-en
難度 2/5 1-3 小時 新手友好度 74/100
維護者通常 3 天內回覆
-
Перевод устарел
難度 1/5 1-3 小時 新手友好度 88/100
-
Form
難度 2/5 1-3 小時 新手友好度 74/100
symfony/symfony-docs#23159 ·
維護者通常 3 天內回覆