phpmyadmin / phpmyadmin/sql-parser
Inline comments improperly removed during query
未关闭
还没有人认领这个 Issue。
bug
- 主要语言
- PHP
- 星标
- 485
- 派生
- 119
- PR 合并指标
- 30 天内没有已合并 PR
描述
Describe the bug
The query:
select * from /*!i*/nformation_schema.tables;
Executes as if it were:
select * from information_schema.tables;
This is improper.
Expected behavior
MySQL and MariaDB return an error message, this is probably the most expected result. Perhaps a syntax error should be generated from the parser.
Server configuration
- Operating system: Debian
- Web server: Apache
- Database version: MariaDB 10.4.10
- PHP version: 7.4
- phpMyAdmin version: 5.0.0
Client configuration
- Browser: Firefox
- Operating system: MacOS
This was originally reported by email.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
在 SQL lexer/parser 中重现 select * from /*!i*/nformation_schema.tables;,并检查内联注释的处理方式。将结果与 MySQL 和 MariaDB 的行为进行比较;当错误查询被拒绝时即视为完成,最好为此输入添加一个回归测试。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- mariadb, php, sql
- 领域
- databases
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100