Skip to content

fix: correct mariadb relationJoins check#29246

Merged
jacek-prisma merged 1 commit intomainfrom
fix/fix-mariadb-version-check
Feb 25, 2026
Merged

fix: correct mariadb relationJoins check#29246
jacek-prisma merged 1 commit intomainfrom
fix/fix-mariadb-version-check

Conversation

@jacek-prisma
Copy link
Copy Markdown
Contributor

@jacek-prisma jacek-prisma commented Feb 24, 2026

TML-1934

Fixes #29235

Summary by CodeRabbit

  • Tests

    • Extended test matrix with MariaDB versions 8.1.0, 8.4.5, and 8.4.13.
  • Bug Fixes

    • Improved relation-joins compatibility detection for better MariaDB 8.x version support.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 24, 2026

Walkthrough

The MariaDB adapter's inferCapabilities function's version check for supportsRelationJoins was refined to properly evaluate MySQL semantic versioning. The condition now correctly recognizes MySQL 8.1.0+ versions instead of incorrectly evaluating them as unsupported.

Changes

Cohort / File(s) Summary
Relation Joins Version Logic
packages/adapter-mariadb/src/mariadb.ts
Adjusted version comparison for supportsRelationJoins from (major > 8 || major === 8 && minor >= 0 && patch >= 13) to (minor > 0 || minor === 0 && patch >= 13) within the major === 8 context, enabling support for MySQL 8.1+ versions with patch < 13.
Test Matrix Expansion
packages/adapter-mariadb/src/mariadb.test.ts
Added three new test cases for MariaDB versions 8.1.0, 8.4.5, and 8.4.13, each asserting supportsRelationJoins: true to validate the refined version check logic.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'fix: correct mariadb relationJoins check' directly and concisely summarizes the main change: correcting the version check logic for MariaDB relation joins support.
Linked Issues check ✅ Passed The PR implements the exact fix suggested in issue #29235: replacing the flat && comparison with semver-aware logic for MySQL version checking in supportsRelationJoins, and adds test cases for the previously failing versions.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the MariaDB relationJoins version check: test cases for affected versions and the corrected version comparison logic.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/fix-mariadb-version-check

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c1a94ca and 35bb0d6.

📒 Files selected for processing (2)
  • packages/adapter-mariadb/src/mariadb.test.ts
  • packages/adapter-mariadb/src/mariadb.ts

@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
packages/client/runtime/index-browser.js 2.23 KB (0%)
packages/client/runtime/index-browser.d.ts 3.28 KB (0%)
packages/cli/build/index.js 2.5 MB (0%)
packages/client/prisma-client-0.0.0.tgz 26.8 MB (+0.01% 🔺)
packages/cli/prisma-0.0.0.tgz 12.84 MB (0%)
packages/bundle-size/da-workers-libsql/output.tgz 1.33 MB (0%)
packages/bundle-size/da-workers-neon/output.tgz 1.39 MB (0%)
packages/bundle-size/da-workers-pg/output.tgz 1.39 MB (0%)
packages/bundle-size/da-workers-planetscale/output.tgz 1.33 MB (0%)
packages/bundle-size/da-workers-d1/output.tgz 1.3 MB (0%)

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 25, 2026
@aqrln aqrln added this to the 7.5.0 milestone Feb 25, 2026
@jacek-prisma jacek-prisma merged commit c33e8f8 into main Feb 25, 2026
253 checks passed
@jacek-prisma jacek-prisma deleted the fix/fix-mariadb-version-check branch February 25, 2026 13:52
jacek-prisma added a commit that referenced this pull request Feb 27, 2026
[TML-1934](https://linear.app/prisma-company/issue/TML-1934/fix-broken-relationjoins-check-in-the-mariadb-adapter)

Fixes #29235

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Tests**
  * Extended test matrix with MariaDB versions 8.1.0, 8.4.5, and 8.4.13.

* **Bug Fixes**
* Improved relation-joins compatibility detection for better MariaDB 8.x
version support.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@prisma/adapter-mariadb: supportsRelationJoins version check fails for MySQL >= 8.1

2 participants