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-42025 Unauthenticated handshake converts an unbounded CLIENT_CONNECT_WITH_DB database name

cut the database name to SAFE_NAME_LEN+1 characters before converting
it, a longer name is invalid anyway and stays invalid after the cut.

Assisted-by: Claude:claude-opus-5-5
Alessandro Vetere
MDEV-41844 Test innodb.buf_pool_resize_pcur_restore is flaky

The procedure read_into_first_new_block() requires that the page of a
table is read into the first block that a buffer pool grow adds. While
history exists, the purge coordinator runs once per second. It reads
undo log pages, and purge_truncation_callback() reads the header page
of each rollback segment. On a slow builder, these reads can take the
first new block in all 5 attempts.

Stop purge for the duration of the test with FLUSH TABLES ... FOR
EXPORT on a separate connection. A read view does not stop these reads.
Remove the wait for purge between the two cases, because purge is
stopped.

purge_sys_t::stop() waits only for the purge coordinator. Runs of
purge_truncation_callback() that the coordinator submitted before can
still read pages after FLUSH TABLES ... FOR EXPORT returns. Add the
debug keyword purge_stop_wait_truncation, which makes
purge_sys_t::stop() also wait for these runs, and set it in the test.

Assisted-by: Claude:claude-opus-5-5
Oleksandr Byelkin
Merge branch 'bb-11.8-release' into bb-12.3-release
rusher
[misc] pass MaxScale license key to the CI setup action
Marko Mäkelä
MDEV-42035: Recovery hangs due corrupted system or undo tablespace

The function recv_sys_t::recover() that was introduced
in commit 850d61736deba354377634cf344256ee850b93b7 (MDEV-32042)
will cause an infinite loop in case the requested page is corrupted.
The reason is that the code path would hold an extra buffer-fix on
the block, which buf_pool_t::corrupted_evict() would wait to be
released, in vain.

Let us avoid the extra buffer-fix and add stricter assertions
that must hold during the recovery phase, when regular access
to the buffer pool via buf_page_get_gen() and friends is blocked.
Vladislav Vaintroub
Do not attempt to resolve addresses that getnameinfo debug injections fake

The injections overwrite the lookup result anyway, but the real lookup
of the reserved 192.0.2.0/24 test addresses can be slow, and on Linux
without DNS fails with a temporary error. Skip it, and use a helper
skip_dns() in the tests that did not yet use getnameinfo_error_noname.

Assisted-by: Claude:claude-sonnet-5-5
Marko Mäkelä
MDEV-42009: Set GLOBAL innodb_log_file_size=ON is not crash safe

log_t::set_archive(): If the log is memory-mapped
(on /dev/shm or on a DAX mounted file system),
zero-fill the rest of the file before updating the header,
so that any old garbage from innodb_log_archive=OFF format
will be properly discarded before recovery.
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.
Jan Lindström
MDEV-40212 galera_duplicate_primary_value stalls on single applier

Failure:
- The test needs two write sets applied concurrently by two
  appliers on node 1, but never sets wsrep-slave-threads, so it
  defaults to 1.
- lock_wait_wsrep_kill's debug sync parks the applier thread
  itself on WAIT_FOR wsrep_after_kill_continue; with only one
  applier, the second write set has no free thread, and WAIT_FOR
  wsrep_after_kill_reached_2 blocks until --debug-sync-timeout
  (300s).
- The timeout does not fail the test, so it reports pass without
  ever reaching the concurrent brute-force state MDEV-31658 added
  it to cover.

Fix:
- Set wsrep-slave-threads=2 on node 1, so the two independent
  write sets apply concurrently, matching what the test is meant
  to exercise.

Assisted-by: Teemu Ollakka <[email protected]>
Assisted-by: https://mariadb.org/governance/governance-ai-policy/
Alexey Yurchenko
MDEV-35940, MDEV-35964 reenable MTR tests

As MDEV-35940, MDEV-35964 have been fixed, reenable tests disabled
because of them
Sergei Petrunia
Merge: MDEV-39226: Push whole multi-table update/delete down into engines
Oleksandr Byelkin
MDEV-41258 Crash in Item_func_nextval on prepared re-execution

Sequence prelocking entries were matched across re-executions by
db.str/table_name.str pointer identity, aliasing memory on the TABLE's
own mem_root. Once the owning table was closed and reopened, those
pointers went stale, leaving a dangling duplicate entry that still got
opened and crashed.
Fix: match entries by owning TABLE_LIST and position, deep-copied onto
the statement's own arena.

The relink was gated by has_prelocking_list, which stays true forever
once a trigger is involved, so it silently stopped running after the
first execution for such statements.
Fix: moved it into its own function, called unconditionally per table,
keeping the original gating, scoped to DML statements only.

A stale entry's linked_table pointer could survive its owner's open
being skipped, or a mid-statement open_tables() backoff
(close_tables_for_reopen()), leaving open_table()'s backlink write to
land on freed memory.
Fix: clear it in TABLE_LIST::reinit_before_use() and in
close_tables_for_reopen().

set_parameters() overwrote lex->default_used from each execution's own
bound parameters only, losing a literal DEFAULT written in the
statement text itself.
Fix: also record default_used at prepare time and OR it in.

A mid-execute_loop() reprepare() swaps in a freshly re-parsed lex,
losing "EXECUTE ... USING DEFAULT" already folded into default_used by
set_parameters() for this execution.
Fix: save that bit before reprepare() and OR it back in afterwards.

Assisted-By: Claude Opus 5.5 <[email protected]>
Oleksandr Byelkin
MDEV-41258 Crash in Item_func_nextval on prepared re-execution

Sequence prelocking entries were matched across re-executions by
db.str/table_name.str pointer identity, aliasing memory on the TABLE's
own mem_root. Once the owning table was closed and reopened, those
pointers went stale, leaving a dangling duplicate entry that still got
opened and crashed.
Fix: match entries by owning TABLE_LIST and position, deep-copied onto
the statement's own arena.

The relink was gated by has_prelocking_list, which stays true forever
once a trigger is involved, so it silently stopped running after the
first execution for such statements.
Fix: moved it into its own function, called unconditionally per table,
keeping the original gating, scoped to DML statements only.

A stale entry's linked_table pointer could survive its owner's open
being skipped, or a mid-statement open_tables() backoff
(close_tables_for_reopen()), leaving open_table()'s backlink write to
land on freed memory.
Fix: clear it in TABLE_LIST::reinit_before_use() and in
close_tables_for_reopen().

set_parameters() overwrote lex->default_used from each execution's own
bound parameters only, losing a literal DEFAULT written in the
statement text itself.
Fix: also record default_used at prepare time and OR it in.

A mid-execute_loop() reprepare() swaps in a freshly re-parsed lex,
losing "EXECUTE ... USING DEFAULT" already folded into default_used by
set_parameters() for this execution.
Fix: save that bit before reprepare() and OR it back in afterwards.

Assisted-By: Claude Opus 5.5 <[email protected]>
Sergei Golubchik
MDEV-40847 Server crash on EXPLAIN EXTENDED or CREATE VIEW of a deeply nested JSON_TABLE

* check the stack in Json_table_nested_path::print(), it recurses
  once per NESTED PATH level
* don't save a view definition if printing it failed
* don't push the EXPLAIN EXTENDED note if printing it failed

Assisted-by: Claude:claude-opus-5-5
Marko Mäkelä
MDEV-41813 OPTIMIZE TABLE makes tables grow

PageBulk::init(): Add a parameter for a hint page number, so that we will
try to allocate adjacent pages for the index.

After this change, the innodb_alter_copy_bulk=ON code path may actually
produce smaller files than the legacy code path.

Based on mysql/mysql-server@a3e2dbddec48ec229484bdf082b8c2f34ccf8c0b

Reviewed by: Thirunarayanan Balathandayuthapani
rusher
[misc] pass MaxScale license key to the CI setup action
rusher
[misc] CI: test every TLS backend against both server TLS libraries
  • cc-fedora38-amd64: build linux-connector_c failed -  stdio
  • cc-jammy-amd64: build linux-connector_c failed -  stdio
rusher
[misc] CI: pass MaxScale license key to the setup action
Rex Johnston
MDEV-40012 PQ: refuse a plan that reads a table through a join buffer

A worker has no join buffer. setup_worker_jointabs() stripped the cache off
every worker JOIN_TAB and joined a row at a time, and pwt_table_conds() handed
the worker the buffer's scan filter (cache_select->cond) as well as
select_cond so that it still rejected what the buffer would have. The result
was correct, but it was not the plan the optimizer costed: BNL, BNLH, BKA and
BKAH were chosen for scanning the inner table once per buffer-full of outer
rows, and a worker scanned it once per driving row instead. For a full-scan
inner table that can be orders of magnitude more work than the serial plan
the parallel one is meant to beat.

So the gate now refuses the plan, as the prototype did. The check sits in
can_run_query_in_workers() beside the other per-table refusals, on
tab->cache or tab->use_join_cache, both of which make_join_readinfo() has
settled by the time parallel_join_check() runs in optimize_stage2(). The
refusal names the table in the optimizer trace.

The worker-side handling of a buffered table goes with it:

- pwt_table_conds() becomes pwt_table_cond() and no longer reports
  cache_select->cond. remove_redundant_bnl_scan_conds() only moves conjuncts
  out of select_cond when the tab has a BNL/BNLH cache, so for every tab the
  gate now admits select_cond is already the whole condition. A tab can still
  carry a cache_select without a buffer, because make_join_select() builds the
  scan filter before check_join_cache_usage() decides, but its cond is then a
  copy of conjuncts select_cond still holds. The gate no longer asks whether
  that copy is worker-safe, since no worker evaluates it.
- pwt_clone_table_conds(), which cloned both halves and ANDed them, is gone;
  setup_worker_jointabs() clones the one condition with pwt_clone_rebind().
- setup_worker_jointabs() no longer clears cache, use_join_cache and
  jbuf_tracker on the worker's copy; pwt_assert_tab_inert() asserts that the
  manager's tab has no cache instead. The copy's cache_select is still
  cleared, as it can be set on a tab without a buffer.

parallel_query_join: the BNL case now expects the query to run serially,
with the same rows. The full-scan inner table case (d3) was getting a BNL
buffer under the default join_cache_level, so it runs with
join_cache_level=0 to keep covering a worker-side full scan of an inner
table. parallel_query_why pins the new refusal reason.

This commit was prepared with Claude Code (Opus 5.5), which wrote the gate
check, removed the worker-side join buffer handling it made unreachable,
updated the tests, reconfigured and rebuilt the worktree, and ran the
parallel_query tests in normal and --ps-protocol modes.
bsrikanth-mariadb
Merge MDEV-39226: Push whole multi-table update/delete down into engines
rusher
[misc] pass MaxScale license key to the CI setup action
rusher
CI: pass MaxScale license key to connector-ci-setup
Sergei Golubchik
MDEV-40826 Server Crash in JSON_SCHEMA_VALID on a Deeply Nested Schema

check stack overrun in Json_schema_keyword::validate_schema_items(),
nested "items" and other subschema keywords recurse through it.

Assisted-by: Claude:claude-opus-5-5
Oleksandr Byelkin
Merge branch 'bb-11.4-release' into bb-11.8-release
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.
Jan Lindström
MDEV-40211 galera_connect.inc sleeps one second on each invocation

Failure:
- galera_connect.inc sleeps 1 second, unconditionally, before every
  connect, as a 2015 workaround for a node racing its own join/IST
  against another node's concurrent join (MDEV-7178).
- ~700 tests in the galera/wsrep suites go through this include, so
  the blind sleep costs roughly that many seconds in a full run,
  whether or not any node is still joining.

Fix:
- Replace the sleep with include/galera_wait_ready.inc after
  connecting, polling the actual wsrep_ready state instead of
  guessing a fixed delay. galera_wait_ready.inc is the existing,
  already widely used helper for this, so this reuses it rather
  than adding a new check.
- Add a $galera_no_wait_ready opt-out for a node that is expected
  to join a non-Primary component and so never becomes ready;
  galera_pc_weight.test isolates node_1 before connecting node_3,
  so node_3 needs it.
- The ready check itself must not wait on causality: a test can
  legitimately connect a second session to a node whose applier is
  stuck behind a local lock (galera_lock_table.test does, via LOCK
  TABLES), and wsrep_sync_wait would otherwise block the check's own
  first query on that same stuck applier. Set it to 0 for the check
  and restore it from the global value afterward, without reading it
  back first, since even a bare SELECT of the session variable hits
  the same wait.

Assisted-by: https://mariadb.org/governance/governance-ai-policy/
rusher
[misc] CI: pass MaxScale license key to the setup action

MaxScale 25.10 and newer refuse to start without a license key.
  • cc-x-codbc-windows: 'dojob pwd if '3.4' == '3.4' ls win32/test SET TEST_DSN=master SET TEST_DRIVER=master SET TEST_PORT=3306 SET TEST_SCHEMA=odbcmaster if '3.4' == '3.4' cd win32/test if '3.4' == '3.4' ctest --output-on-failure' failed -  stdio
Hemant Dangi
MDEV-41414: WSREP Binlog TC: analysis & design

Commits of replicated write sets must finish in the same seqno order
on every node, with or without a binlog. Make the server enforce that
order, so binlog group commit, DDL, views and state transfer no longer
depend on the commit monitor in the Galera library.

The library registers a ticket for every certified write set. The new
Commit_order_manager in the server makes each commit wait for the one
before it, hands the turn on, tracks the committed position, and
handles aborts, node failure and commits that never finish.
Vladislav Vaintroub
mysql_client_test: accept a lost connection after a rejected proxy header

Follow-up to MDEV-39564, MDEV-39576 and MDEV-41691.

For some malformed headers the server closes the connection with bytes
still unread (v1 with a NUL or over 107 bytes, v2 with length 0). That
sends a TCP reset, which can make the client drop the error and report
CR_SERVER_LOST. Seen once, not reproduced. Accept it in those cases
only.

Assisted-by: Claude:claude-sonnet-5-5
Vladislav Vaintroub
Do not attempt to resolve addresses that getnameinfo debug injections fake

The injections overwrite the lookup result anyway, but the real lookup
of the reserved 192.0.2.0/24 test addresses can be slow, and on Linux
without DNS fails with a temporary error. Skip it, and use a helper
skip_dns() in the tests that did not yet use getnameinfo_error_noname.

Assisted-by: Claude:claude-sonnet-5-5
Vladislav Vaintroub
mysql_client_test: accept a lost connection after a rejected proxy header

Follow-up to MDEV-39564, MDEV-39576 and MDEV-41691.

For some malformed headers the server closes the connection with bytes
still unread (v1 with a NUL or over 107 bytes, v2 with length 0). That
sends a TCP reset, which can make the client drop the error and report
CR_SERVER_LOST. Seen once, not reproduced. Accept it in those cases
only.

Assisted-by: Claude:claude-sonnet-5-5
rusher
CI: pass MaxScale license key to connector-ci-setup
Oleksandr Byelkin
Merge branch 'bb-11.4-release' into bb-11.8-release
Thirunarayanan Balathandayuthapani
MDEV-42037 Assertion failure bpage->oldest_modification() when ALTER TABLE … DISCARD TABLESPACE races with the page cleaner

Problem:
=======
The page cleaner holds the latch of a dirty page while
buf_flush_space() has released buf_pool.mutex. DISCARD TABLESPACE
meanwhile runs buf_flush_remove_pages(), which removes the page from
buf_pool.flush_list without taking the page latch. When the cleaner
resumes, buf_flush_discard_page() asserts oldest_modification()

Solution:
========
buf_flush_discard_page(): remove the page from the flush list only if
oldest_modification() is nonzero. Always release the latch and free
the page, and return whether it was freed.
Rex Johnston
MDEV-40012 PQ: end a worker's scan before close(); refuse DEFAULT() in workers

Two defects found by running the main suite under ASAN with
--parallel-worker-threads=4.

A worker's handler was destroyed with its parallel scan still open.
exec() and scan_only() jump to their exit labels when
parallel_init_worker() fails, and the commonest failure is
HA_ERR_END_OF_FILE: no chunk was left for this worker, which happens all
the time on small tables. InnoDB has allocated m_pscan_worker by then, so
the scan was left for ~ha_innobase() -> parallel_scan_free(), which runs
after close() has freed m_prebuilt. parallel_scan_free() says it drops the
worker without end() for exactly that reason, but ~Parallel_scan_worker()
called end() anyway, and end() writes m_prebuilt->pscan_chunk_clamp: a
heap-use-after-free that ASAN reports on every such worker. In a build
without ASAN the write lands in freed memory, and it is the likely cause of
the intermittent SIGSEGV in free() inside pthread_create() when a later
worker reused a cached thread stack whose DTV had been overwritten. Both
exit labels now call parallel_end_worker() while the handler is still
open, which is harmless when the scan was already ended or never begun,
and ~Parallel_scan_worker() no longer calls end().

DEFAULT(col) was evaluated against the worker's row. Item_default_value is
an Item_field whose field is a private copy made by make_default_field(),
reading the share's default_values but carrying the column's own table.
Its deep_copy() shares that field, and Pwt_field_rebinder, seeing the
manager's table, repointed it at the worker's real column. DEFAULT(col)
then read the current row's value, and for an expression default
calculate() called set_default() and wrote the default into the row --
wrong results in a release build, a marked_for_write assertion in a debug
one. It shows only when the expression also names the column some other
way; alone, DEFAULT(col) is table-independent and evaluated at optimize
time. The gate now refuses any expression holding a DEFAULT(), found with
check_func_default_processor, which only Item_default_value answers.
parallel_query_clone covers a lost row, a gained row and the expression
default that crashed, and checks that none of them ran in the workers.

This commit was prepared with Claude Code (Opus 5.5), which reproduced the
pthread_create() crash under ASAN, traced it and the DEFAULT() wrong result
from a main-suite sweep with workers enabled, wrote both fixes and the
test, and ran the parallel_query tests in normal and --ps-protocol modes.
Oleksandr Byelkin
new CC 3.3