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
Vladislav Vaintroub
MDEV-37556 Memory leak in proxy protocol with name resolution enabled

When proxy protocol is used and --skip-name-resolve is not set,
thd_set_peer_addr() is called twice per connection: once for the real TCP peer (in check_connection),
and again for the proxied address (in handle_proxy_header).
Each call invokes ip_to_hostname(), which allocates a hostname string
(unless loopback connection is used) and stores it as
thd->main_security_ctx.host. That code missed to free previously
allocated hostname, which results into memory leak.

This is now fixed. Also added debug-only test to mysql_client_test, which
fakes DNS and IP resolution the same way some perfschema tests do, to
emulate remote TCP connection in MTR.
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.
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.
Kristian Nielsen
Document the correct use of replication terminology

Signed-off-by: Kristian Nielsen <[email protected]>
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
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
MDEV-40001 my_sync() does not use NtFlushBuffersFileEx()

Copy the logic from Innodb. Use a fallback to FlushFileBuffers(), if
NtFlushBuffersFileEx() fails.

my_winfile.c is renamed to my_winfile.cc, since it is using a C++ feature,
initialization of global variable using non-constant expression.
Exported functions remain extern "C"
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.
Thirunarayanan Balathandayuthapani
MDEV-34998 Assertion `n_fields > n_cols || type & 32' failed in dict_index_t::init_change_cols on ALTER

Problem:
=======
During ALTER TABLE with column type modification and index addition,
InnoDB aborts with an assertion failure when processing collation
changes for single-column secondary indexes.

Solution:
========
dict_index_t::init_change_cols(): A single-column prefix secondary
index can have n_cols == n_fields when the column is the same as
the primary key column and undergoes a collation or type change
during ALTER TABLE.
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.
Oleg Smirnov
MDEV-36344: UBSAN Lifo_buffer::have_space_for change

Adjust Lifo_buffer::have_space_for to not lead itself to UBSAN
overflows.
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
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'
Daniel Black
MDEV-36344: UBSAN DsMrr_impl::dsmrr_init on null ptr

Under SQL_SELECT::test_quick_select there isn't
a mrr buffer. The TRP_RANGE.mrr_buf_size is explictly
sets its size to 0 in get_best_index_intersect.

Rather than hit undefined behaviour in what
eventually results in full_buf being nullptr,
jump the case and go directly to use_default_impl.