Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Console View


Categories: connectors experimental galera main
Legend:   Passed Failed Warnings Failed Again Running Exception Offline No data

connectors experimental galera main
Sergei Golubchik
MDEV-39292 fix incorrect merge
Jan Lindström
MDEV-40027 : Galera Cluster-peer > Donor command execution

An appropriately privileged user (with SUPER privileges) could
execute shell commands as the uid of the mariadbd process
because the values of the system variable wsrep_sst_auth,
which can be modified at runtime, were not properly
sanitized when used to construct a shell command.

Combined rsync and mariabackup test cases and added
test case for incorrect values for wsrep_sst_auth.
Marko Mäkelä
MDEV-40063 Corruption due to race in SET GLOBAL innodb_log_archive=ON

There was a race condition between log_t::write_checkpoint() and
the execution of SET GLOBAL innodb_log_archive=ON (enabling log archiving).
We had wrongly allowed the concurrent execution of log_t::set_archive()
and log_t::write_checkpoint(). The result was that
log_sys.next_checkpoint_no was corrupted. This could have broken
crash recovery.

log_t::write_checkpoint(): When we are releasing log_sys.latch while
durably writing the checkpoint header block, assign log_sys.resize_log
to log_sys.log to inform other threads that a checkpoint is in progress.
Previously, we only did this when innodb_log_archive=ON holds.

log_t::resize_start(): Relax a debug assertion for the logic change.

Tested by: Matthias Leich
Aleksey Midenkov
Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Dmitry Shulga
MDEV-38561: ASAN heap-use-after-free in Query_arena::free_items/sp_lex_cursor::~sp_lex_cursor

On re-parsing of a failed cursor statement inside the stored routine,
the free_list of sp_lex_cursor could point to items placed on a dedicated
memory root that is created during re-parsing of the failed statement.

In result, when sp_head object is destroyed the mem_root created for
re-parsing the cursor's statement is de-allocated but the free_list
pointer of sp_lex_cursor still point to objects previously allocated
on this memory root.

To fix the issue, delay deallocation of mem_roots created for re-parsing
of SP instructions till the moment the sp_head be destroyed.
Sergei Golubchik
MDEV-40059 too long character_set_collations crash
drrtuy
disable sfinae-incomplete warning for DuckDB code.
Aleksey Midenkov
Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
forkfun
Merge branch '10.11' into '11.4'
Vladislav Vaintroub
CONC-828 Remove pvio blocking/is_blocking methods

Follow-up cleanup to "always use non-blocking sockets": now that the
socket is non-blocking for its whole lifetime, the mode-switching
machinery is dead weight, so remove it.

- Drop the blocking() and is_blocking() pvio methods, the
  ma_pvio_blocking()/ma_pvio_is_blocking() wrappers and the per-plugin
  implementations (socket, shmem, npipe).
- Create the socket non-blocking from the start: a new_nonblocking_socket()
  wrapper around socket() sets O_NONBLOCK/FIONBIO immediately, so the fd
  is never blocking at any point in its lifetime. Replaces the old
  per-operation mode toggling; the connect helpers no longer touch it.
- Remove the Windows-only WIN_SET_NONBLOCKING macro and all its call
  sites in mariadb_async.c - it only existed to work around MSG_DONTWAIT
  not being available on Windows.
- Remove MSG_DONTWAIT usage entirely (the socket is already
  non-blocking). The synchronous pvio_socket_read/write loop over the
  ma_recv()/ma_send() primitives with poll()/select(); the async_read/
  async_write methods stay single non-blocking attempts (the fiber yield
  on would-block remains in ma_pvio_read_async()/ma_pvio_write_async()).
- Fold the three identical EAGAIN/EWOULDBLOCK checks (pvio_socket,
  openssl, gnutls) into a single ma_socket_wouldblock() helper in
  ma_global.h, next to the SOCKET_E* definitions.
- Drop the now-unconditional GNUTLS_EXTERNAL_TRANSPORT define and its
  #ifdef guards in gnutls.c; routing TLS through the pvio methods is the
  only mode, so the dead gnutls_transport_set_int() branch goes away.
Aleksey Midenkov
MDEV-39384 Use index in TR_table::query

TR_table::query() used table scan. Now utilize the index if possible,
with minimum validity detection. Getting trx_id by commit_ts is still
suboptimal is it does two index accesses (as limited by fields in
commit_ts index).

When the index detection fails TR_table::query() falls back to
original table scanning method.

FIXME: test case
Aleksey Midenkov
MDEV-39384 Use index in TR_table::query

TR_table::query() used table scan. Now utilize the index if possible,
with minimum validity detection. Getting trx_id by commit_ts is still
suboptimal is it does two index accesses (as limited by fields in
commit_ts index).

When the index detection fails TR_table::query() falls back to
original table scanning method.

FIXME: test case
Marko Mäkelä
fixup! 4769a43b51c58b0fd02b1164a6f80ab916d21903
Aleksey Midenkov
Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Jan Lindström
MDEV-40056 : Analyze Galera Dynamic Variables Susceptible to RCEs

Fix potential issue with wsrep_node_address by allowing
only correctly constructed address.
forkfun
Merge branch '11.4' into '11.8'
Vladislav Vaintroub
Unify synchronous and asynchronous I/O; enable Schannel async

The non-blocking (async) API kept a complete parallel I/O stack next to
the synchronous one: async_read/async_write pvio methods,
ma_pvio_read_async/ma_pvio_write_async, and per-backend
ma_tls_read_async/ma_tls_write_async, each re-implementing the
"non-blocking attempt + my_context_yield() on would-block" loop.

But ma_pvio_wait_io_or_timeout() already yields the fiber in async mode.
Now that the socket is always non-blocking and the synchronous read/write
loops wait through it, the two paths are structurally identical - the only
difference is whether the wait blocks the thread (poll/select) or suspends
the fiber (yield), which is exactly what wait_io_or_timeout already decides.

So route the synchronous pvio_socket_read/write waits through
ma_pvio_wait_io_or_timeout() and drop the entire parallel async stack:

- remove async_read/async_write from the pvio method table (and the
  socket/shmem/npipe implementations)
- remove ma_pvio_read_async/ma_pvio_write_async and the async branches
  in ma_pvio_read/ma_pvio_write
- remove ma_tls_read_async/ma_tls_write_async (openssl, gnutls),
  ma_tls_async_check_result, and the IS_PVIO_ASYNC_ACTIVE branches in the
  OpenSSL BIO and GnuTLS push/pull callbacks - they now just call the
  blocking pvio read/write, which yields under the hood
- remove the now-unused IS_BLOCKING_ERROR macro

This also enables async for Schannel: ma_pvio_read/write no longer special
-case !HAVE_SCHANNEL, and Schannel already funnels all socket I/O through
pvio->methods->read/write, so it now suspends/resumes like the others.

Named pipe and shared memory cannot suspend/resume (no pollable socket).
Previously async over them errored on the first read (the async_read
method was NULL -> CR_ASYNC_NOT_SUPPORTED in ma_pvio_read_async). That
guard is gone with the parallel stack, so reject MYSQL_OPT_NONBLOCK over
these transports up front in mysql_real_connect() with the same
CR_ASYNC_NOT_SUPPORTED, instead of silently running synchronously and
blocking the caller's event loop. The ordinary blocking API is unaffected.

Tested:
- main.mysql_client_test_nonblock (the full mysql_client_test suite run
  through the non-blocking start/cont API) passes
- mtr unit suite: all 21 unit.conc_* pass (incl. unit.conc_async)
- the async unit test run directly over forced TLS with both OpenSSL and
  GnuTLS clients (test_async = 100 async connect+handshake+query+close
  iterations) passes, confirming the fiber yields correctly through the
  TLS stack

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Daniel Black
MDEV-39777: Fixed flaky plugins.unix_socket test

The plugins.unix_socket test showed the previous command process.

This occurs as after MDEV-38019 the early result to the client
results in the server side thread lingering for its cleanup.

The subsequent of DROP USER can observer the connection
still in progress and hence outputing a warning.

Used --ping in the peer_cred_test so that on completion, there
is no connection active for the user.
Sergei Golubchik
update CODING_STANDARDS.md for agent era

* moved human-oriented hopefully eventually consistent codiing style
  document to https://mariadb.org/about/coding-style/
* rewrote the document in an agent friendly way: main rule first,
  don't repeat rules that the agent would follow by default anyway,
  highlight differences with the defaults, don't overdo explaining.
* asked claude to look through sql/ and mysys/ extract common patterns and
  add them here as rules
Vladislav Vaintroub
CONC-828 Remove pvio blocking/is_blocking methods

Follow-up cleanup to "always use non-blocking sockets": now that the
socket is non-blocking for its whole lifetime, the mode-switching
machinery is dead weight, so remove it.

- Drop the blocking() and is_blocking() pvio methods, the
  ma_pvio_blocking()/ma_pvio_is_blocking() wrappers and the per-plugin
  implementations (socket, shmem, npipe).
- Set the socket non-blocking once at connect time via a small static
  pvio_socket_set_nonblocking() helper instead of toggling it around
  every operation.
- Remove the Windows-only WIN_SET_NONBLOCKING macro and all its call
  sites in mariadb_async.c - it only existed to work around MSG_DONTWAIT
  not being available on Windows.
- Remove MSG_DONTWAIT usage entirely (the socket is already
  non-blocking). The synchronous pvio_socket_read/write loop over the
  ma_recv()/ma_send() primitives with poll()/select(); the async_read/
  async_write methods stay single non-blocking attempts (the fiber yield
  on would-block remains in ma_pvio_read_async()/ma_pvio_write_async()).
- Fold the three identical EAGAIN/EWOULDBLOCK checks (pvio_socket,
  openssl, gnutls) into a single ma_socket_wouldblock() helper in
  ma_global.h, next to the SOCKET_E* definitions.
- Drop the now-unconditional GNUTLS_EXTERNAL_TRANSPORT define and its
  #ifdef guards in gnutls.c; routing TLS through the pvio methods is the
  only mode, so the dead gnutls_transport_set_int() branch goes away.

Net result removes far more than it adds.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Vladislav Vaintroub
MDEV-39473 main.connect fail on macOS

use new libmariadb that fixes underlying  CONC-828, which removes the
offending setsockopt that results into errors on lightly tested systems
like macOS.
Daniel Black
MDEV-35462 Remove obsolete compiler version checks from RocksDB CMakeLists.txt (fix)

-fPIC was erronously removed in 526f0765b3f961803919ec2c47074c5e029acbfb. Replaced with the
POSITION_INDEPENDENT_CODE target property.
Aleksey Midenkov
Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Sergei Golubchik
MDEV-39777: Fixed flaky plugins.unix_socket test

revert incorrect fix, suppress warning at DROP USER instead
forkfun
Merge branch '12.3' into '13.0'
Aleksey Midenkov
MDEV-39384 Use index in TR_table::query

TR_table::query() used table scan. Now utilize the index if possible,
with minimum validity detection. Getting trx_id by commit_ts is still
suboptimal is it does two index accesses (as limited by fields in
commit_ts index).

When the index detection fails TR_table::query() falls back to
original table scanning method.

FIXME: test case
drrtuy
chore: avoid building DuckDB at x86_32.
Daniel Bartholomew
bump the VERSION
Daniel Black
MDEV-37864 json_array_intersect result has incorrect length

MDEV-37864 added a length setting to the function
Item_func_json_array_intersect::prepare_json_and_create_hash
however some paths of Item_func_json_array_intersect::fix_length_and_dec
never reach this function.

Leave the length calculation the same but place in the
::fix_length_and_dec function.

Collation is based on the arg[0], but potentially after they
are swapped.

Corrects cursor protocol for the test case added in MDEV-36808.
ParadoxV5
MDEV-38972 Refactor MDEV-37530 and MDEV-28302 to Use Internal Data Structures

For consistency with the (dated) rest of the codebase,
this commit replaces most miscellaneous C++ standard utilities
that MDEV-37530 used with equivalents in the MariaDB library:

* `std::initializer_list<E>` → `E *, size_t`
* `std::optional<T>` → `T, bool`
  * `::master_heartbeat_period` is refactored
* `std::pair<K, V>` → `struct { K; V; }`
* `std::string_view` → `LEX_CSTRING`

The following are kept:
* `std::numeric_limits<T>`:
  Alternatives (`UINTn_MAX`, `MY_INTn_NUM_DECIMAL_DIGITS`)
  don’t integrate well with templates, *especially when `T`
  is `my_off_t` (a platform-dependent MariaDB-library type)*.
  * Though `std::numeric_limits<T>::is_signed` is currently not used.
* Explicit move-semantic markers `std::move()` and `std::forward()`

The commit also unrolls the structured binding in
the `for` loop in `sql_repl.cc`’s `change_master()`.

The changeset of this separate commit is mainly a comparison of style,
as the performance differences are well expected to be negligible.
forkfun
Merge branch '13.0' into 'main'
forkfun
Merge branch '11.8' into '12.3'
Sergei Golubchik
only check for duckdb stuff if target duckdb is enabled
Sergei Golubchik
refactor submodule.cmake to fetch less

don't update all submodules automatically,
only update those that are actually used by the build
Aleksey Midenkov
MDEV-39384 Use index in TR_table::query

TR_table::query() used table scan. Now utilize the index if possible,
with minimum validity detection. Getting trx_id by commit_ts is still
suboptimal is it does two index accesses (as limited by fields in
commit_ts index).

When the index detection fails TR_table::query() falls back to
original table scanning method.

FIXME: test case
Aleksey Midenkov
Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Marko Mäkelä
MDEV-40070 innodb_log_archive multi-batch recovery crash

recv_sys_t::parse_mmap(): When the current mini-transaction spans two
log files and we run out of memory while attempting to store the parsed
records into recv_sys.pages, the next log file would already have been
closed by recv_sys_t::rewind(). Handle this condition specially.
Oleksandr Byelkin
Merge branch '10.6' into 10.11
Dmitry Shulga
MDEV-40004: Server crashes in sp_head::register_instr_mem_root_for_deallocation upon shutdown

n shutdown server could crash in case triggers executed during server run
and some of triggers instructions were re-compiled.

The crash is caused by attempt to allocate a memory for storing pointers
on mem_roots used for memory allocation taken place on re-parsing failing
trigger's statements. The reason of crash is dereferencing of nullptr
returning by the function current_thd().

To fix the issue, use dummy THD on shutdown the table definition cache.
tdc_start_shutdown() is solely invoked from the function clean_up()
but the later is called from many places around the source code, not only
from mysql_main(), particularly clean_up() is called from unireg_abort().
Therefore, the extra argument added into the signature of the function
cleanup() to allow explicit request of use dummy THD on shutdown the table
definition cache.
Sergei Golubchik
MDEV-40058 cached_sha2_password crashes on zero-length password

valid encrypted password cannot have zero length and must end with '\0'