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
Oleksandr Byelkin
Merge branch 'bb-12.3-release' into bb-13.1-release
Thirunarayanan Balathandayuthapani
MDEV-41282 Recursion in InnoDB FTS AST causes stack-overflow (fts_ast_free_node/fts_ast_free_list)

Problem:
=======
fts_ast_free_node() and fts_ast_free_list() called each other, so
releasing the parse tree consumed one pair of thread stack frames
for every level of the tree.  sub_expr: '(' expr_lst ')' creates
one FTS_AST_SUBEXP_LIST per pair of parentheses, so a boolean
mode query with 2000 nested parentheses builds a chain of 4002
nodes, and fts_query_free() overflowed the thread stack
while freeing it.

fts_ast_visit() does not reach that depth, because
fts_ast_visit_sub_exp() limits the sub-expression nesting to
32 levels and returns DB_OUT_OF_MEMORY.
The parser has built the whole tree by then, and  it still has
to be freed.

fts_ast_node_print_recursive() recurses the same way. It is called
from fts_query_parse() when innodb_ft_enable_diag_print is enabled,
so it overflows the stack right after parsing, before the query is
executed.


Solution:
========
fts_ast_free_node(): Free the sub-tree with an explicit stack
instead of by recursion. The stack is threaded through the
next pointer of the very nodes that are about to be freed,
so it needs no extra memory and cannot fail to allocate.
A node is only pushed once it has been detached from the tree.
The children of a list are already chained to each other by next,
so a whole list is spliced onto the stack in one step.

fts_ast_free_list(): Removed, no longer needed.

fts_ast_node_print_recursive(): Stop at FTS_AST_PRINT_MAX_LEVEL and
print "..." instead of descending further.
Aleksey Midenkov
MDEV-40821 Wrong result after PORTION OF with subquery (11.4)

Single-table DELETE and UPDATE converted to multi-table (when a
subquery references the target table, or with UPDATE also another
table via semi-join) skipped FOR PORTION OF row splitting and the
constant expression check, so they deleted or updated whole rows
instead of the portion.

The fix prohibits processing DELETE ... FOR PORTION OF and UPDATE ...
FOR PORTION OF as multi-table, like DELETE ... RETURNING.
Georgi (Joro) Kodinov
more doxygen formatting added.
Oleksandr Byelkin
Merge branch 'bb-11.8-release' into bb-12.3-release
Khaled Riyad
MDEV-41470 Server crashes in check_grant / delete_precheck on 2nd execution of SP

When a procedure changes a view that calls a stored function, the
tables of that function are added to the statement's table list for
prelocking. From the second call on, they are already in the list
when the privilege precheck runs. `check_one_table_access()` took the
first of them for a table of the view, and the check then walked past
the end of the list and crashed.

Stop in `check_one_table_access()` when no tables owned by the
statement are left. The prelocking tables are checked when their
routines run.
Kristian Nielsen
MDEV-41726: 1-2 byte read-past-buffer in page fifo page

In binlog_chunk_reader::find_offset_in_page(), the limit for searching
the page was incorrect. The last 4 bytes of the page are CRC, they
should not be scanned for chunks. And the cur_end_offset was handled
incorrectly, it is an offset from the start of the file, but was
compared against an in-page offset.

Signed-off-by: Kristian Nielsen <[email protected]>
Oleksandr Byelkin
Merge branch '13.1' into bb-13.1-release
Kristian Nielsen
MDEV-41560: BiE: PURGE BINARY LOGS refusal returns ER_ERROR_ON_READ

In purge_adjust_limit_file_no(), don't try to adjust the limit_file_no if it
lies before our oldest binlog file_no.

This used to be able to occur when @@slave_connections_needed_for_purge
blocked an explicit PURGE BINARY LOGS statement, when the server layer would
set the limit_file_no to 0. However, after MDEV-34504/MDEV-41214, such
explicit PURGE ignores @@slave_connections_needed_for_purge, and this
condition can no longer occur.

However, it is still correct in purge_adjust_limit_file_no() to do nothing
if the limit from the server is before any current binlog file. In this case
there can surely be any oob references needed in an earlier binlog file, so
no downward adjustment is needed. So add a check for this instead of trying
to open a non-existing binlog file and getting an error.

Signed-off-by: Kristian Nielsen <[email protected]>
Marko Mäkelä
MDEV-41506: Broken recovery of SET GLOBAL innodb_log_archive=OFF on PMEM

recv_sys_t::find_checkpoint(): When modifying log_sys.archive,
remember to call mtr_t::finisher_update().

mtr_t::finisher_validate(): A validation predicate for srv_start().

Reviewed by: Thirunarayanan Balathandayuthapani
Vladislav Vaintroub
Fix main.grant_repair on Windows when user.MAI ends with Ctrl-Z

The test patches user.MAI from perl, opened in text mode. On Windows
that strips a trailing 0x1A byte on close, so the index file becomes
one byte shorter and the server reports a size mismatch instead of
repairing the table. Open the file with the :raw layer.

Assisted-by: Claude:claude-sonnet-5-5
Jan Lindström
Record test result after protocol change.
Vladislav Vaintroub
Move socket-vs-pipe async-read dispatch into Vio_transport

win_aiosocket::begin_read() independently re-derived whether the
underlying connection was a socket or a named pipe (m_is_pipe, set from
vio_get_transport(*vio)->type() == VIO_TYPE_NAMEDPIPE at init() time) to
choose between WSARecv() and ReadFile() -- a decision Socket_vio and
Named_pipe_vio already make internally for their own read()/write()/
io_wait().

Add Vio_transport::async_read(), implemented by Socket_vio (WSARecv) and
Named_pipe_vio (ReadFile), each using its own already-stored socket/
handle. Expose it publicly as vio_async_read(). win_aiosocket now stores
the Vio* it was initialized with and calls this instead of branching on
m_is_pipe, which is removed. win_aiosocket no longer needs WSABUF either,
since the buffer/length are now passed as plain arguments.

Also deduplicate CONNECT::handle(): TP_connection_win and
TP_connection_generic each independently implemented the same
"vio_type == VIO_TYPE_NAMEDPIPE ? pipe : getfd(sock)" ternary to get the
raw OS handle before any Vio exists (this part is unavoidable -- CONNECT
represents a connection prior to Vio construction, used to register with
the OS I/O completion mechanism). Both now call the single new
CONNECT::handle() accessor instead.

Assisted-by: Claude:claude-sonnet-5
Aleksey Midenkov
Fix SSL test failures with GnuTLS client (11.4)

With WITH_SSL=bundled the server uses wolfSSL and Connector/C is
built with GnuTLS. The GnuTLS backend reports a CA-signed server
certificate with an unknown issuer as MARIADB_TLS_VERIFY_UNKNOWN,
which neither --ssl-fp nor password-based verification can override
(OpenSSL reports it as MARIADB_TLS_VERIFY_TRUST).

The fix:

  main.ssl_fp      skip unless the client uses OpenSSL or LibreSSL
  main.mysql      pass --ssl-ca to a GnuTLS client for the
                  --ssl-verify-server-cert check
  rpl.rpl_semi_sync_no_missed_ack_after_add_slave
                  include default_client.cnf, so check-testcase
                  connects with --disable-ssl-verify-server-cert
                  (also done in 10.11)
Aleksey Midenkov
Fix SSL test failures with GnuTLS client (10.11)

The test .cnf does not include default_client.cnf, so clients do not
get loose-disable-ssl-verify-server-cert. Since 11.4 the client
verifies the server certificate by default. With WITH_SSL=bundled
Connector/C is built with GnuTLS, which reports the CA-signed test
server certificate with an unknown issuer as
MARIADB_TLS_VERIFY_UNKNOWN, so check-testcase fails to connect to
server 2 with "The certificate issuer is unknown".

The fix includes default_client.cnf into the test .cnf, like other
rpl tests do.
Jan Lindström
MDEV-40727 fix test path match, log synced filesystems on all platforms

Match only the trailing test-specific path, not the full literal path.
Remove the non-Linux early return so sync_filesystems() always logs
each flushed filesystem, and verify table content after SST.

Assisted-by: Claude:claude-4.6-sonnet
Oleksandr Byelkin
Merge branch '12.3' into bb-12.3-release
sjaakola
MDEV-38981 Galera loses wsrep_gtid_domain_id after pc.recovery restart

Fix for MDEV-24546 changed the storage for wsrep_gtid_domain_id
(either in config file or as an option) to be into wsrep_gtid_domain_id
variable.  And it is copied to wsrep_gtid_server struct's domain_id only
in the variable's ON_UPDATE hookw.

On server startup this struct was set only by the bootstrap (startup with
--wsrep-new-cluster) or by SST/IST donation from the donor.
When all nodes crashed and the cluster re-formed through pc.recovery,
neither of these happened, so wsrep_init_gtid() replaced the recovered
domain with 0. New writes then got domain 0.
And afer this, later joiners also inherited domain 0 from their donor.

The fix here is simply to copy wsrep_gtid_domain_id to wsrep_gtid_server struct
in wsrep_init_server(), before any state transfer.

Commit has a new mtr test: galera.MDEV-38981,
Assisted-by: https://mariadb.org/governance/governance-ai-policy/
nada
MDEV-38829: Fix semisync assertion on failed direct binlog write

MYSQL_BIN_LOG::write() guarded semisync registration (report_binlog_update) on the direct-write path with if (!error), but did not apply the same guard to the subsequent wait_after_sync() call. When the write failed before registering the transaction, wait_after_sync() still ran and looked for the transaction in the Active_tranx list, found nothing, and tripped the DBUG_ASSERT in commit_trx() that assumes a missing entry can only be caused by semisync having been switched off and on.
Vladislav Vaintroub
Fixup be807b2d047: match GnuTLS only, not every non-OpenSSL client

Schannel on Windows is not OpenSSL either, but handles these cases.

Assisted-by: Claude:claude-sonnet-5-5
Kristian Nielsen
MDEV-41433: Infinite IO error on a binlog-in-engine master

When the master uses binlog-in-engine, the slave is required to connect with
GTID enabled, and an error is thrown in the dump thread if not.

However, the error thrown was a custom error code, this is not handled
correctly by the slave and resulted in the IO thread looping infinitely,
reconnecting and immediately getting error about requiring GTID mode.

Signed-off-by: Kristian Nielsen <[email protected]>
Vladislav Vaintroub
MDEV-40878 avoid repeated parsing of PROXY headers

Do not parse multiple proxy headers. The protocol spec says the header is
at the beginning of a connection, so there could only be one.

According to example in the spec, in multi-layer scenarios, where several
proxies are involved between client and backend, the intermediate proxy
is supposed to be configured to replace the existing header. Thus multiple
headers are not expected.
Vladislav Vaintroub
MDEV-22991 Support SSL over named pipes
Aleksey Midenkov
Merge 10.11 into 11.4
Thirunarayanan Balathandayuthapani
MDEV-41281 Unbounded Recursion in InnoDB FTS Boolean-Mode causes Stack-Overflow fts_ast_visit

expr_lst: expr_lst sub_expr wrapped the expression list parsed so
far in a newly created FTS_AST_LIST for every sub-expression,
so a query such as '(word)' repeated N times built N nested lists.
fts_ast_visit() recurses once per FTS_AST_LIST and overflowed the
thread stack; the default thread_stack was exhausted at about
2300 repetitions.

Append the sub-expression to the list that is already being built,
and create a list only when there is none yet, the way
the neighbouring expr_lst: expr_lst expr rule has always done.
The sub-expressions now become siblings of a single list and
the depth no longer grows.

This also corrects '+term (subexpr)'. The FTS_EXIST pass used to
run to completion in the inner list before the sub-expression was
unioned at the outer level, so rows that matched only the
sub-expression were returned.

Based on mysql/mysql-server@e46e9db484a051db6ffb0abd2b06d3b38ef71a35
Khaled Riyad
MDEV-41140 mariadb-server.postinst chown dereferences symlinks

The postinst, preinst, rpm postin and mysqld_safe scripts followed
symlinks when fixing ownership and permissions under /var/log/mysql
and /var/lib/mysql. Use -h and find -execdir, drop the rpm chmod, and
let mysqld_safe write as the mysql user, so symlinks there are no
longer dereferenced.

Behavior changes.
- symlinks inside these directories are no longer followed
- only the top level of /var/log/mysql is adjusted, not subdirectories
- the rpm scriptlet no longer runs chmod on the permission database
Oleksandr Byelkin
Fix Debian upgrade from distro mariadb-server-10.6 leaving server stopped

With compat 11 (MDEV-34191) the dh_installinit restart in mariadb-server
postinst runs before dh_installsystemd unmasks mariadb.service, so after
the distro's mariadb-server-10.6 removal masked the unit, invoke-rc.d
silently skipped the restart. Use compat 10 as 11.4 and later do, which
unmasks/enables the unit before restarting it.

Assisted-By: Claude Opus 5.5 <[email protected]>
Anway Durge
MDEV-38899: Fix assertion in prepare_record() with RBR NOBLOB and UNIQUE BLOB

Problem:
When using RBR with binlog_row_image=NOBLOB, a table with a UNIQUE
constraint on a BLOB NOT NULL column causes a debug assertion failure
in prepare_record() on the slave:

  DBUG_ASSERT(!((f->flags & NO_DEFAULT_VALUE_FLAG) && f->vcol_info))

A UNIQUE index on a BLOB creates a hidden virtual column (hash). This
vcol inherits NOT NULL and receives NO_DEFAULT_VALUE_FLAG. When the
blob is excluded from the NOBLOB row image, the assertion fires.

Fix:
Virtual columns compute their own values and never use the default-value
mechanism. Skip them in the missing-default check inside
prepare_record(), mirroring has_no_default_value(). Remove the invalid
assertion.

Regression introduced by: MDEV-36290
Oleksandr Byelkin
Diagnose sporadic plugins.password_reuse_check failure

The first GRANT is sometimes rejected by password_reuse_check on
amd64-ubasan-clang-22 builders, and the test dies before the plugin's
warning with the underlying SQL error is shown. Show warnings in that case.

Assisted-By: Claude Opus 5.5 <[email protected]>
Vladislav Vaintroub
MDEV-22991 Support SSL over named pipes

Update libmariadb, to remove named pipe SSL check.
Update client.c to remove that check as well.

Add MTR test for named pipe + SSL:
- for Connector/C client, new test named_pipe_ssl
- for in-server clent, run mariabackup with user created as
  "IDENTIFIED WITH named_pipe REQUIRE SSL"
Kristian Nielsen
MDEV-41214: PURGE BINARY LOGS does not delete non-active binlog files

Make the binlog-in-engine code path ignore
@@slave_connections_needed_for_purge for interactive PURGE BINARY
LOGS.

Signed-off-by: Kristian Nielsen <[email protected]>
Jan Lindström
Lower galera version gate to 26.4.28 for MDEV-38920 tests

MDEV-38920-evs-config-warn.test and MDEV-38920-install-timer-expired.test
gated on galera 26.4.29, so both silently skip on a 26.4.28 provider and
give no coverage there. Lowered the gate to 26.4.28, the lowest version
confirmed to exercise the fix. Updated the .result files for the
"# Correct Galera library found" line check_galera_version.inc now emits.

Assisted-by: Claude:claude-4.6-sonnet
Oleksandr Byelkin
MDEV-35867 mariadb-check --repair does not repair sequences, only changes the status to OK

REPAIR of a sequence table with more or fewer than one row reported OK.
Now ha_sequence::repair() checks the row count after the engine repair
and reports the sequence as corrupt.

Also a failed table recreate in REPAIR was reported as
"Table is already up to date" (bool result taken as HA_ADMIN_ALREADY_DONE).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Oleksandr Byelkin
Merge branch '10.11' into 11.4
Oleksandr Byelkin
Merge branch '10.11' into bb-11.4-release
Oleksandr Byelkin
MDEV-39566 crash on a sorted scan of performance_schema.status_by_*

The bitmap of materialized rows in PFS_table_context was sized by the
live row count of the buffer container, which grows while a scan runs:
a sorted scan sizes it twice and asserted when the two sizes differed,
and set_item() could write past its end.  status_by_account used the
thread local key of status_by_host.  The allocation used the number of
bits in a word as its size in bytes.  m_last_item started at 0, so
set_item(0) did nothing and rnd_pos() dropped the first row.

Size the bitmap by the container maximum, which is fixed at startup;
give status_by_account its own key THR_PFS_SBA; allocate sizeof(ulong)
per word; start m_last_item at a sentinel.

Co-Authored-By: Claude Opus 5 <[email protected]>
Oleksandr Byelkin
Merge branch '11.4' into bb-11.4-release
Oleksandr Byelkin
Merge branch 'bb-11.4-release' into bb-11.8-release
Rex Johnston
MDEV-36295 backport followup, wrong version marker in test file