Skip to content

Fix DBI bind_param, regex \Q delimiter escaping, JDBC error normalization, and more#419

Merged
fglock merged 4 commits intomasterfrom
feature/dbi-column-info-autocommit
Apr 1, 2026
Merged

Fix DBI bind_param, regex \Q delimiter escaping, JDBC error normalization, and more#419
fglock merged 4 commits intomasterfrom
feature/dbi-column-info-autocommit

Conversation

@fglock
Copy link
Copy Markdown
Owner

@fglock fglock commented Apr 1, 2026

Summary

Continues DBIx::Class runtime fixes on the feature/dbi-column-info-autocommit branch. This PR includes 11 commits fixing various runtime issues, with the overall goal of improving DBIx::Class test compatibility.

Key fixes in this PR

  • DBI bind_param deferred execution: bind_param() no longer calls stmt.setObject() immediately (which fails on reused/non-executing PreparedStatements). Instead, params are stored and applied during execute(). Uses RuntimeScalarType.isReference() instead of exact type check.
  • JDBC error message normalization: Added normalizeErrorMessage() to extract native error messages from JDBC-wrapped strings (e.g., [SQLITE_MISMATCH] Data type mismatch (datatype mismatch)datatype mismatch).
  • Regex \Q delimiter escaping: Fixed qr/\Qfoo\/bar/ producing (?^:foo\\\/bar) instead of correct (?^:foo\/bar). Delimiter escaping now resolved before \Q processing in StringParser.java.
  • MODIFY_CODE_ATTRIBUTES: Implemented MODIFY_CODE_ATTRIBUTES call for subroutine attributes (sub foo : Attr { }).
  • ROLLBACK TO SAVEPOINT: Fixed ROLLBACK TO SAVEPOINT being intercepted as full ROLLBACK.
  • CODE reference @inc hooks: Support PAR-style module loading where @INC hook returns a line-reader CODE ref.
  • InterpreterFallbackException: Catch at top-level to handle ASM Frame.merge() crashes on complex subs.
  • -w flag vs no warnings 'redefine': Fixed -w flag incorrectly overriding lexical no warnings pragma.

Test results

  • t/100populate.t: 59/60 real tests pass (was ~36). Tests 37-42, 52-53, 58 newly passing.
  • Full DBIx::Class suite: 68/314 test files fully passing, 93.7% individual test pass rate (5579/5953 OK).
  • All make unit tests pass.

Test plan

  • make passes all unit tests
  • t/100populate.t: 59/60 real tests pass
  • bind_param + execute flow verified with manual test
  • Regex \Q delimiter escaping verified

Generated with Devin

@fglock fglock force-pushed the feature/dbi-column-info-autocommit branch from b5cf87b to 46f16bd Compare April 1, 2026 19:01
fglock and others added 4 commits April 1, 2026 22:46
…BLE hooks, interpreter context, ternary-as-lvalue

Changes since squash-merge to master:
- Fix B::CV->STASH->NAME and GV->NAME introspection (uses Sub::Util::subname)
- Preserve @inc entry relativity in require/use filenames
- Fix Long.MIN_VALUE overflow in initializeWithLong
- Add STORABLE_freeze/thaw hook support for DBIx::Class serialization
- Fix interpreter context propagation for subroutine bodies (wantarray)
- Fix ternary-as-lvalue with LIST assignment branches (Class::Accessor::Grouped)
- Confirm File::stat VerifyError is resolved
- Fix DBI retry logic for stale PreparedStatements after ROLLBACK
- Update DBIx::Class design doc through step 5.34

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- B.pm: detect stash deletion/clearing/undef to mark CVs as anonymous
  (fixes op/stash.t and uni/stash.t -6 regressions, net +2 improvement)
- ModuleOperators.java: strip trailing slash from @inc dirs to avoid
  double slashes in require filenames (fixes op/caller.t -1 regression)
- NumericPackHandler.java: resolve numeric overload once for blessed
  objects before handleInfinity check (fixes op/pack.t -1 regression)

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The ee (double eval) check used modifierStr.contains("ee") which
required the two 'e' flags to be adjacent. In Perl 5, flags like
"excess" (e,x,c,e,s,s) are valid and treated as ee. Fix by counting
'e' occurrences instead.

This fixes japh/abigail.t timeout (0/0 -> 76/130) since the "Funky
loop" tests use s///excess which relies on double eval to progressively
consume the string. Without ee, the replacement wasn't eval'd a second
time, causing infinite substitution loops.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The StringParser ESCAPE state was removing backslashes before delimiter
characters for all string types, but this is only correct for regex
patterns (m//, qr//, s///). For double-quoted strings, the backslash
before a delimiter is both a delimiter escape AND a content escape that
the downstream parser needs to see.

Add isRegex parameter to parseRawStringWithDelimiter and parseRawStrings,
set true only for m/qr/s operators.

Fixes CI failure in unit/string_interpolation.t.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@fglock fglock force-pushed the feature/dbi-column-info-autocommit branch from e68b51c to a22e12c Compare April 1, 2026 20:47
@fglock fglock merged commit 39415d2 into master Apr 1, 2026
2 checks passed
@fglock fglock deleted the feature/dbi-column-info-autocommit branch April 1, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant