Repository navigation
Bump mariadb-connector-c from 3.1.29 to 3.4.9 - #108328
Merged
Merged
Conversation
Update the `contrib/mariadb-connector-c` submodule from the fork's `3.1.29` branch (upstream `v3.4.9` was three minor versions ahead) to a new `ClickHouse/v3.4.9` branch built on top of upstream `v3.4.9`. The fork's `3.1.29` branch carried nine ClickHouse patches on top of upstream `v3.1.29`. They were triaged for `v3.4.9`: Kept (re-ported, original authorship preserved): - `Make global vars atomic` and `Strange fix for _Atomic in g++` - `Remove dependency on "services" database` (drop `getservbyname` / `MYSQL_TCP_PORT`, always use `MARIADB_PORT`) - `Fix calling wait_io_or_timeout()` (pass `is_read=FALSE` on the write paths so we wait for writability, not readability) Dropped (now redundant): - `Port to BoringSSL`: ClickHouse links real OpenSSL (which provides `EVP_ripemd160`), and upstream `v3.4.9` already removed the `MA_HASH_RIPEMD160` case from `openssl_crypt.c`. - `Fix usage of wait_io_or_timeout from TLS layers` (timeout units): upstream rewrote these call sites to use a fixed 5 ms poll-and-retry loop, which supersedes it. - `rm zlib`: upstream removed bundled `zlib` by `v3.4.9`. - `cleaning duplicate linker flags` and `fixed SEARCH_LIBRARY`: they touch upstream CMake files that ClickHouse deletes and replaces with its own `contrib/mariadb-connector-c-cmake/`. CMake build integration (`contrib/mariadb-connector-c-cmake/CMakeLists.txt`): - drop `ma_sha1.c` (removed upstream; hashing comes from the already-built `openssl_crypt.c`) and add the new `ma_decimal.c` - drop the `aurora` connection plugin (`plugins/connection/aurora.c` was removed upstream) Verified by building `lib_mariadbclient.a` and the `mysqlxx` consumer.
Contributor
|
Workflow [PR], commit [98b2065] Summary: ❌
AI ReviewSummaryThis PR bumps Final Verdict✅ No findings to post as inline review comments. |
thevar1able
marked this pull request as ready for review
June 23, 2026 20:28
Address review on the 3.4.9 bump: - Since connector 3.4 the zlib protocol compression (CLIENT_COMPRESS) moved behind a client compression plugin. ClickHouse enables it via mysql_options(MYSQL_OPT_COMPRESS) (mysqlxx Connection, when enable_compression is set), so without a registered COMPRESSION plugin compression_plugin(net) stays null and mysql_real_connect fails with CR_ERR_LOAD_PLUGIN. Register plugins/compress/c_zlib.c as a static builtin plugin (matching upstream plugins/compress/CMakeLists.txt) before ma_client_plugin.c is configured. - Bump CPACK_PACKAGE_VERSION from 3.1.29 to 3.4.9 so the generated MARIADB_PACKAGE_VERSION (used by mysql_get_client_info, mysql_get_client_version and the _client_version connect attribute) reports the correct connector version.
CI on the 3.4.9 bump showed flaky "TLS/SSL error: Connection timed out (110)" failures across all MySQL tests (02479_mysql_connect_to_self, 02680_mysql_ast_logical_err, 02833_concurrent_sessions, test_storage_mysql, test_dictionaries_mysql). Root cause: upstream v3.4.9 rewrote the TLS wait_io_or_timeout() call sites to use a hardcoded 5 ms timeout; since the handshake socket is non-blocking, that 5 ms poll is the only timeout governing it, so under sanitizer load the handshake aborts spuriously. Point at the fork commit that restores using the connection's configured timeouts (pvio->timeout[...], in ms) for the TLS connect/read/write polls. CI report: #108328
test_background_dictionary_reconnect asserted on the connector's host-error text "Can't connect to MySQL server on ...". mariadb-connector-c 3.4.x dropped "MySQL" from this message (errno 2003 is now "Can't connect to server on '%-.64s' (%d)"), so the LIKE pattern matched 0 rows. Update the pattern to the new wording. The reconnect logic itself is unaffected (the other two assertions in the test pass). CI report: #108328
evillique
approved these changes
Jun 29, 2026
zeekay
pushed a commit
to hanzoai/datastore
that referenced
this pull request
Sep 11, 2026
CI on the 3.4.9 bump showed flaky "TLS/SSL error: Connection timed out (110)" failures across all MySQL tests (02479_mysql_connect_to_self, 02680_mysql_ast_logical_err, 02833_concurrent_sessions, test_storage_mysql, test_dictionaries_mysql). Root cause: upstream v3.4.9 rewrote the TLS wait_io_or_timeout() call sites to use a hardcoded 5 ms timeout; since the handshake socket is non-blocking, that 5 ms poll is the only timeout governing it, so under sanitizer load the handshake aborts spuriously. Point at the fork commit that restores using the connection's configured timeouts (pvio->timeout[...], in ms) for the TLS connect/read/write polls. CI report: ClickHouse#108328
zeekay
pushed a commit
to hanzoai/datastore
that referenced
this pull request
Sep 11, 2026
test_background_dictionary_reconnect asserted on the connector's host-error text "Can't connect to MySQL server on ...". mariadb-connector-c 3.4.x dropped "MySQL" from this message (errno 2003 is now "Can't connect to server on '%-.64s' (%d)"), so the LIKE pattern matched 0 rows. Update the pattern to the new wording. The reconnect logic itself is unaffected (the other two assertions in the test pass). CI report: ClickHouse#108328
zeekay
pushed a commit
to hanzoai/datastore
that referenced
this pull request
Sep 11, 2026
…nector-c-3.4.9 Bump `mariadb-connector-c` from 3.1.29 to 3.4.9
thevar1able
added a commit
that referenced
this pull request
Oct 14, 2026
Resolve conflicts: release 26.3 still carried `mariadb-connector-c` 3.1.29, because the 3.4.9 bump (#108328) was never backported. Take the master state of `contrib/mariadb-connector-c-cmake/CMakeLists.txt` (zlib compression plugin, `ma_decimal.c`, version 3.4.10) and the v3.4.10 submodule commit, and adjust the expected connection error message in `test_dictionaries_mysql`, which changed in connector 3.4. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bump the
mariadb-connector-csubmodule from the fork's3.1.29branch to a newClickHouse/v3.4.9branch built on upstreamv3.4.9.The fork's
3.1.29branch carried nine ClickHouse patches on top of upstreamv3.1.29. They were triaged forv3.4.9:Kept (re-ported onto
v3.4.9, original authorship preserved):Make global vars atomicandStrange fix for _Atomic in g++Remove dependency on "services" database— dropgetservbyname(/etc/serviceslookup) and theMYSQL_TCP_PORTenv override; always useMARIADB_PORTFix calling wait_io_or_timeout()— on the TLS write paths (SSL_ERROR_WANT_WRITEinma_tls_connectandma_tls_write) passis_read=FALSEso we wait for the socket to become writable rather than readable; otherwise the 5 ms poll times out and breaks the loop, failing the write prematurelyDropped (now redundant):
Port to BoringSSL— ClickHouse links real OpenSSL (which providesEVP_ripemd160), and upstreamv3.4.9already removed theMA_HASH_RIPEMD160case fromopenssl_crypt.cFix usage of wait_io_or_timeout from TLS layers(timeout units) — upstream rewrote these call sites to use a fixed 5 ms poll-and-retry loop, which supersedes itrm zlib— upstream removed bundledzlibbyv3.4.9cleaning duplicate linker flagsandfixed SEARCH_LIBRARY— they touch upstream CMake files that ClickHouse deletes and replaces with its owncontrib/mariadb-connector-c-cmake/Build integration (
contrib/mariadb-connector-c-cmake/CMakeLists.txt):ma_sha1.c(removed upstream; hashing now comes from the already-builtopenssl_crypt.c) and add the newma_decimal.cauroraconnection plugin (plugins/connection/aurora.cwas removed upstream)Verified locally by building
lib_mariadbclient.aand themysqlxxconsumer.The fork branch is at https://github.com/ClickHouse/mariadb-connector-c/tree/ClickHouse/v3.4.9
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Updated
mariadb-connector-cto 3.4.9.Version info
26.7.1.264(included in26.7and later)