DBI do() handling incorrectly prepares MySQL SET statements under PerlOnJava
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- backend, database, testing-qa
Direzione di ricerca
Inizia da DBI.pm intorno alla riga 113 e verifica come DBI::db::do esegue il dispatch quando t/standard.t lo ridefinisce. Esegui t/standard.t e t/syntax.t sotto PerlOnJava, quindi confronta il percorso basato su SQLite con il Perl di sistema. Il lavoro è completato quando l'override viene rispettato e la copertura di regressione mirata passa senza inviare sintassi SET di MySQL a SQLite.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
DBIx::Connector::Retry::MySQL v1.0.1 fails under PerlOnJava because a DBI do() call for a MySQL SET SESSION statement is executed against the default in-memory SQLite connection and reaches SQLite prepare handling. SQLite rejects the MySQL SET syntax, causing the retry tests to fail.
Reproduction
Distribution: DBIx-Connector-Retry-MySQL v1.0.1
CPAN run: 20260913-205737-64746
Failing tests: t/standard.t and t/syntax.t
The distribution tests intentionally use an in-memory SQLite database when DBITEST_DSN is unset. In t/standard.t, the test suite redefines DBI::db::do so that SET statements return a successful 0E0 value; the database operation is not intended to require a live MySQL server.
PerlOnJava result:
t/standard.t ........... 10/14 subtests failed
t/syntax.t ............. 1/3 subtests failed
Failed 2/4 test programs. 11/19 subtests failed.
The repeated exception is:
DBI prepare failed: near "SET": syntax error at jar:PERL5LIB/DBI.pm line 113.
The exception propagates through DBIx::Connector::Retry::MySQL::_set_retry_session_timeouts while it executes SET SESSION timeout commands. The failures then cascade into incorrect retry durations, attempt counters, and exception matching.
Oracle
The same distribution and dependency versions pass completely under system Perl in the same run:
t/standard.t ........... ok
t/syntax.t ............. ok
All tests successful.
Files=4, Tests=19
The system-Perl test run also confirms that no MySQL service is required for the default test path. It uses SQLite and the test override for DBI::db::do.
Expected behavior
PerlOnJava should honor the DBI::db::do dispatch used by the test suite, allowing the SET SESSION statements to be handled by the test override, or otherwise provide compatible behavior for this DBI operation without sending MySQL SET syntax to SQLite prepare.
Investigation requested
Investigate DBI method dispatch and do()/prepare() behavior in the PerlOnJava DBI implementation, especially when a Perl test redefines DBI::db::do. Add focused regression coverage for a DBI::db::do override and for the SQLite-backed DBIx::Connector::Retry::MySQL test path.
- Lingua principale
- Perl
- Stelle
- 64
- Fork
- 6
- Merge medio
- 5h 25m
- PR unite (30g)
- 157
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di fglock/PerlOnJava
-
area:cpan-port area:unicode bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
fglock/PerlOnJava#1341 ·
-
area:cpan-port bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 44/100
fglock/PerlOnJava#1459 ·
-
area:cpan-port bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
fglock/PerlOnJava#1457 ·
-
bug high-impact
Difficoltà 3/5 1-2 giorni Idoneità per principianti 67/100
fglock/PerlOnJava#1456 · 1 commento ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 72/100
fglock/PerlOnJava#1455 ·
Tutte le issue di fglock/PerlOnJava
Issue simili
-
1.severity: security
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
api7/lua-resty-saml#63 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100