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

Quote SQLite table identifiers in DBI column_info PRAGMA

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

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

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

評価

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

調査の方向性

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

説明

area:cpan-port area:database bug

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::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: 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 call fetchall_arrayref on 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

環境構築

はじめの一歩

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

fglock/PerlOnJava のほかの issue

fglock/PerlOnJava の issue をすべて見る

似ている issue

Perl の issue をもっと見る

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

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