Skip to content

feat(mariadb): Add MariaDB support - #910

Merged
jeffjensen merged 1 commit into
mainfrom
706-mariadb-support
Aug 6, 2026
Merged

jeffjensen merged 1 commit into
mainfrom
706-mariadb-support

Conversation

@jeffjensen

@jeffjensen jeffjensen commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

  • Add MariaDbDataTypeFactory (extends MySqlDataTypeFactory): declares "mariadb" as a valid database product (silences the "might cause problems with the current database" warning) and recognizes MariaDB's native UUID/INET4/INET6 column types, which MariaDB Connector/J reports as SQL type OTHER with no MySQL equivalent. MariaDB's JSON type is a LONGTEXT alias and already worked via inherited handling.
  • Add a mariadb-11-4 Maven profile + Docker-backed IT suite (MariaDbEnvironment, MariaDbDataTypeFactoryIT) mirroring the existing mysql-9-20 profile, wired into database-profiles.txt and the all-DBs GitHub Actions matrix.
  • Found and worked around a real MariaDB Connector/J gap while wiring up the IT suite: unlike MySQL Connector/J, it has no nullCatalogMeansCurrent-equivalent default, so an unfiltered DatabaseMetaData#getTables() call leaks information_schema/performance_schema tables into dbUnit's table map, surfacing as a SQLSyntaxErrorException the moment an operation like DELETE_ALL touches one. Fixed via MySqlMetadataHandler registration plus nullCatalogMeansCurrent=true on the JDBC URL; documented both in mysql.adoc.

Test plan

  • ./mvnw clean test — 1964 tests, 0 failures
  • ./mvnw clean verify -Pmariadb-11-4 — 356 tests, 0 failures/errors (Docker, local)
  • ./mvnw clean verify -Phsqldb-2-7 — sanity check other profiles unaffected
  • ./mvnw clean install site — site builds; spot-checked rendered databases/mysql.html
  • CI: all-DBs matrix (this PR adds the MariaDB job to it)

Fixes #706

Summary by Sourcery

Add first-class MariaDB support alongside MySQL, including a dedicated data type factory, environment/profile configuration, CI coverage, and documentation updates.

New Features:

  • Introduce MariaDbDataTypeFactory to recognize MariaDB-specific UUID and INET column types and register MariaDB as a supported database product.
  • Add a MariaDB-specific test environment and database profile wired through Maven, Docker, and database-profiles configuration for integration testing.

Bug Fixes:

  • Work around MariaDB Connector/J metadata behavior by ensuring tables are scoped to the current catalog via MySqlMetadataHandler and JDBC nullCatalogMeansCurrent configuration, preventing schema tables from causing SQL errors during operations.

Build:

  • Add MariaDB JDBC driver dependency and a mariadb-11-4 Maven profile backed by a Docker container for running integration tests.

CI:

  • Extend the all-databases GitHub Actions workflow matrix with a MariaDB job using the new profile and JDBC URL configuration.

Documentation:

  • Document MariaDB support and the Connector/J catalog behavior in the MySQL database guide and update the site/database listings and changelog accordingly.

Tests:

  • Add unit and integration tests validating MariaDbDataTypeFactory behavior and end-to-end handling of MariaDB-native UUID/INET data types, plus schema DDL for MariaDB-backed test tables.

Summary by CodeRabbit

  • New Features

    • Added MariaDB 11.4 support, including a dedicated database profile and connection configuration.
    • Added MariaDB-specific handling for UUID, INET4, and INET6 column types.
    • Added Docker-backed MariaDB integration testing and validation.
  • Documentation

    • Added a dedicated MariaDB database guide covering configuration, metadata handling, supported types, and known behavior.
    • Updated MySQL documentation and site navigation to distinguish MariaDB support.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jeffjensen, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 41 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 10af9ee7-c404-46e8-8674-1085487b61d7

📥 Commits

Reviewing files that changed from the base of the PR and between fca05d1 and 90c4180.

📒 Files selected for processing (16)
  • .github/workflows/build-any-branch-with-all-dbs.yml
  • database-profiles.txt
  • pom.xml
  • src/changes/changes.xml
  • src/main/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactory.java
  • src/site/asciidoc/databases.adoc
  • src/site/asciidoc/databases/mariadb.adoc
  • src/site/asciidoc/databases/mysql.adoc
  • src/site/site.xml
  • src/test/java/org/dbunit/DatabaseEnvironment.java
  • src/test/java/org/dbunit/MariaDbEnvironment.java
  • src/test/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactoryIT.java
  • src/test/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactoryTest.java
  • src/test/java/org/dbunit/ext/mysql/MySqlDataTypeFactoryTest.java
  • src/test/resources/mariadb-dbunit.properties
  • src/test/resources/sql/mariadb.sql
📝 Walkthrough

Walkthrough

Adds MariaDB support through a dedicated data type factory, MariaDB 11.4 integration-test profile, database environment, schema fixtures, CI configuration, documentation, and release notes.

Changes

MariaDB support

Layer / File(s) Summary
MariaDB type factory
src/main/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactory.java, src/test/java/org/dbunit/ext/mariadb/*, src/test/java/org/dbunit/ext/mysql/MySqlDataTypeFactoryTest.java
Registers MariaDB and maps UUID, INET4, and INET6 values reported as Types.OTHER to DataType.VARCHAR. Unit tests cover uppercase and lowercase type names.
MariaDB test environment
src/test/java/org/dbunit/DatabaseEnvironment.java, src/test/java/org/dbunit/MariaDbEnvironment.java, src/test/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactoryIT.java, src/test/resources/mariadb-dbunit.properties, src/test/resources/sql/mariadb.sql
Adds MariaDB environment dispatch, MySQL metadata handling, connection settings, schema fixtures, and integration tests for native MariaDB types and round-trip data.
Docker-backed Maven profile
pom.xml, database-profiles.txt, .github/workflows/build-any-branch-with-all-dbs.yml
Adds MariaDB 11.4 driver and container settings, the mariadb-11-4 profile, and the CI JDBC option nullCatalogMeansCurrent=true.
MariaDB documentation and release notes
src/site/asciidoc/databases.adoc, src/site/asciidoc/databases/mariadb.adoc, src/site/asciidoc/databases/mysql.adoc, src/site/site.xml, src/changes/changes.xml
Documents MariaDB type mappings, metadata configuration, system-catalog behavior, site navigation, and release scope.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant TestRunner
  participant MariaDbEnvironment
  participant MariaDbDataTypeFactory
  participant MariaDB
  TestRunner->>MariaDbEnvironment: activate mariadb profile
  MariaDbEnvironment->>MariaDbDataTypeFactory: configure MariaDB type handling
  TestRunner->>MariaDB: run schema and integration test
  MariaDB-->>TestRunner: return metadata and round-trip values
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: adding MariaDB support.
Linked Issues check ✅ Passed The changes add MariaDB support, register it as a supported product, handle MariaDB types, and provide integration tests as requested in [#706].
Out of Scope Changes check ✅ Passed The implementation, tests, CI configuration, documentation, and changelog all support the MariaDB support objective in [#706].
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 706-mariadb-support

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.

@sourcery-ai

sourcery-ai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds first-class MariaDB support by introducing a MariaDbDataTypeFactory, a MariaDB-specific test environment and Maven/Docker profile, wiring MariaDB into the CI matrix and docs, and handling MariaDB Connector/J metadata quirks (UUID/INET* type mapping and catalog filtering).

Sequence diagram for MariaDB metadata handling and type mapping

sequenceDiagram
    participant DbUnitTest
    participant DatabaseConfig
    participant MariaDbDataTypeFactory
    participant Connection
    participant DatabaseMetaData
    participant MySqlMetadataHandler

    DbUnitTest->>DatabaseConfig: setProperty(PROPERTY_DATATYPE_FACTORY, MariaDbDataTypeFactory)
    DbUnitTest->>Connection: getConnection()
    Connection->>DatabaseMetaData: getMetaData()
    DatabaseMetaData->>MySqlMetadataHandler: getTables(null, schema, "%", types)
    Note over DatabaseMetaData,MySqlMetadataHandler: JDBC URL includes nullCatalogMeansCurrent=true

    loop for each column
      DatabaseMetaData->>MariaDbDataTypeFactory: createDataType(sqlType, sqlTypeName)
      alt sqlType == Types.OTHER and sqlTypeName in {UUID, INET4, INET6}
        MariaDbDataTypeFactory-->>DatabaseConfig: DataType.VARCHAR
      else other MariaDB/MySQL types
        MariaDbDataTypeFactory-->>DatabaseConfig: super.createDataType(sqlType, sqlTypeName)
      end
    end
Loading

File-Level Changes

Change Details Files
Introduce MariaDB-specific data type factory building on existing MySQL support and cover it with unit/integration tests.
  • Create MariaDbDataTypeFactory extending MySqlDataTypeFactory, declaring "mariadb" as the only valid DB product and mapping SQL type OTHER with UUID/INET4/INET6 names to VARCHAR
  • Ensure JSON continues to be handled via inherited LONGTEXT behavior, with no special-case logic added
  • Add MariaDbDataTypeFactoryTest to verify valid DB products and UUID/INET4/INET6 mappings, including case-insensitive UUID handling
  • Add MariaDbDataTypeFactoryIT to exercise the factory end-to-end against a live MariaDB instance, asserting metadata types and round-tripping UUID/INET4/INET6 values
src/main/java/org/dbunit/ext/mysql/MariaDbDataTypeFactory.java
src/test/java/org/dbunit/ext/mysql/MariaDbDataTypeFactoryTest.java
src/test/java/org/dbunit/ext/mysql/MariaDbDataTypeFactoryIT.java
Add MariaDB test environment, schema DDL, and Maven profile, mirroring existing MySQL Docker-backed setup and wiring it into the generic DatabaseEnvironment and CI matrix.
  • Create MariaDbEnvironment extending DatabaseEnvironment, configuring MariaDbDataTypeFactory and MySqlMetadataHandler, and preserving identifier case
  • Wire MariaDbEnvironment into DatabaseEnvironment.getInstance() using the "mariadb" profile name
  • Add mariadb.sql DDL for standard dbUnit test tables (TEST_TABLE, SECOND_TABLE, EMPTY_TABLE, PK_TABLE, ONLY_PK_TABLE, EMPTY_MULTITYPE_TABLE, IDENTITY_TABLE) using InnoDB
  • Add mariadb-dbunit.properties test profile using the MariaDB JDBC driver, nullCatalogMeansCurrent=true, and pointing at mariadb.sql DDL
  • Introduce a mariadb-11-4 Maven profile that loads mariadb-dbunit.properties, starts a mariadb:11.4 Docker container with dbunit user/schema, and depends on the MariaDB driver
  • Declare MariaDB JDBC test dependency and Docker image/port/ready-message properties in pom.xml, including a reusable mariadbDriverVersion property
src/test/java/org/dbunit/MariaDbEnvironment.java
src/test/resources/sql/mariadb.sql
src/test/resources/mariadb-dbunit.properties
pom.xml
src/test/java/org/dbunit/DatabaseEnvironment.java
Integrate MariaDB into documentation, changelog, database profile metadata, and CI all-databases workflow, documenting the MariaDB Connector/J catalog behavior workaround.
  • Update changes.xml release description and add an action entry for issue Create Support for MariaDB #706 describing MariaDB support and the Connector/J metadata quirk
  • Add a MariaDB entry to the GitHub Actions all-DBs matrix with the mariadb-11-4 profile and a JDBC URL including nullCatalogMeansCurrent=true
  • Register the mariadb-11-4 profile in database-profiles.txt and update site docs (databases.adoc and mysql.adoc) to mention MariaDB and document the need for MySqlMetadataHandler or nullCatalogMeansCurrent=true
  • Add Docker image properties for MariaDB (image name, ready message regex, port) to support automated startup in tests
src/changes/changes.xml
.github/workflows/build-any-branch-with-all-dbs.yml
database-profiles.txt
src/site/asciidoc/databases.adoc
src/site/asciidoc/databases/mysql.adoc
pom.xml

Assessment against linked issues

Issue Objective Addressed Explanation
#706 Provide first-class MariaDB support in code (including an IDataTypeFactory that recognizes MariaDB and avoids the 'might cause problems with the current database MariaDB (list=[mysql])' warning).
#706 Add MariaDB to the supported/tested database set, including configuration and documentation updates indicating MariaDB is supported.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 3 issues, and left some high level feedback:

  • The MariaDB profile declares an additional mariadb-java-client dependency without a version, even though a versioned test-scope dependency is already added in the main POM; consider relying on the managed version to avoid future divergence.
  • The nullCatalogMeansCurrent=true JDBC URL parameter is hard-coded in both the GitHub Actions matrix and mariadb-dbunit.properties; consider centralizing this configuration or documenting a single source of truth to reduce the chance of the values drifting.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The MariaDB profile declares an additional `mariadb-java-client` dependency without a version, even though a versioned test-scope dependency is already added in the main POM; consider relying on the managed version to avoid future divergence.
- The `nullCatalogMeansCurrent=true` JDBC URL parameter is hard-coded in both the GitHub Actions matrix and `mariadb-dbunit.properties`; consider centralizing this configuration or documenting a single source of truth to reduce the chance of the values drifting.

## Individual Comments

### Comment 1
<location path="pom.xml" line_range="351-359" />
<code_context>
         <version>${hsqldbDriverVersion}</version>
         <scope>test</scope>
       </dependency>
+      <dependency>
+        <groupId>org.mariadb.jdbc</groupId>
+        <artifactId>mariadb-java-client</artifactId>
</code_context>
<issue_to_address>
**question:** The Oracle JDBC dependency in the MariaDB profile looks out of place and could be an accidental inclusion.

In the `mariadb-11-4` profile, there’s both `mariadb-java-client` and `ojdbc8`. If this profile is intended to be MariaDB-only and doesn’t run Oracle tests, consider dropping `ojdbc8` or documenting why it’s needed to avoid unnecessary JDBC drivers and cross-profile coupling.
</issue_to_address>

### Comment 2
<location path="src/main/java/org/dbunit/ext/mysql/MariaDbDataTypeFactory.java" line_range="72-81" />
<code_context>
+    }
+
+    @Override
+    public DataType createDataType(int sqlType, String sqlTypeName) throws DataTypeException
+    {
+        if (sqlType == Types.OTHER)
+        {
+            if (SQL_TYPE_NAME_UUID.equalsIgnoreCase(sqlTypeName)
+                    || SQL_TYPE_NAME_INET4.equalsIgnoreCase(sqlTypeName)
+                    || SQL_TYPE_NAME_INET6.equalsIgnoreCase(sqlTypeName))
+            {
+                return DataType.VARCHAR;
+            }
+        }
+
+        return super.createDataType(sqlType, sqlTypeName);
+    }
+}
</code_context>
<issue_to_address>
**issue (bug_risk):** createDataType assumes sqlTypeName is non-null, which can lead to a NullPointerException for Types.OTHER with missing type names.

`sqlTypeName` is used in `equalsIgnoreCase` without a null check, so a `null` type name (common for `Types.OTHER` in some drivers) will throw an NPE. Please add a null guard, e.g. an early `if (sqlTypeName == null) return super.createDataType(sqlType, sqlTypeName);` or wrap the comparisons with `sqlTypeName != null && ...` before calling `equalsIgnoreCase`.
</issue_to_address>

### Comment 3
<location path="src/test/java/org/dbunit/ext/mysql/MariaDbDataTypeFactoryTest.java" line_range="44-53" />
<code_context>
+        }
+    }
+
+    @Test
+    void testMariaDbNativeTypes_withUuidInet4Inet6Columns_roundTripThroughDatabase()
+            throws Exception
</code_context>
<issue_to_address>
**suggestion (testing):** Add coverage for lowercase INET4/INET6 type names, mirroring the UUID case

Since the driver already reports `uuid` in varying cases and you test for that, please also add coverage for lowercase `inet4`/`inet6` (e.g. `createFactory().createDataType(Types.OTHER, "inet4")`) so the `equalsIgnoreCase` behavior is exercised for all MariaDB-specific types.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread pom.xml
Comment thread src/main/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactory.java
@jeffjensen
jeffjensen force-pushed the 706-mariadb-support branch from c7afbcc to 52e91e4 Compare August 6, 2026 01:49
@jeffjensen

Copy link
Copy Markdown
Member Author

On the two overall comments from Sourcery's review:

  • mariadb-java-client version: it's not actually unversioned - the profile's <dependency> block (like every other vendor profile's) omits the version because it's supplied by dependencyManagement (mariadbDriverVersion, pom.xml ~67/351). Same pattern as mysql-connector-java, postgresql, etc.
  • nullCatalogMeansCurrent=true duplication between the properties file and the workflow matrix: real observation. Added a "keep these in sync" comment on both copies rather than a bigger refactor, since introducing a single-source-of-truth mechanism just for this one profile would be inconsistent with how mysql/mssql/postgresql already duplicate their URLs the same way between their properties file and the matrix.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (2)
src/test/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactoryTest.java (1)

59-59: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

End the new AssertJ descriptions with periods.

The six .as("type") descriptions do not end with a period. Keep failure messages consistent with the test convention.

Proposed fix
-        assertThat(actual).as("type").isSameAs(expected);
+        assertThat(actual).as("type.").isSameAs(expected);

Also applies to: 70-70, 79-79, 87-87, 96-96, 104-104

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/test/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactoryTest.java` at line
59, Update the six AssertJ descriptions in the affected assertions to use the
existing “type.” wording, including the assertions near lines 59, 70, 79, 87,
96, and 104, without changing the assertions themselves.

Source: Coding guidelines

src/main/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactory.java (1)

67-73: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add complete JavaDoc to the new public APIs.

The public API documentation is incomplete at these sites.

  • src/main/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactory.java#L67-L73: Add complete JavaDoc for both public overrides, including parameter, return, and throws descriptions where applicable.
  • src/test/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactoryTest.java#L39-L43: Add JavaDoc for the public createFactory() override.
  • src/test/java/org/dbunit/MariaDbEnvironment.java#L28-L35: Add a complete topic sentence for MariaDbEnvironment and JavaDoc for its public constructor.
  • src/test/java/org/dbunit/MariaDbEnvironment.java#L59-L65: Add complete JavaDoc for convertString(String), including parameter and return descriptions.

As per coding guidelines, “Write JavaDoc comments on all public classes and methods; use complete sentences beginning with a capital letter and ending with a period for topic text, parameters, and return descriptions.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/main/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactory.java` around
lines 67 - 73, Complete the JavaDoc for the public overrides
getValidDbProducts() and createDataType(int, String) in
src/main/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactory.java, including
complete topic, parameter, return, and applicable throws descriptions. Document
the public createFactory() override in
src/test/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactoryTest.java. In
src/test/java/org/dbunit/MariaDbEnvironment.java, add a complete topic sentence
for MariaDbEnvironment, JavaDoc for its public constructor, and complete
parameter and return documentation for convertString(String); ensure all
descriptions are capitalized, complete sentences ending with periods.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/site/asciidoc/databases/mariadb.adoc`:
- Around line 12-13: Update both API links in the MariaDB documentation,
including the reference around MariaDbDataTypeFactory and the corresponding link
near the later referenced section, to use deployment-relative
link:../apidocs/... paths instead of root-relative link:/dbunit/apidocs/...
paths. Preserve the existing API targets and link text.

In `@src/site/asciidoc/databases/mysql.adoc`:
- Around line 5-7: Update the MySQL guide text around org.dbunit.ext.mysql to
explicitly state that MariaDB has no dedicated metadata handler and uses
MySqlMetadataHandler, while retaining the reference to MariaDB’s dedicated
factory.

In `@src/test/java/org/dbunit/MariaDbEnvironment.java`:
- Around line 51-56: Update DatabaseEnvironment.getConnection() to call
setupDatabaseConfig(config) before returning the DatabaseConnection, then assign
that configured DatabaseConfig to the returned connection. Preserve
MariaDbEnvironment.setupDatabaseConfig() so its MariaDbDataTypeFactory and
MySqlMetadataHandler overrides are applied.

---

Nitpick comments:
In `@src/main/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactory.java`:
- Around line 67-73: Complete the JavaDoc for the public overrides
getValidDbProducts() and createDataType(int, String) in
src/main/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactory.java, including
complete topic, parameter, return, and applicable throws descriptions. Document
the public createFactory() override in
src/test/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactoryTest.java. In
src/test/java/org/dbunit/MariaDbEnvironment.java, add a complete topic sentence
for MariaDbEnvironment, JavaDoc for its public constructor, and complete
parameter and return documentation for convertString(String); ensure all
descriptions are capitalized, complete sentences ending with periods.

In `@src/test/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactoryTest.java`:
- Line 59: Update the six AssertJ descriptions in the affected assertions to use
the existing “type.” wording, including the assertions near lines 59, 70, 79,
87, 96, and 104, without changing the assertions themselves.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d8fdc9e5-0fba-443c-a5b8-2ae7abff440e

📥 Commits

Reviewing files that changed from the base of the PR and between fca05d1 and 52e91e4.

📒 Files selected for processing (16)
  • .github/workflows/build-any-branch-with-all-dbs.yml
  • database-profiles.txt
  • pom.xml
  • src/changes/changes.xml
  • src/main/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactory.java
  • src/site/asciidoc/databases.adoc
  • src/site/asciidoc/databases/mariadb.adoc
  • src/site/asciidoc/databases/mysql.adoc
  • src/site/site.xml
  • src/test/java/org/dbunit/DatabaseEnvironment.java
  • src/test/java/org/dbunit/MariaDbEnvironment.java
  • src/test/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactoryIT.java
  • src/test/java/org/dbunit/ext/mariadb/MariaDbDataTypeFactoryTest.java
  • src/test/java/org/dbunit/ext/mysql/MySqlDataTypeFactoryTest.java
  • src/test/resources/mariadb-dbunit.properties
  • src/test/resources/sql/mariadb.sql

Comment thread src/site/asciidoc/databases/mariadb.adoc
Comment thread src/site/asciidoc/databases/mysql.adoc Outdated
Comment thread src/test/java/org/dbunit/MariaDbEnvironment.java
* Add MariaDbDataTypeFactory in its own org.dbunit.ext.mariadb package
  (extends org.dbunit.ext.mysql.MySqlDataTypeFactory to reuse its
  real, verified-shared type handling, but kept in a separate package
  since MariaDB is its own distinct, independently-branded product -
  mirroring how org.dbunit.ext.netezza stays independent of
  org.dbunit.ext.postgresql despite Netezza's Postgres lineage).
  Declares "mariadb" as a valid database product, silencing the
  "might cause problems with the current database" warning, and
  recognizes MariaDB's native UUID (10.7+) and INET4/INET6 (10.10+)
  column types, which MariaDB Connector/J reports as SQL type OTHER
  with no MySQL equivalent. MariaDB's JSON type is a LONGTEXT alias
  and already worked via the inherited longtext handling.
* Add a mariadb-11-4 Maven profile, driver dependency, and Docker-backed
  IT suite (MariaDbEnvironment, MariaDbDataTypeFactoryIT) mirroring the
  existing mysql-9-20 profile, wired into database-profiles.txt and the
  all-DBs GitHub Actions matrix.
* Add a dedicated, self-contained databases/mariadb.adoc site page and
  navigation entry instead of folding MariaDB coverage into the MySQL
  page, so a user who only knows to look for "MariaDB" can find it.
* Found and worked around a MariaDB Connector/J gap while wiring up the
  IT suite: unlike MySQL Connector/J, it has no
  nullCatalogMeansCurrent-equivalent default, so an unfiltered
  DatabaseMetaData#getTables() call leaks information_schema/
  performance_schema tables into dbUnit's table map, surfacing as a
  SQLSyntaxErrorException the moment an operation like DELETE_ALL
  touches one. Fixed via MySqlMetadataHandler registration (passes the
  schema as the JDBC catalog argument, which the driver does honor)
  plus nullCatalogMeansCurrent=true on the JDBC URL for defense in
  depth, and documented both in the new mariadb.adoc page.
* Address Sourcery review: add lowercase inet4/inet6 createDataType
  test cases mirroring the existing lowercase uuid one, and a
  keep-these-in-sync comment on both copies of the
  nullCatalogMeansCurrent=true JDBC URL parameter (the workflow
  matrix's override and mariadb-dbunit.properties' default).
* Address CodeRabbit review: clarify mysql.adoc's MariaDB cross-
  reference wording - MariaDB reuses MySqlMetadataHandler rather than
  having "its own" metadata handling, which the prior phrasing implied.

Refs: 706
@jeffjensen
jeffjensen force-pushed the 706-mariadb-support branch from 52e91e4 to 90c4180 Compare August 6, 2026 02:08
@jeffjensen
jeffjensen merged commit 7ebd6e5 into main Aug 6, 2026
29 checks passed
@jeffjensen
jeffjensen deleted the 706-mariadb-support branch August 6, 2026 02:13
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.

Create Support for MariaDB

1 participant