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-39822 MHNSW index returns wrong results for M >= 128

* number of neighbors is stored in a byte
* nodes have 2*M neighbors on the layer 0
=> M cannot be larger than 127
Vladislav Vaintroub
MDEV-42002 PROXY header accepted after the first client packet

The PROXY header is only valid as the very first data sent by the client.
The server accepted it at any point of the connection phase, for example
after the SSL request, or as a reply to an authentication switch request.

Accept it only if the sequence number is 1, that is, nothing was read from
the client yet.

vio_reset() cleared the peer address while switching to TLS. Keep it, so
the address checks after the TLS handshake see the real client.

Assisted-by: Claude:claude-sonnet-5-5
Monty
MDEV-42003 Enhance mariadbd-multi to support mariadbd prefixes

- Update my.cnf options to support [mariadbd_multi] (same as
  [mysqld_multi]), and [mariadbd#] (same as [mysqld#]).
- Change all instances of mysqld to mariadbd, mysqladmin to mariadb-admin.
  - mysqld and mysqladmin can still be used as options and in config files
- mariadb-admin gets confused when both --socket and --port is provided.
  Now socket is used if --tcp-ip or --port is not used. Only one of
  --socket or --port is sent to mariadb-admin.
- A warning is given if a group number is used more than once, like
  [mysqld2] and [mariadbd2]. For compatibility with old configuration
  files, the options of all groups with the same number are combined,
  with later options overriding earlier ones.
- --print-commands will print all system commands to stdout
  (good for debugging)
Vladislav Vaintroub
MDEV-42002 PROXY header accepted after the first client packet

The PROXY header is only valid as the very first data sent by the client.
The server accepted it at any point of the connection phase, for example
after the SSL request, or as a reply to an authentication switch request.

Accept it only if the sequence number is 1, that is, nothing was read from
the client yet.

vio_reset() cleared the peer address while switching to TLS. Keep it, so
the real client address is not lost after the TLS handshake. After the
handshake the address is only used in print_aborted_warning().

Assisted-by: Claude:claude-sonnet-5-5
liufeng
MDEV-33843: Server crash via XPath unary minus recursion

Analysis:
The stack overrun check added by MDEV-33843 is executed only in
my_xpath_parse_OrExpr(). The XPath grammar rule

  UnaryExpr ::= '-' UnaryExpr

recurses directly in my_xpath_parse_UnaryExpr(), so a path made of many
'-' tokens consumes one stack frame per token without any limit and
overruns the thread stack. UPDATEXML() and EXTRACTVALUE() parse the path
in fix_fields(), therefore any user who can run a SELECT can terminate
the server with

  SELECT UPDATEXML(NULL, REPEAT('-', 100000), 1);

Before this patch the statement makes the backend exit with SIGSEGV
(exit status 139) and the client reports "Lost connection to server
during query". The equivalent parenthesized expression is already
rejected with ER_STACK_OVERRUN_NEED_MORE because it re-enters
my_xpath_parse_OrExpr().

Fix:
Run check_stack_overrun() at the entry of my_xpath_parse_UnaryExpr(),
as my_xpath_parse_OrExpr() does, and add a regression case to
mysql-test/main/xml that expects ER_STACK_OVERRUN_NEED_MORE.

The same statement then returns the regular stack-overrun error and the
server stays alive. main.xml passes.
Vladislav Vaintroub
MDEV-42002 PROXY header accepted after the first client packet

The PROXY header is only valid as the very first data sent by the client.
The server accepted it at any point of the connection phase, for example
after the SSL request, or as a reply to an authentication switch request.

Accept it only if the sequence number is 1, that is, nothing was read from
the client yet.

vio_reset() cleared the peer address while switching to TLS. Keep it, so
the real client address is not lost after the TLS handshake. After the
handshake the address is only used in print_aborted_warning().

Assisted-by: Claude:claude-sonnet-5-5
Sergei Golubchik
userstat: DROP TABLE and DROP INDEX leave stale usage statistics

delete_statistics_for_table() and delete_statistics_for_index()
removed the userstat entries only after opening the statistical
tables, and returned early when that failed.

Delete the userstat entries before opening the statistical tables.

Assisted-by: Claude:claude-opus-5-5
Oleksandr Byelkin
new columnstore 25.10.8
Marko Mäkelä
MDEV-41395 fil_space_t::create() may release fil_system.mutex

If fil_space_t::create() ends up releasing fil_system.mutex for
invoking fil_crypt_threads_signal(), another thread may grab
fil_system.mutex and find a tablespace that contains no data files.
Let us fix this race condition and remove some checks that now
are redundant.

By default fil_crypt_must_default_encrypt() holds, and then
fil_crypt_thread() waits indefinitely in wait_for_work() once the
default_encrypt list has been exhausted. A tablespace for which no
fil_crypt_threads_signal() is issued would therefore never be
encrypted at all.

fil_space_t::create(): Do not invoke fil_crypt_threads_init();
let the caller do that. During database startup, before
fil_crypt_threads_init() has been invoked, there is no point to
invoke this function; the encryption queues will be properly
set up for the tablespaces that have been opened by that time.

fil_ibd_create(): Invoke fil_crypt_threads_signal() after
invoking fil_space_t::clear_stopped() and releasing fil_system.mutex.

fil_crypt_threads_signal(): Check that fil_crypt_threads_init()
has been called. The function dict_table_open_on_name() will be
invoked during early server startup.

dict_table_open_on_name(): Invoke fil_crypt_threads_init()
at the end if the table was loaded into the cache and the
tablespace likely as well. This should be the main code path
through which old tablespaces are opened via SQL.

dict_load_tablespace(): Invoke fil_crypt_threads_signal(), because
fil_ibd_open() may have added the tablespace to
fil_system.default_encrypt_tables. This is the single point through
which every dictionary-driven tablespace open passes; it is only
invoked by dict_load_table_one(), hence by dict_sys_t::load_table().

We will not invoke fil_crypt_threads_init() in
dict_load_table_on_id() or dict_sys.load_table(); it will instead
be invoked at a higher level, typically when a table definition is
first loaded by name, in dict_table_open_on_name().

buf_dump_load_func(): After the non-first buf_load(), invoke
fil_crypt_threads_signal() in order to start the encryption
of any newly loaded tablespaces.

drop_garbage_tables_after_restore(), wsrep_append_foreign_key(),
ha_innobase::create(), ha_innobase::truncate(),
row_rename_table_for_mysql(), i_s_sys_tables_fill_table(),
i_s_sys_tables_fill_table_stats(): Invoke fil_crypt_threads_signal()
in case some tablespace metadata was loaded.

row_import_cleanup(): Invoke fil_crypt_threads_signal() to register
the imported tablespace.

i_s_sys_tablespaces_fill_table(), fil_system_t::find(),
Datafile::validate_first_page(), fil_space_t::name(),
fil_space_t::read_page0(), fil_space_t::prepare_acquired(),
fil_space_t::try_to_close(), fil_crypt_default_encrypt_tables_fill(),
fil_system_t::default_encrypt_next(): Remove a now-redundant check
for a tablespace that contains no files.

srv_n_fil_crypt_threads_started: Declare as Atomic_relaxed<uint>,
for the unlocked read in fil_crypt_threads_signal().

Co-developed by: Thirunarayanan Balathandayuthapani
Oleksandr Byelkin
Fix vio_gencert() for OpenSSL 4.0

X509_get_subject_name() returns a const name in OpenSSL 4.0, but
vio_gencert() added the CN entry to it in place. Build a separate
X509_NAME and set it as subject and issuer.

Assisted-by: Claude:claude-opus-5-5
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
cleanup: remove obsolete CMAKE_VERSION checks

main CMakeLists.txt sets

CMAKE_MINIMUM_REQUIRED(VERSION 3.12.0)
Sergei Golubchik
caching_sha2_password: add test for max password length

as enforced by RSA with 2048-bit key and RSA PKCS1 OAEP padding
Sergei Golubchik
UBSAN: runtime error: downcast of address 0x7ea259447dc8 which does not point to an object of type 'Item_row'

sql/item_cmpfunc.h:1184:34: runtime error: downcast of address 0x7ea259447dc8 which does not point to an object of type 'Item_row'
sql/item_cmpfunc.cc:2083:30: runtime error: member call on address 0x7ea259447dc8 which does not point to an object of type 'Item_row'
sql/item_cmpfunc.cc:2084:29: runtime error: member call on address 0x7ea259447dc8 which does not point to an object of type 'Item_row'
sql/item_cmpfunc.cc:2125:29: runtime error: member call on address 0x7ea259447dc8 which does not point to an object of type 'Item_row'
sql/item_cmpfunc.cc:2127:35: runtime error: member call on address 0x7ea259447dc8 which does not point to an object of type 'Item_row'

Indeed, the address was pointing to an object of type 'Item_aggregate_ref'
Marko Mäkelä
Merge 11.8 into 12.3
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
MDEV-39822 MHNSW index returns wrong results for M >= 128

* number of neighbors is stored in a byte
* nodes have 2*M neighbors on the layer 0
=> M cannot be larger than 127
Vladislav Vaintroub
MDEV-42002 PROXY header accepted after the first client packet

The PROXY header is only valid as the very first data sent by the client.
The server accepted it at any point of the connection phase, for example
after the SSL request, or as a reply to an authentication switch request.

Accept it only if the sequence number is 1, that is, nothing was read from
the client yet.

vio_reset() cleared the peer address while switching to TLS. Keep it, so
the real client address is not lost after the TLS handshake. After the
handshake the address is only used in print_aborted_warning().

Assisted-by: Claude:claude-sonnet-5-5
Sergei Golubchik
userstat: stack overflow on DROP TABLE with many index statistics

del_global_index_stats_for_table() collected all matching entries
into an array of MAX_INDEXES elements. Statistics of renamed indexes
stay in global_index_stats under their old names, so a table can have
more entries than that and DROP TABLE wrote past the array.

Delete the entries in batches of MAX_INDEXES.

Assisted-by: Claude:claude-opus-5-5
Marko Mäkelä
Merge 12.3 into 13.1
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-41491 parsec ASAN crash on manually modified mysql.global_priv table

the server didn't invoke auth plugin's preprocess_hash() for empty
passwords, thus it didn't check whether empty passwords were acceptable
and plugin's auth() method reliance on the binary hash being correctly
preprocessed was broken.
Oleksandr Byelkin
new columnstore 25.10.8

Assisted-by: Claude:claude-opus-5-5
Sergei Golubchik
ColumnStore now requires gettid. Skip gracefully.
Vladislav Vaintroub
MDEV-42002 PROXY header accepted after the first client packet

The PROXY header is only valid as the very first data sent by the client.
The server accepted it at any point of the connection phase, for example
after the SSL request, or as a reply to an authentication switch request.

Accept it only if the sequence number is 1, that is, nothing was read from
the client yet.

vio_reset() cleared the peer address while switching to TLS. Keep it, so
the real client address is not lost after the TLS handshake. After the
handshake the address is only used in print_aborted_warning().

Assisted-by: Claude:claude-sonnet-5-5
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
MDEV-40730 SHOW DATABASES allows users with only GRANT OPTION privilege to read all databases names

Followup for MDEV-37951 (e7aec1c60c4), GRANT OPTION is an *OPTION* and
alone on itself shouldn't make the table or schema visible
Sergei Golubchik
update C/C

and remove temporary workarounds for C/C bugs
Sergei Golubchik
disable DuckDB in the server in favor of the externally built

Fixes #6045
Sergei Golubchik
MDEV-40608 set INSTALL_SYSCONFDIR for external plugins

so that they could store their configs in basedir/etc/ in bintars
Sergei Golubchik
MDEV-41655 caching_sha2_password does not limit the password length

let's tighten the limits to be closer to actual OpenSSL limits.

Encrypting with RSA, 2048-bit key and PKCS1 OAEP padding *always*
produces the ciphertext of 256 bytes. And to fit in this, the plaintext
cannot be longer than 214 bytes. Assuming the user can generate her
own keys, 512 bytes would be enough for 4096-bit key. Larger, 8192-bit
keys don't work anyway (don't fit in public_key[] buffer).

And also let's reject too long passwords that can never authenticate.
Marko Mäkelä
Merge 11.4 into 11.8
Sergei Golubchik
Wrong table name in the warning about missing statistical table

open_stat_table_for_ddl() printed the global stat_table_name, always
`table_stats`, instead of the name of the table it failed to open.

Assisted-by: Claude:claude-opus-5-5
Rex Johnston
MDEV-39492 PQ: cost the parallel scan in the join-order search

Until now the join order was chosen by the serial optimizer and the
driving table it settled on was then handed to the workers whenever the
gate admitted the query. On TPC-H that split REGION in Q5 and NATION in
Q11: five- and twenty-five-row tables of which one row survives the
WHERE, so the whole join under them ran on one worker and the query paid
the setup of the workers for nothing. The plan that would actually
divide -- ORDERS first in Q5, split four ways with the lookups below it
spread evenly -- costs 1917 against the chosen plan's 873 when read
serially, and the serial optimizer had no way to know that read by four
workers it costs about 490.

best_access_path() now prices the driving table's scan both ways and
keeps the cheaper (parallel_scan_cost): serially, or as one worker's
share of the scan plus optimizer_parallel_setup_cost per table in the
join, with the rows surviving the table's own WHERE spread over
min(N, rows_out) workers. The join-order search divides every later
position's cost by that divisor (position_cost_in_plan), since each
worker joins only its share of the driving rows and the plan's cost is
one worker's. A large table can therefore win the driving position it
loses serially, while a tiny driver gains nothing from the division
and is charged the setup, so it stays serial. parallel_join_check()
runs the workers only for a plan chosen that way.

Three things are needed for the search to find such a plan honestly.
The pruning heuristic drops a prefix that is worse on both rows and
cost than the best at its depth, which is always true of a big-table
prefix next to a five-row one; prefixes under a parallel driver are now
compared only with each other. The tables under a parallel driver are
costed as a worker runs them, a plain nested loop with no join buffer,
hash join or rowid filter, and no covering-index or rowid-filtered scan
is offered as a driver, because the gate refuses all of these and a
plan chosen on their cost would run serially. And the refusals the gate
can make without a plan -- limits, DISTINCT, HAVING, outer joins,
window functions, aggregates whose partials do not merge, a GROUP BY
on an expression, a select-list column GROUP BY does not name, an item
a worker cannot evaluate -- are asked before the search as well
(pwt_query_shape_allows_workers), so that a query the workers will
refuse is costed as the serial plan it will run. Q7's GROUP BY on
extract(year ...) is the case that showed why: chosen for LINEITEM
first on the discount, refused after the plan, and run serially in
that shape at five times its serial time.

The setup cost is a session variable, optimizer_parallel_setup_cost,
in microseconds, default 2000 per table. It was measured on this
branch at about 2 ms for a single-table scan and about 8 ms for a
three-table join, dominated by creating the worker threads with a THD
each, opening every table once per worker, and building and draining
the result containers. The parallel-query tests set it to 0, since
their tables are far too small to repay it, and
main.parallel_query_costing pins the three behaviours on a five-row
dimension and a 20000-row fact table.

Measured on TPC-H SF1 with histograms, four workers against serial:
Q5 490 -> 164 ms, Q3 623 -> 188 ms, Q10 341 -> 139 ms, Q12 615 -> 191
ms, Q15 1225 -> 396 ms, Q1 3966 -> 1160 ms; Q11 and Q7 unchanged.

This commit was prepared with Claude Code (Fable 5.1), which diagnosed
the REGION/NATION splits and the Q7 regression on a scratch copy of the
TPC-H data, implemented the costing, the two-family pruning, the
worker-shaped costing of the parallel chain and the pre-plan gate,
wrote the costing test, updated the existing tests, and ran the
parallel-query tests in both protocols and the main suite.