Quote SQLite table identifiers in DBI column_info PRAGMA
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 84/100
Hướng nghiên cứu
Bắt đầu tại src/main/java/org/perlonjava/runtime/perlmodule/DBI.java, ở columnInfoViaPragma, sau đó tái hiện lỗi bằng các bài kiểm thử SQLite t/13-init.t, t/14-smart-accessors.t và t/15-sql-row.t. Được xem là hoàn tất khi column_info trả về siêu dữ liệu cho một bảng có tên order mà không phát sinh lỗi cú pháp SQLite; lỗi riêng liên quan đến active-flag được theo dõi trong #1604.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Perl
- Star
- 64
- Fork
- 7
- Merge trung bình
- 5 giờ 11 phút
- Pull request đã merge (30 ngày)
- 186
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của fglock/PerlOnJava
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
fglock/PerlOnJava#1651 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
fglock/PerlOnJava#1579 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:cpan-port area:unicode bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
fglock/PerlOnJava#1341 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:performance area:runtime bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
fglock/PerlOnJava#1723 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DateTime::subtract fails when nanosecond result crosses midnightCó thể đã có người làm @fglock đã nhận hôm nay. Đang mởarea:runtime bug high-impact
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
fglock/PerlOnJava#1720 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của fglock/PerlOnJava
Issue tương tự
-
CPAN install failingĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
sous-chefs/perl#110 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug help wanted
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 70/100
bioepic-data/bervo#145 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Type: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
inverse-inc/packetfence#9413 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Ubuntu .deb packages ship all files owned by uid/gid 1001 (CI user runner) instead of root:rootĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100