Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

SQLite column_info statement is inactive, breaking ActiveRecord auto_load

クローズ 初心者向け
#1,604 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
85/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java, perl, sqlite
領域
backend, databases

調査の方向性

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 の本文から書いたものです。

説明

area:cpan-port area:database bug

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-Simple 1.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.t reproducibly fails tests 2 and 3 on both JVM and interpreter backends.
  • A focused metadata check returned COLUMN_NAME rows through column_info, but fetchall_arrayref({}) yielded no rows; after auto_load, Customer->can('first_name') and Customer->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
平均マージ
4時間 27分
マージ済み PR(30日)
178

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

fglock/PerlOnJava のほかの issue

fglock/PerlOnJava の issue をすべて見る

似ている issue

Perl の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。