SQLite column_info statement is inactive, breaking ActiveRecord auto_load
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 85/100
调研方向
从 src/main/java/org/perlonjava/runtime/perlmodule/DBI.java 和 columnInfoViaPragma 入口点开始,然后检查 src/main/perl/lib/DBI.pm fetchall_arrayref 及其 Active 检查。运行 t/07-auto_load.t;完成意味着会返回 SQLite column_info 行,并且 first_name 和 id 访问器通过。
由索引模型根据 Issue 内容生成。
描述
Summary
ActiveRecord::Simple 1.11 fails to discover SQLite columns on PerlOnJava because the synthetic statement handle returned by SQLite DBI.column_info is not marked active. The bundled DBI.pm implementation of fetchall_arrayref returns undef immediately for an inactive statement handle, so auto_load receives no columns and does not generate column accessors.
This causes t/07-auto_load.t to fail its first_name and id accessor assertions.
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:t/07-auto_load.treproducibly fails tests 2 and 3 on both JVM and interpreter backends. - A focused metadata check returned
COLUMN_NAMErows throughcolumn_info, butfetchall_arrayref({})yielded no rows; afterauto_load,Customer->can('first_name')andCustomer->can('id')were false.
Suspected cause
columnInfoViaPragma in src/main/java/org/perlonjava/runtime/perlmodule/DBI.java stores the rows in _pragma_rows, but unlike the ordinary metadata result handle it does not set the statement handle's Active flag. src/main/perl/lib/DBI.pm checks $sth->{Active} at the start of fetchall_arrayref and returns undef when false.
Expected result
The synthetic SQLite metadata statement should behave as an active DBI statement handle, and fetchall_arrayref({}) should return the column rows so auto_load can generate accessors.
The same CPAN run also found a separate SQLite identifier quoting failure for a table named order; that behavior is tracked separately.
- 主要语言
- 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 天内回复
-
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 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
PDLPorters/pdl#561 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
objectionary/eolang.sty#197 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
radiator-software/p5-net-ssleay#577 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
beyondgrep/website#143 ·