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-38741 Windows: watch with a dedicated one-thread pool

The waits were on the system thread pool, so the callbacks ran on
arbitrary threads, several at a time, and not registered in mysys.
Use a pool of our own with a single thread instead. It runs all the
callbacks one by one, like the main loop handles the epoll events, and
registers itself in mysys with a thread_local guard on the first one.

Shutdown no longer counts running callbacks and spins: they do nothing
once the server is stopping, and closing the pool lets its thread exit
when the connections have removed their waits. my_thread_global_end()
waits for that thread.

remove() no longer clears the event selection of the socket, which is
closed right after.

Polling the socket with the AFD driver and one completion port was
tried and rejected: while such a poll is pending, select(), which the
vio layer waits with, loses the data notification of the same socket.

Assisted-By: Claude:claude-sonnet-5-5
Sergei Golubchik
reject out of range rec_per_key in replay context

Index_statistics::set_avg_frequency() casts rec_per_key * 100000 to
ulonglong, which is undefined for negative or too large values.

Reject them when parsing the context.

Assisted-by: Claude:claude-5.5-opus
Sergei Golubchik
MDEV-41541 uninitialized memory read in optimizer replay

init all frequencies - not all of them might be present in the replay
Oleksandr Byelkin
Merge branch '13.1' into bb-13.1-release
Oleksandr Byelkin
Merge branch 'bb-12.3-release' into bb-13.1-release
Sergei Golubchik
disable DuckDB in the server in favor of the externally built

Fixes #6045
Sergei Golubchik
cleanup: remove obsolete CMAKE_VERSION checks

main CMakeLists.txt sets

CMAKE_MINIMUM_REQUIRED(VERSION 3.12.0)
Vladislav Vaintroub
MDEV-38741 disconnect watcher: end the connection if a statement is aborted

KILL_DISCONNECT is statement-level. When a disconnect does abort a
statement, the connection carried on and ran the commands the client
had pipelined behind it, so a client that closed its sending side got
one statement aborted and the others executed.

Now the connection ends too, after the error of the aborted statement
is sent and the reason is logged. If the kill aborts nothing, for
example the statement has finished and the client already sent
COM_QUIT, nothing happens, so an orderly quit or a close without it is
handled as before, and logs nothing.

The condition in end_connection() for the "Aborted connection" line
needs no change, as the killed connection does not get it.

main.disconnect_lock_wait checks that orderly disconnects log no
"Aborted connection" line, and that an aborted connection is logged
once. It waits for the lock wait of the connection that it closes, not
for any lock wait.

Assisted-by: Claude:claude-5.5-sonnet
Sergei Golubchik
CREATE VIEW with a long name writes .frm outside of the database directory

fn_format() silently drops the directory when the path is too long.
Use MY_SAFE_PATH in sql_create_definition_file() and fail with
ER_IDENT_CAUSES_TOO_LONG_PATH.

Assisted-by: Claude:claude-5.5-opus
Sergei Golubchik
unix_socket: reject connections from the server process itself

CONNECT, FederatedX and Spider connect to the local server via the unix
socket with user-supplied credentials. unix_socket saw mysqld's own uid
as the peer, so anyone allowed to create such a table could log in as
the OS user mysqld runs under (mysql@localhost, ALL PRIVILEGES by default).

Let's fail authentication when the peer pid is the server's own pid.
On old FreeBSD (<13) that cannot get the peer pid allow everything
as before.

Assisted-by: Claude:claude-5.5-opus
Sergei Golubchik
cleanup: don't malloc every single String for every single byte
Alexey Botchkov
MDEV-41430 auth_pam_tool leaves zombie processes.

As the auth_pam_tool claims root privileges, the mariadbd can't kill
it if it hangs.
So instead of sending the SIGKILL to the auth_pam_tool we set the
alarm() there so it kills itself after the timeout.
The alarm counter is hardcoded to 100 seconds so the authentication
can be halted even if the connect_timeout allows it to be longer.
The auth_pam.c now calls the waitpid() without the WNOHANG, so it waits
for the auth_pam_tool to return. If the PAM module aggressively resets
the alarm or handles the SIGALARM the pam_auth() can hang forever.
Sergei Golubchik
stack overflow opening a table with a too long path

CREATE TABLE allows .frm path of up to FN_REFLEN bytes, but buffers
for normalized_path + reg_ext were FN_REFLEN, leaving no room for \0.
A nonexistent table name could produce a path even longer than that.

* make buffers FN_REFLEN + 1
* in open_table_def(), treat a path that cannot fit as a missing frm

Assisted-by: Claude:claude-5.5-opus
Sergei Golubchik
MDEV-41830 ASAN stack-buffer-overflow in option file parser
Oleksandr Byelkin
Merge branch 'bb-13.1-release' into bb-13.2-release
Sergei Golubchik
MDEV-40862 mariadb-backup --backup crashes on database and table names that expand to nearly 255 bytes in the file system

* make_path_n() never grew the buffer and never updated its length
* local_open(): use MY_SAFE_PATH, a too long path must not fall back
  to a relative path in the current (source data) directory

Assisted-by: Claude:claude-5.5-opus
Oleksandr Byelkin
Merge branch '12.3' into bb-12.3-release
Sergei Golubchik
CREATE VIEW with a long name writes .frm outside of the database directory

fn_format() silently drops the directory when the path is too long.
Use MY_SAFE_PATH in sql_create_definition_file() and fail with
ER_IDENT_CAUSES_TOO_LONG_PATH.

Assisted-by: Claude:claude-5.5-opus
Sergei Golubchik
MDEV-40374 I_S.metadata_lock_info shows schema/table that user has no privileges on

Apply the SHOW PROCESSLIST visibility rule: without PROCESS a user
sees only locks held by threads of the same account. That is enough
to find who blocks one's own statement in the case where the user
can KILL the blocker.

Assisted-by: Claude:claude-opus-5-5
Sergei Golubchik
replay infuses statistics into INFORMATION_SCHEMA tables

fill_schema_table_by_open() opens and closes tables in the middle of
the statement. set_statistics_for_table() in get_schema_stat_record()
infused replayed statistics into them, which then went back to the
table cache before the replay restored them, and I_S.STATISTICS
showed the replayed cardinality.

Disable the replay while I_S opens tables.

Assisted-by: Claude:claude-5.5-opus
Sergei Golubchik
MDEV-38859 federated use-after-free with temp tables and savepoints

ha_init() added sizeof(SAVEPOINT) to savepoint_alloc_size after
startup engines were initialized, so an engine installed at runtime
got a savepoint_offset that already included sizeof(SAVEPOINT),
and (sv+1)+savepoint_offset counted it twice, pointing past
the end of the allocated SAVEPOINT.

Start savepoint_alloc_size at sizeof(SAVEPOINT) and make
savepoint_offset relative to the SAVEPOINT itself.

Assisted-by: Claude:claude-opus-5-5
Sergei Golubchik
MDEV-39752 use-of-uninitialized-value in ftb_parse_query_internal

maria_ft_get_word() does not set the word for bracket and quote tokens,
yet ftb_parse_query_internal() passes w.pos and w.len to
mysql_add_word() by value for every token. clang-16+ MSAN reports
passing uninitialized values as arguments.

Initialize w, as MDEV-33478 did for the MyISAM copy of this function.

Assisted-by: Claude:claude-opus-5-5
Sergei Golubchik
MDEV-39615 CONNECT: Privilege validation gap

A CONNECT sub-table of PROXY, TBL, XCL, OCCUR, PIVOT was opened
in-process without any privilege check, so a user with CREATE could
read and write any existing CONNECT table, including file-based ones
that otherwise require FILE.

Check privileges on the sub-table as if it were used directly instead
of the PROXY table, like in a SQL SECURITY INVOKER view: SELECT, INSERT,
SELECT+UPDATE or SELECT+DELETE depending on the mode, plus the
sub-table's own FILE privilege checks. Info commands fail silently,
as for other sub-table errors.

Non-CONNECT sub-tables are still accessed via a client connection with
the table's credentials.

Assisted-by: Claude:claude-5.5-opus
Sergei Golubchik
MDEV-40862 mariadb-backup --backup crashes on database and table names that expand to nearly 255 bytes in the file system

* make_path_n() never grew the buffer and never updated its length
* local_open(): use MY_SAFE_PATH, a too long path must not fall back
  to a relative path in the current (source data) directory

Assisted-by: Claude:claude-5.5-opus
Vladislav Vaintroub
MDEV-38741 Do not report the client closing after COM_QUIT

The client closes the socket right after COM_QUIT, which is not a
failure, and there is no statement left to abort.

Unregister the watcher when COM_QUIT is parsed, so that on Linux most
of the closes are not reported at all, and ignore a disconnect in a
quitting connection like in an idle one.

Assisted-By: Claude:claude-sonnet-5-5
Sergei Golubchik
MDEV-41362 ASAN heap-buffer-overflow in validate/plugin_foreach_with_mask after password_reuse_check

allocate one byte more for `buff[key_len]=0` to work
bsrikanth-mariadb
MDEV-40553 fixup: GCC -Og -Wmaybe-uninitialized
Oleksandr Byelkin
Merge branch 'bb-11.8-release' into bb-12.3-release
Vladislav Vaintroub
MDEV-38741 disconnect_watcher system variable

A global variable to switch the disconnect watcher on and off, ON by
default. It is dynamic and affects the connections made after the change.
The variable exists only where there is a watcher: on Linux, Windows and
the BSD systems, not elsewhere or in the embedded server.

The tests that depend on the watcher run with it ON and OFF, see
include/disconnect_watcher.combinations. With the watcher OFF a lock wait
is not aborted, so the test releases the lock instead, see the rdiff files.
A combination that does not fit the server value is skipped.
innodb.xa_recovery, rpl_password_boundaries and rpl_ssl1 do not test the
watcher and behave the same in both modes.

Assisted-By: Claude:claude-sonnet-5-5
Sergei Golubchik
stack overflow opening a table with a too long path

CREATE TABLE allows .frm path of up to FN_REFLEN bytes, but buffers
for normalized_path + reg_ext were FN_REFLEN, leaving no room for \0.
A nonexistent table name could produce a path even longer than that.

* make buffers FN_REFLEN + 1
* in open_table_def(), treat a path that cannot fit as a missing frm

Assisted-by: Claude:claude-5.5-opus
Sergei Golubchik
MDEV-41944 CONNECT CSV discovery header overflows colname[]/len[]/typ[]/prc[]

CSVColumns() stored a column name pointer for every separator in the
header line without checking MAXCOL, so a header with more than 200
fields wrote past the end of the colname[] stack array, and the
resulting column count indexed len[], typ[], prc[] out of bounds.

Reject such headers with TOO_MANY_FIELDS, the same way data lines
are rejected.

Assisted-by: Claude:claude-opus-5-5
Sergei Golubchik
replay loses infused statistics in stored functions

Every sub-statement (stored function, trigger) replaced
thd->opt_ctx_replay, leaking the top-level one, so the top-level
tables were never restored and kept key_info->read_stats pointing
into the freed statement mem_root. Saved and infused statistics were
allocated on whatever arena was active, e.g. the stored function
execution arena, freed before the restore.

* create the replay object only for a top-level statement, and let
  sub-statements use it; restore only at the end of the top-level one
* allocate everything the replay object owns in its own MEM_ROOT
* empty the saved list after restoring

Assisted-by: Claude:claude-5.5-opus
Sergei Golubchik
compilation failure

storage/innobase/row/row0import.cc:678:17: error: conversion from 'uint32_t' {aka 'unsigned int'} to 'uint16_t' {aka 'short unsigned int'} may change value [-Werror=conversion]
  678 |                ? 0 : FSP_FLAGS_GET_ZIP_SSIZE(m_space_flags);
Sergei Golubchik
replay leaves stale index statistics after DELETE

A table can be infused twice per statement (DELETE without WHERE on an
engine without delete_all_rows() calls set_statistics_for_table() twice).
The second save holds the first infused Index_statistics as "original",
and restore_modified_table_stats() restored it last, leaving
key_info->read_stats pointing into the freed statement mem_root.

Restore in the reverse order of saving.

Assisted-by: Claude:claude-5.5-opus
Sergei Petrunia
MDEV-41862: Followup: print single-table DELETE without USING.
Oleksandr Byelkin
Merge branch 'main' into bb-13.2-release
Sergei Golubchik
MDEV-41830 ASAN stack-buffer-overflow in option file parser
Sergei Golubchik
MDEV-40690 auth_pam_tool loses setuid-root bit in RPM packages

without %dir, rpm list of files includes the content of auth_pam_tool_dir
recursively, and auth_pam_tool_dir has its own line too. The end result
depends on the order in which two lines are applied which in turn
depends on the order the sort will put them in. rpm 6 was rewritten
in C++ and moved from libc qsort to std::sort.

11.4+ fix, because `%dir %attr` only works in cmake >= 3.10
Sergei Golubchik
MDEV-41362 ASAN heap-buffer-overflow in validate/plugin_foreach_with_mask after password_reuse_check

allocate one byte more for `buff[ley_len]=0` to work