Quote SQLite table identifiers in DBI column_info PRAGMA
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 84/100
調査の方向性
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
- 平均マージ
- 4時間 29分
- マージ済み PR(30日)
- 176
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fglock/PerlOnJava のほかの issue
-
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:platform area:runtime bug
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
fglock/PerlOnJava#1635 ·
メンテナーはふだん 1 日以内に返信
-
area:cpan-port area:runtime bug
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
fglock/PerlOnJava#1634 ·
メンテナーはふだん 1 日以内に返信
-
area:cpan-port bug
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
fglock/PerlOnJava#1633 ·
メンテナーはふだん 1 日以内に返信
fglock/PerlOnJava の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
convos-chat/convos#977 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
inverse-inc/packetfence#9387 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
linux-test-project/lcov#552 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
szTheory/exifcleaner#383 ·
メンテナーはふだん 1 日以内に返信
-
1.severity: security
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
NixOS/nixpkgs#569828 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信