Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

SQLite column_info statement is inactive, breaking ActiveRecord auto_load

Chiusa Adatta ai principianti
#1,604 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
85/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java, perl, sqlite
Ambito
backend, databases

Direzione di ricerca

Inizia con src/main/java/org/perlonjava/runtime/perlmodule/DBI.java e l'entry point columnInfoViaPragma, poi esamina src/main/perl/lib/DBI.pm fetchall_arrayref e il relativo controllo di Active. Esegui t/07-auto_load.t; completato significa che vengono restituite le righe SQLite column_info e che gli accessor first_name e id passano.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Perl
Stelle
64
Fork
7
Merge medio
4h 34m
PR unite (30g)
181

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di fglock/PerlOnJava

Tutte le issue di fglock/PerlOnJava

Issue simili

Altre issue su Perl

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.