MariaDB Connector/C Compatibility: An Update on CONC-821

As a DBA, there are some surprises I enjoy. Discovering a useful feature is one of them. Discovering that an application behaves differently after a maintenance update is considerably further down the list.

Maintenance updates should provide security and bug fixes while also helping people keep their applications running smoothly. Updates should not change behavior, especially not during maintenance releases. Should that happen for some reason, users and maintainers need a clear explanation and a practical way forward.

That’s not exactly what happened recently, causing an issue CONC-821 in MariaDB Connector/C.

Spoiler alert: The behaviour that MariaDB Connector/C changed was undocumented and implicit. We are restoring the old behavior and making it explicit and documented.

What we got wrong

MariaDB Connector/C is the client library used by applications and other bindings to communicate with the database.

A recent change altered how mysql_stmt_bind_result() handled length values supplied by applications. Some callers depended on those values being preserved, and resetting them changed the behavior they observed.

The change did not preserve a behavior that existing applications relied on: keeping caller-provided length values unchanged when binding results. That expectation wasn’t explicitly documented, and the community reports showed how important it was for compatibility across several projects.

What we got wrong was changing that behavior without preserving compatibility for those applications. Their feedback made the requirement clear: the earlier behavior needs to be restored, documented, and protected by regression tests.

That is an important lesson: established application behavior needs to be considered alongside the written interface specification. CONC-821 records the details and subsequent discussion.

How this affected people

In the original example, a date/time value reached the application’s result buffer correctly, but its length remained zero. An application relying on that length could then treat the value as absent. Reports included Qt-based applications and Diesel, the Rust ORM. See the reported cases.

The impact depended on the application and connector build in use. For affected users, however, the consequence was very practical: an update could interrupt something that had previously worked.

The reports and follow-up from application developers and distribution maintainers helped establish that wider impact. Thank you to everyone who took the time to explain what broke and provide evidence.

How we are fixing it

Sergei Golubchik has confirmed the direction: restore the earlier behavior, document it explicitly, and add regression tests to protect it. In the developers mailing-list discussion, he also explained that the temporal-column case had been addressed, while the string and BLOB cases still needed attention.

MariaDB Foundation’s Daniel Black contributed an investigation and a proposed fix during that process. Distribution maintainers also worked on patches for their users. These contributions helped bring real application requirements into the technical discussion. The ticket links to that work.

I like the outcome of that discussion: feedback from people using MariaDB Server is being translated into an explicit compatibility expectation, with documentation and tests to support it.

Sergei would like a Connector/C 3.4.11 release to happen, but cannot yet promise it. The complete correction is not yet available in an upstream release, and there is no confirmed release date. In the meantime, check with your distribution maintainer, as your package may already include a patch.

What we suggest you do

If your applications are working normally, continue your usual maintenance and upgrade testing. This issue concerns particular connector behavior, so its relevance depends on how your applications use that interface.

If you are affected, check the Connector/C package your application actually uses, including its full package revision and source. Checking only the MariaDB Server version is insufficient.

Ask your application or distribution maintainer which maintained package addresses your case. Distributions can carry patches independently of upstream releases: Fedora’s 3.4.9-2.fc44 changelog, for example, explicitly lists a CONC-821 patch. Fedora package changelog. Debian is also working on porting the fix to their packages.

Test the operation that originally failed. If the problem remains, share the package details and a reproducible example in the issue tracker. That feedback helps verify the correction against the applications people actually run.

At the MariaDB Foundation, we want users and maintainers to feel welcome bringing these experiences forward. Listening includes understanding the impact, helping investigate it, and supporting changes informed by what the community needs. Thank you to everyone contributing to that work and helping keep MariaDB’s ecosystem working together.

Enjoy MariaDB!