Quote SQLite table identifiers in DBI column_info PRAGMA
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 src/main/java/org/perlonjava/runtime/perlmodule/DBI.java 中的 columnInfoViaPragma 开始,然后使用 SQLite 测试 t/13-init.t、t/14-smart-accessors.t 和 t/15-sql-row.t 重现该失败。完成标准是:column_info 为名为 order 的表返回元数据,且不出现 SQLite 语法错误;单独的 active-flag 缺陷在 #1604 中跟踪。
由索引模型根据 Issue 内容生成。
描述
Summary
PerlOnJava's SQLite-specific DBI.column_info constructs PRAGMA table_info($table) without quoting the table identifier. A table named order therefore produces PRAGMA table_info(order), which SQLite rejects because order is a reserved word.
ActiveRecord::Simple 1.11 creates and introspects an order table in its SQLite tests. The metadata call fails, and its caller then attempts fetchall_arrayref on the undefined result, aborting t/13-init.t, t/14-smart-accessors.t, and t/15-sql-row.t before those tests emit TAP.
Evidence
- CPAN random tester run:
20261002-084902-54310 - Distribution/version:
ActiveRecord::Simple1.11 - System Perl 5.42.2 on macOS 26.6.2 arm64: all 16 test files passed (206 tests).
- PerlOnJava 5.44.1, build
f25d551c1, Java 24.0.2 on macOS 26.6.2 arm64: the SQLite metadata error reproduces on both JVM and interpreter backends. - Diagnostic:
DBI column_info failed: near "order": syntax error, followed by an attempt to callfetchall_arrayrefon an undefined value.
Suspected cause
columnInfoViaPragma in src/main/java/org/perlonjava/runtime/perlmodule/DBI.java concatenates the table name directly into PRAGMA table_info(...). It should use SQLite-safe identifier quoting (or another metadata approach that safely handles reserved names).
Expected result
column_info should return metadata for valid SQLite table names, including reserved words such as order, without SQL syntax errors.
A separate missing-active-flag defect in the synthetic column_info statement handle breaks accessor discovery and is tracked in #1604.
- 主要语言
- Perl
- 星标
- 64
- 派生
- 7
- 平均合并
- 5 小时 8 分钟
- 30 天内合并 PR
- 193
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
fglock/PerlOnJava 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
fglock/PerlOnJava#1651 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
fglock/PerlOnJava#1579 ·
维护者通常 1 天内回复
-
area:cpan-port area:unicode bug
难度 2/5 1-3 小时 新手友好度 88/100
fglock/PerlOnJava#1341 ·
维护者通常 1 天内回复
-
Interpreter fails Type::Library extends during BEGIN可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭area:runtime bug
难度 4/5 3-5 天 新手友好度 58/100
fglock/PerlOnJava#1744 ·
维护者通常 1 天内回复
-
HTTP::Cookies extraction drops Expires and SameSite attributes可能已有人在做 @fglock 今天认领。 未关闭area:cpan-port bug
难度 3/5 1-2 天 新手友好度 35/100
fglock/PerlOnJava#1743 ·
维护者通常 1 天内回复
查看 fglock/PerlOnJava 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
objectionary/eolang.sty#197 ·
维护者通常 2 天内回复
-
chore: remove unused .gemini configuration directory可能已有人在做 @JayadityaGit 于 1 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
openfoodfacts/openfoodfacts-server#14878 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
radiator-software/p5-net-ssleay#577 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
beyondgrep/website#143 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
sous-chefs/perl#110 · 1 条评论 ·