← Back to Pull requests

feat(mysql): run the mysql store on mariadb 11.4.7+ and 11.8.2+ #59

Closed
unknown closed this pull request without merging on Nov 02, 2026 07:46 UTC
View on GitHub
unknown unknown commented on Oct 30, 2026 09:56 UTC
Author

PR Checklist


Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines: https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md

  • Tests for the changes have been added (for bug fixes / features)

  • Docs have been added / updated (for bug fixes / features)
  • PR Type


    What kind of change does this PR introduce?

  • Bugfix

  • Feature

  • Code style update (formatting, local variables)

  • Refactoring (no functional changes, no api changes)

  • Build related changes

  • CI related changes

  • Other... Please describe:
  • What is the current behavior?

    MySqlOutboxStore refuses MariaDB. With store-kit's opt-in (#44), some of its statements are still MySQL-only.

    Closes #58

    What is the new behavior?

    MySqlOutboxStore opts into MariaDB 11.4.7+ and 11.8.2+:

  • add() turns a null payload into SQL NULL by comparing it with JSON_EXTRACT('null', '$') instead of CAST('null' AS JSON) (MariaDB has no JSON cast). A test covers the top-level payloads "null", "x", "", 0 and false.

  • On MariaDB, add() writes 64 KiB statements rather than 1 MiB. MariaDB keeps JSON as text, so the statement time grows with its length.

  • On MariaDB, add() binds the batch document as text. MariaDB before 11.4.11 / 11.8.7 cuts a JSON function's result short in a derived table breaking every insert on 11.4.7 and 11.8.2. MySQL keeps JSON_EXTRACT(?, '$').

  • claim() locks with FOR UPDATE SKIP LOCKED, taking the same record locks as FOR UPDATE OF m (checked in MySQL 8.4's data_locks). MariaDB doesn't accept OF, unfortunately.

  • claim()'s lease UPDATE pins the primary key with FORCE INDEX (PRIMARY), since MariaDB 11.6.2+ with innodb_snapshot_isolation on makes no semi-consistent reads.

  • purgeDeadLetters() deletes with the multi-table form (DELETE d FROM ... AS d), since MariaDB accepts an alias in a single-table DELETE from 11.6 only.

  • The add() JSDoc and README describe 1020 on MariaDB 11.6.2+ and the 30-level payload nesting limit. MariaDB now has its own README paragraph.

  • Tests for MySQL-only behavior check what MariaDB does. The sql_require_primary_key test is skipped there.

  • A CI job runs the outbox:mysql-store project on MariaDB 11.4.7, 11.8.2 and 11.8.
  • Tested locally with this branch's store-kit build:

  • MySQL 8.4 and 9.7 pass 333/333.

  • MariaDB 11.4.7, 11.8.2, 11.4 and 11.8 pass 332, with 1 skipped.

  • The outbox and outbox:postgres-store projects pass 784, with 2 skipped.
  • Does this PR introduce a breaking change?


  • Yes

  • No
  • Other information

  • Needs nestjs/store-kit#44 released. Until then the MySQL and MariaDB jobs fail here, since the tests expect its new refusal message. Once it's out, I'll raise the dependency to that ^0.1.N and regenerate the lockfile.
  • Diff: 373 lines (+279 / -94) across 4 files Reviewer: kamilmysliwiec Review duration: 4189m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 373 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.354
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #59"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.8% (MEDIUM) · Higher = larger blast radius
    42.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.9% · Safe to merge
    16.9%
    Repository