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
-
jira-created
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 1/5 1 小时以内 新手友好度 70/100
nunomaduro/phpinsights#745 ·
-
status/awaiting_triage
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 1/5 1 小时以内 新手友好度 90/100
WordPress/plugin-check#1486 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 88/100
az-digital/az_quickstart#6019 ·