Skip to content

Cherry pick #119510 to 26.9: Bump mariadb-connector-c to v3.4.10 - #125695

Merged
robot-clickhouse merged 7 commits into
backport/26.9/119510from
cherrypick/26.9/119510
Oct 14, 2026
Merged

robot-clickhouse merged 7 commits into
backport/26.9/119510from
cherrypick/26.9/119510

Conversation

@robot-clickhouse-ci-2

Copy link
Copy Markdown
Contributor

Original pull-request #119510

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Before you resolve anything

Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

actueleai and others added 6 commits September 11, 2026 14:03
Points the submodule at the ClickHouse fork branch `ClickHouse/v3.4.10`
(`eebaeaaa8255`), which carries the remaining ClickHouse patch series
rebased onto upstream `v3.4.10`.

Three of the seven patches that were on the old pin are gone because
upstream merged equivalent fixes into `v3.4.10`:

* `pvio_socket_wait_io_or_timeout` now re-polls with the remaining time
  budget on `EINTR` and reports `ETIMEDOUT` when it is exhausted, so
  `MYSQL_OPT_CONNECT_TIMEOUT` is honoured under periodic signals.
* The TLS handshake loop in `libmariadb/secure/openssl.c` waits with
  `pvio->timeout[PVIO_CONNECT_TIMEOUT]` instead of a hardcoded 5 ms and
  passes `is_read` correctly for the write direction.

The four remaining patches (atomic `max_allowed_packet` /
`net_buffer_length`, the `_Atomic` shim for `g++`, dropping the
`getservbyname`/`MYSQL_TCP_PORT` lookup, and removing the `docs`
submodule) are unchanged in content.

Upstream `v3.4.10` adds no new source files under `libmariadb/` or
`plugins/` (only a replication fuzzer under `tools/`, which ClickHouse
does not build), so the source lists in
`contrib/mariadb-connector-c-cmake/CMakeLists.txt` need no changes; only
`CPACK_PACKAGE_VERSION_PATCH` is bumped to match upstream.

Co-Authored-By: Claude Opus 5 <[email protected]>
…tor-c-v3.4.10

# Conflicts:
#	contrib/mariadb-connector-c
Points the submodule at the ClickHouse fork branch `ClickHouse/v3.4.10`
(`b3c09ab333c2`), which carries the ClickHouse patch series rebased onto
upstream `v3.4.10`.

The four long-standing patches are unchanged in content: atomic
`max_allowed_packet` / `net_buffer_length` with the `_Atomic` shim for
`g++`, dropping the `getservbyname`/`MYSQL_TCP_PORT` lookup in
`mysql_once_init`, removing the `services` database dependency, and
removing the `docs` submodule. A new patch clears the OpenSSL error queue
before every SSL call that `SSL_get_error` reads, so a leftover
`ERR_LIB_SYS` entry no longer turns a signal-interrupted TLS read into a
spurious `SSL_ERROR_SYSCALL`/`CR_SERVER_LOST`.

Upstream `v3.4.10` is mostly a security release: it fixes out-of-bounds
reads in `unpack_fields` (CONC-847), `init_read_hdr` (CONC-842), and
`mthd_my_read_rows` (CONC-843), a TLS verification bypass during
auth-switch (CONC-846), a PBKDF2 CPU-stall in the `parsec` plugin
(CONC-838), and clamps server-provided field lengths and the default
`MAX_RESULT_COLUMNS` (CONC-820). The `pvio_socket` and OpenSSL TLS paths
were rewritten, which is why the three earlier ClickHouse timeout/TLS
patches are dropped as upstreamed.

No new source files were added under `libmariadb/` or `plugins/` (only a
replication fuzzer under `tools/`, which ClickHouse does not build), so
the source lists in `contrib/mariadb-connector-c-cmake/CMakeLists.txt`
need no changes; `CPACK_PACKAGE_VERSION_PATCH` is already bumped to 10.

Co-Authored-By: Claude Code <[email protected]>
`mariadb-connector-c` v3.4.10 no longer skips peer certificate
verification when a CA certificate is configured, so the server hostname
is now checked against the certificate. The test server certificate had
only `CN=server`, which made `test_storage_mysql` SSL tests fail with
`TLS/SSL error: Hostname verification failed`.

Re-sign the server certificate with the existing CA and server key,
adding a `subjectAltName` with the MySQL service hostnames used by the
integration tests.

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=119510&sha=f5ed97fed2c10fc817b10e70a291a874feb73450&name_0=PR&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%20targeted%29
#119510

Co-Authored-By: Claude Fable 5.1 <[email protected]>
….4.10

Bump `mariadb-connector-c` to v3.4.10
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request labels Oct 13, 2026
Resolve the submodule conflict by taking the v3.4.10 commit of
`mariadb-connector-c`; the release branch pointed to an older commit of the
ClickHouse fork that was missing the OpenSSL error-queue fix, which the
v3.4.10 fork branch already carries.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@robot-clickhouse
robot-clickhouse merged commit dd37fba into backport/26.9/119510 Oct 14, 2026
1 check passed
@robot-clickhouse
robot-clickhouse deleted the cherrypick/26.9/119510 branch October 14, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants