UPDATE with SELECT not supported
還沒有人認領這個 Issue。
評估
研究方向
未指定任何儲存庫檔案或測試。透過 php-sqllint 重現回報的查詢,然後追蹤括號括起的 SELECT 周圍的 UPDATE 解析,並驗證這個有效的 MySQL 語法能在不出現所回報錯誤的情況下被接受。
由索引模型根據 Issue 內容生成。
描述
Was using the php-sqllint package (says to report errors here) and got these errors on valid MySQL syntax:
Line 1, col 45 at "(": An expression was expected.
Line 1, col 45 at "(": Unexpected token.
Line 1, col 46 at "SELECT": A new statement was found, but no delimiter between it and the previous one.
Line 1, col 106 at ")": Unexpected token.
Line 1, col 108 at "src": Unexpected token.
Line 2, col 5 at "SET": A new statement was found, but no delimiter between it and the previous one.
The SQL to generate these errors is similar to this (table, column names and values are different):
UPDATE table1 t1, (SELECT `id` FROM table2 WHERE `unique_val` = 1) src
SET t1.ref_to_t2 = src.id
WHERE t1.unique_val = 'unique';
- 主要語言
- PHP
- 星號
- 485
- 分支
- 119
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
phpmyadmin/sql-parser 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
phpmyadmin/sql-parser#655 · 1 個 reaction ·
-
難度 3/5 1-2 天 新手友好度 55/100
phpmyadmin/sql-parser#666 ·
-
難度 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
-
難度 2/5 1-3 小時 新手友好度 70/100
-
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 1/5 1 小時以內 新手友好度 85/100
-
難度 2/5 1-3 小時 新手友好度 75/100
hector-jewell/food-delivery-system-for-restaurant-using-php#1311 ·
-
難度 2/5 1-3 小時 新手友好度 65/100
Sylius/SyliusGridBundle#501 ·