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
Vladislav Vaintroub
MDEV-38741 Abort the running statement when its client disconnects

A watcher thread subscribes to the OS notification that a client has
gone (e.g. TCP FIN or RST for a TCP socket, a gone client process for a
named pipe) and aborts the running statement like KILL CONNECTION does.
Controlled by the global variable disconnect_watcher. Details in
PR#6035.

Assisted-by: Claude:claude-sonnet-5-5
Vladislav Vaintroub
MDEV-38741 mtr: do not suppress the reason of a client disconnect

The global suppressions of "Aborted connection", in mariadb-test-run.pl
and mtr_warnings.sql, hid the line that the client disconnect watcher
writes when it aborts a command: "Aborted connection N to db: 'x' user:
'u' host: 'h' (Client disconnected)". Nothing showed when the watcher
aborted a connection that it should have left alone. main.locale found
one, because its server log is in German and the English entry did not
match.

Make the two entries skip a line that ends in "(Client disconnected)".
Other aborted connections are suppressed as before. The tests that drop
a client on purpose accept the reason with mtr.add_suppression(),
details in PR#6035.

Assisted-by: Claude:claude-sonnet-5-5
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-38741 Abort the running statement when its client disconnects

A watcher thread subscribes to the OS notification that a client has
gone (e.g. TCP FIN or RST for a TCP socket, a gone client process for a
named pipe) and aborts the running statement like KILL CONNECTION does.
Controlled by the global variable disconnect_watcher. Details in
PR#6035.

Assisted-by: Claude:claude-sonnet-5-5
Oleksandr Byelkin
Fix assertion in Create_tmp_table::finalize lost in 10.11->11.4 merge

Merge 3d174503712 dropped the create_tmp_table_for_derived check in
Item_field::create_tmp_field_from_item_field().

Restore the check.
Oleksandr Byelkin
Merge branch '11.8' into 12.3
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:claude-opus-5-5
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
Oleksandr Byelkin
Merge branch '11.4' into 11.8
Rex Johnston
MDEV-39492 PQ: key lookups under a divided driver are credited with
the square root of the division

TPC-DS Q68's grouped derived table, with eight workers, was costed
cheaper with store_sales divided among them and date_dim, store,
customer_address and household_demographics looked up by eq_ref under
it -- 395 against 514 for the serial plan that starts from the 72
matching dates -- and ran in 0.70 s where the serial plan runs in
0.24 s.

The join-order search divided every position under a parallel driver
by the driver's parallel_divisor, as if W workers did W times the work
of one. A scan does: each worker reads its own pages at the serial
rate, store_sales at 0.14 us a row per worker against 0.12 serially.
Key lookups do not. The 2,880,404 eq_ref probes of date_dim took
0.35 us each serially and 1.6 us each per worker with eight workers
probing the same index at once, and the plan as a whole ran 1.5 times
faster with two workers, 2.1 with four and 2.3 with eight.

position_cost_in_plan() now divides a ref, eq_ref or ref_or_null
position by the square root of the divisor. That fits the two- and
four-worker measurements and is still generous at eight; it is also
enough to make Q68's divided plan lose at eight workers, and the query
runs the serial plan in 0.32 s. A BNL or hashed join buffer scans the
inner table and divides like a scan, so it is left at the full
division.

What else it moves was checked: TPC-DS Q29 and Q66 keep their divided
plans at four and eight workers, and TPC-H Q1, Q3, Q5, Q10 and Q12 keep
theirs at four with their times unchanged (Q7 and Q11 serial as
before). The dimension lookups under a divided fact table are few next
to the rows scanned, and the discount on them does not reach the
decision.

main.parallel_query_costing: the grouped case's trace lists one complete
parallel plan fewer, the search having pruned the other sooner.

This commit was prepared with Claude Code (Fable 5.1), which measured
the forced plan's scaling by worker count and the per-probe cost from
ANALYZE, wrote the rule, and re-ran the TPC-DS and TPC-H queries, the
parallel_query tests in both protocols and the main suite.
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
Sergei Petrunia
MDEV-38274: Unexpectedly large pages_read_count in main.analyze_stmt_prefetch_count

The testcase checked the values of pages_prefetch_read_count and
pages_read_count that InnoDB reported for the query.

The numbers depend on how fast the prefetch thread is in comparison with
the query thread. It can also happen that we request to prefetch a page
but then still have to wait for it to be read, which is counted in
pages_read_count.

Replace the checks in the file with ones that will hold in all
circumstances.
Sergei Golubchik
skip columnstore better

followup for 550444c3bd4
Oleksandr Byelkin
Merge branch '12.3' into mariadb-12.3.4
Rex Johnston
MDEV-39492 PQ: charge a parallel plan for every row the workers ship

The cost of a parallel plan was the workers' share of the join plus the
setup, and nothing for the result: the manager receives every row the
workers ship, by itself, and a plan whose output is a large share of
what it reads handed it as many rows as the join produced at no cost.
A cross join of 1000 x 2000 rows was costed cheaper in the workers and
ran there 15 times slower than serially, the time going into writing
two million rows into the workers' containers and draining them.

The join-order search now adds the cost of shipping to a parallel plan
when the plan is complete, which is the first point its row count is
known: at the leaf of best_extension_by_limited_search() and at the end
of cost_straight_join(), as parallel_ship_cost(). A partial plan carries
no estimate of it, which is a lower bound, so the pruning by cost above
the leaf is unchanged.

What is shipped depends on the query's shape, decided once per
optimization by parallel_estimate_shipped_groups() into
JOIN::parallel_groups. A query that does not aggregate ships every
joined row. One that aggregates over everything it reads ships a partial
per worker, which is charged nothing. A grouped one ships a partial per
group per worker, and the number of groups is estimated as the product
of the GROUP BY columns' distinct values from the engine-independent
statistics, capped by the joined rows; without statistics the estimate
is one group, the optimistic side, which leaves such a query costed as
before rather than charged for every joined row.

A row costs optimizer_parallel_row_cost, a new session variable, while
the worker's container is in memory: 0.03 us by default, measured on a
1,000,000-row scan shipping two INT columns. A container is a temporary
table that starts as a HEAP table of at most min(tmp_memory_table_size,
max_heap_table_size) bytes and is converted to Aria when that is
exceeded, after which every row goes through the page cache: the same
scan shipping a VARCHAR(30) as well took 630 ms in the workers against
65 ms serially, 0.6 us a row. So the rows past what the containers hold
in memory, the busiest worker holding rows / parallel_divisor of them
and each container one HEAP table's worth, cost DISK_TEMPTABLE_LOOKUP_COST
more. The row width is the plan's tables' used field lengths at their
declared length, which is how HEAP stores a VARCHAR, not capped at the
engine's mean row length as the join buffer's estimate is. Set to 0 the
variable switches the charge off, the disk tier included.

On the scratch server, with four workers: the two-INT-column scan of a
million rows stays divided (43 ms against 61), the VARCHAR one is read
serially (93 ms, where the divided reading took 630), and the TPC-H
plans are unchanged. The estimate is the optimizer's: a filter it
cannot see through, such as b % 10 = 0, is costed as shipping every row.

Tests. main.parallel_query_costing: a join that ships every joined row
is divided at the default charge and serial at a large one, and a
grouped query at the same charge stays divided, with the trace's
parallel_rows_shipped for each. main.parallel_query_join, _sort and
_spill switch the charge off beside the setup cost, as what they ship
and spill is what they test, not what it costs. The variable is added
to the sysvars, optimizer_costs, opt_context_replay and mysqld--help
results.

This commit was prepared with Claude Code (Fable 5.1), which measured
the per-row shipping cost in memory and after a spill and found the
spill to be the ten-fold difference, wrote the estimate and the cost,
adapted the tests, rebuilt the worktree and ran the parallel_query tests
in both protocols and the main suite.
Vladislav Vaintroub
MENT-2856 Add Galera test for --system-users

Assisted-by: Claude:claude-sonnet-5-5
Sergei Golubchik
MDEV-41432 CONVERT TABLE ... TO PARTITION does not check privileges on the table it moves in

The table being moved in got grant.privilege copied from the
partitioned table, so check_grant() verified ALTER, DROP on it against
the wrong database. Run check_access() on its own database instead.

Assisted-by: Claude:claude-opus-5-5
Vladislav Vaintroub
MDEV-38741 mtr: do not suppress the reason of a client disconnect

The global suppressions of "Aborted connection", in mariadb-test-run.pl
and mtr_warnings.sql, hid the line that the client disconnect watcher
writes when it aborts a command: "Aborted connection N to db: 'x' user:
'u' host: 'h' (Client disconnected)". Nothing showed when the watcher
aborted a connection that it should have left alone. main.locale found
one, because its server log is in German and the English entry did not
match.

Make the two entries skip a line that ends in "(Client disconnected)".
Other aborted connections are suppressed as before. The tests that drop
a client on purpose accept the reason with mtr.add_suppression(),
details in PR#6035.

Assisted-by: Claude:claude-sonnet-5-5
Daniel Bartholomew
bump the VERSION
Rex Johnston
MDEV-42364 PQ: a worker's join buffers are allocated on the worker's thread

In a debug build main.parallel_query_join aborted in the worker THD's
destructor: status_var.local_memory_used was not zero, and safemalloc
reported the join buffer and its field descriptors as freed by a worker
thread but allocated by the query thread.

The manager built each worker's JOIN_CACHE in setup_worker_jointabs() and
called init() there, on the query thread. init() allocates the buffer with
my_malloc(MY_THREAD_SPECIFIC) and the field descriptors on the cache's
JOIN's THD, the worker's. A thread-specific allocation is charged to
current_thd at the time, the manager's THD, while the free -- the buffer in
pwt_worker::close_tables(), the descriptors when the worker THD's mem_root
is torn down -- is credited to the worker's THD on the worker's thread. Each
THD's count ended up off by the buffer in opposite directions, and ~THD
asserts on a non-zero count.

The cache object is still built by the manager, on the statement's
mem_root, with the previous tab chained and the trackers attached. init()
now runs at the start of pwt_worker::execute_and_handoff(), on the worker's
thread, in tab order, before anything is locked, so a failure has nothing
to undo and is reported as out of memory through the worker's error path.
The allocation and the free are then made by the same thread and charged
to the same THD.

This commit was prepared with Claude Code (Fable 5.1), which reproduced the
assertion under mtr, resolved the safemalloc allocation stacks to
JOIN_CACHE::init() called from setup_worker_jointabs(), moved the init()
call to the worker thread, and verified the 24 parallel_query tests pass in
both protocols on the debug build.
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/
Rex Johnston
MDEV-42318 InnoDB range estimate doubled for ranges wider than 9 leaf pages

Prior to the MDEV-21136, the old records_in_range estimator undercounted
tall trees because it sampled only around the borders.  A compensation
doubled the estimate.

  if (root_height > divergence_height && !is_n_rows_exact)
    /* In trees whose height is > 1 our algorithm tends to underestimate:
    multiply the estimate by 2: */
    n_rows*= 2;

After MDEV-21136, this compensation is no longer needed.  This commit
removes the above lines.
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.
Vladislav Vaintroub
MENT-2856 Add --system-users option to protect designated accounts

The startup-only option --system-users=user@host,... lists accounts that
only system sessions (a listed account, bootstrap, replica or Galera
applier) may create, alter, drop, rename, grant to or revoke from.
Other sessions get ER_ACCESS_DENIED_ERROR for such statements.

Assisted-by: Claude:claude-sonnet-5-5
Vladislav Vaintroub
MDEV-38741 mtr: do not suppress the reason of a client disconnect

The global suppressions of "Aborted connection", in mariadb-test-run.pl
and mtr_warnings.sql, hid the line that the client disconnect watcher
writes when it aborts a command: "Aborted connection N to db: 'x' user:
'u' host: 'h' (Client disconnected)". Nothing showed when the watcher
aborted a connection that it should have left alone. main.locale found
one, because its server log is in German and the English entry did not
match.

Make the two entries skip a line that ends in "(Client disconnected)".
Other aborted connections are suppressed as before. The tests that drop
a client on purpose accept the reason with mtr.add_suppression(),
details in PR#6035.

Assisted-by: Claude:claude-sonnet-5-5
Oleksandr Byelkin
New help
Rex Johnston
MDEV-39492 PQ: a plan chosen for the workers must reach them, through
the split-materialized reoptimization and a reduced GROUP BY

TPC-DS Q68 with eight workers chose, for its grouped derived table, the
plan with store_sales divided among the workers and every other table
looked up by eq_ref, and then ran that plan serially: a full scan of
2,880,404 rows with four lookups each, 1.7 s against 0.3 s for the
serial plan that starts from the 72 matching dates. Two gate defects,
each enough on its own, turned the chosen parallel plan into a serial
one in the shape the workers would have run.

The first is in the post-plan check that every select-list column
outside an aggregate is a group column. The query groups by
ss_ticket_number, ss_customer_sk, ss_addr_sk and ca_city, and selects
ca_city. The plan reads customer_address by eq_ref on ss_addr_sk, a
grouped column, so remove_const() drops ca_city from the plan's GROUP
BY (eq_ref_table(): every row of a group reads the one same
customer_address row), and the aggregation table is keyed by what is
left. The check, asked with that key, found ca_city unnamed and
refused. And the pre-plan form of the same check, which is asked again
by the full gate, read the query's GROUP BY from join->group_list,
which remove_const() had reduced in place -- relinking the select's
own ORDER nodes, so select_lex->group_list was reduced with it -- and
refused for the same reason.

Pwt_group_checker now also accepts a column of a table the plan reads
by eq_ref through columns that are themselves grouped, constant or
determined the same way, which is remove_const()'s own reasoning and
leaves the column with one value per group; it is asked only of a
finished plan, with the plan to read. And pwt_query_shape_allows_workers()
copies the query's GROUP BY the first time it is asked, before the plan
(choose_plan()), into JOIN::parallel_query_group, and answers from the
copy afterwards.

The second is in what survives a reoptimization. The outer query joins
the derived table by a key on ss_customer_sk, so opt_split.cc tries
splitting it: it saves the plan, runs choose_plan() again with the outer
equality pushed in, and restores the saved plan when the split loses, as
it does here with 100,000 customers to run it for. choose_plan() sets
JOIN::parallel_plan_chosen for the plan it finds, so the restored plan
-- the divided one -- came back with the flag the losing split had left,
false, and parallel_join_check() declined it as "costed cheaper read
serially". The flag is a property of the plan and now travels with it:
Join_plan_state carries it, save_query_plan() takes it and
restore_query_plan() puts it back.

With both, the derived table runs in the workers: 0.76 s with eight,
Parallel_queries_executed counting it. That is still slower than the
0.30 s serial plan, which the costing values at 514 against the divided
plan's 395. The gap is not in the gate. The forced store_sales-first
plan takes 1.61 s serially, 1.10 s with two workers, 0.78 s with four,
0.70 s with eight and 0.73 s with twelve, and ANALYZE puts the time in
the 2,880,404 eq_ref lookups of date_dim: 0.35 us each serially, 1.6 us
each in a worker when eight of them look up the same 73,049-row table
at once, while the scan of store_sales divides cleanly. The costing
divides lookups by the number of workers as it divides the scan, and
for lookups into a small hot table the engine does not. That is a
separate matter, left for its own change.

Tests. main.parallel_query_why: a GROUP BY column of a table read by
eq_ref through a grouped column, dropped from the plan's key, no longer
a reason. main.parallel_query_costing: a grouped derived table joined by
a key on its group column from an outer query too wide for the split to
win, which runs in the workers.

This commit was prepared with Claude Code (Fable 5.1), which traced the
two refusals on a copy of the TPC-DS data, found the reduced GROUP BY
and the flag lost across the restored plan, wrote the fixes and the
tests, rebuilt the worktree, measured the forced plan's scaling by
worker count, and ran the parallel_query tests in both protocols and
the main suite.
Oleksandr Byelkin
Merge branch '10.11' into 11.4
Marko Mäkelä
MDEV-41395 fixup: GCC 16 -Wstringop-overflow

fil_system_t::default_encrypt_next(): Dereference the iterator only once
to avoid a confusing and bogus -Wstringop-overflow by GCC 16.2.0.
Rex Johnston
MDEV-42364 PQ: each worker runs a join buffer of its own

A plan that read a table through a join buffer was refused by the gate
(101a4ccc724), and the join-order search costed the tables under a
parallel driver without one so as not to choose such a plan. That kept
the workers out of every plan where a buffer is the right join method:
a cross join, a small dimension scanned under the divided driver
(TPC-DS Q66's ship_mode, which the gate refused on that ground), any
join without a usable index. Before 101a4ccc724 the worker stripped the buffer off its copy of
the tab and joined a row at a time, scanning the inner table once per
driving row instead of once per buffer-full, which is where the order of
magnitude went on

  SELECT * FROM s1 JOIN s2 ON (1)    -- 1000 x 2000 rows

Now a worker runs a buffer of its own. The saving a buffer gives is fewer
scans of the inner table, and a buffer per worker gets the same saving: a
worker with a quarter of the driving rows fills it a quarter as often, so
the inner table is scanned about as often in total as serially, at most
one extra partial-buffer scan per worker, and those scans run
concurrently. There is nothing to share between the workers.

setup_worker_jointabs() builds, for a tab the manager reads through a
BNL or BNLH cache, a new JOIN_CACHE of the same kind over the worker's
own JOIN and tabs, chained to the previous tab's the way the manager's
is, and calls init() on it. init() walks the worker's tabs up to this one
and takes the fields of the worker's table copies, and it sizes and
allocates the buffer through the worker's THD, which carries the
session's join_buffer_size, so each worker gets a buffer of the session's
size. The tab before it is pointed at sub_select_cache(), which fills
the buffer and flushes it when full and on the end-of-records call the
worker's driver already makes. The buffer is freed with the worker's
tables (pwt_worker::close_tables()).

A buffer evaluates two conditions the nested loop does not, and both
needed a home on the worker's tab. The scan filter in cache_select is
applied to each row of the inner table as the buffer scans it
(JOIN_TAB_SCAN::next()), and remove_redundant_bnl_scan_conds() has taken
its conjuncts out of select_cond, so the worker's tab gets an SQL_SELECT
holding a clone of it, rebound to the worker's tables. The remainder is
evaluated by JOIN_CACHE::check_match() through select->cond rather than
select_cond, so a cached tab gets a second SQL_SELECT over the cloned
select_cond; neither carries a quick. The gate checks the scan filter is
worker-safe whole: it is applied before any prefix row is matched, so
the manager cannot take a conjunct of it the way pwt_split_table_cond()
takes one of a table condition.

A hashed buffer (BNLH) keys the buffered rows by the tab's ref, which
for a hash join is keyed by a KEY create_hj_key_for_table() built for
the manager's table, with key parts naming the manager's fields.
pwt_clone_hj_key() makes the same descriptor over the worker's fields,
clone_table_ref() takes the KEY rather than deriving it from the table,
and the gate and the inert assertions admit JT_HASH.

BKA and BKAH are not run: they read the inner table through multi-range
read on the handler. The gate refuses them, and so that the costing never
chooses a plan the gate refuses, check_join_cache_usage_for_tables()
caps a plan chosen for the workers at join_cache_level 4, where a level
that serially means BKA means BNLH. best_access_path() prices a ref
access the same with or without a BKA buffer, so the plan runs in the
shape it was costed in either way.

The join-order search costs the tables under a parallel driver with join
buffers and hash joins (parallel_chain in best_access_path() now
withholds only the rowid filter).

The worker's hand-built JOIN gets the manager's tables_list, read only:
next_linear_tab() ends its walk at exec_join_tab_cnt(), which is zero
for a JOIN without one, and JOIN_CACHE::calc_record_fields() walked past
the end of the worker's array.

ANALYZE: the worker gets its own three buffer counters, summed into the
manager's tab trackers by quiesce_workers() like the table counters.
Exec_time_tracker gains add() and reset_counts() for that.

Measured on the cross join above with four workers: ANALYZE shows s2
scanned twice, once per worker that got rows, where the stripped worker
scanned it a thousand times. The join is no longer the cost of that
query in the workers; what remains is every joined row being written to
the worker's sink and drained by the manager, which the costing does not
price and which no buffer can help. TPC-H SF1 plans and times (Q3, Q5,
Q10, Q12) are as before this commit.

Tests. main.parallel_query_join: the BNL case now runs in the workers,
plus a BNLH case, the level-6 case (BKA serially, BNLH in the workers)
and the cross join above. main.parallel_query_why: a buffered inner
table is no longer a reason. main.parallel_query_costing gains a small
table scanned under the divided driver, which takes its BNL buffer in
the serial and the parallel plan alike and runs in the workers.

This commit was prepared with Claude Code (Fable 5.1), which traced what
a JOIN_CACHE reads from its JOIN and tabs, wrote the worker-side cache
construction, condition and hash-key cloning, the gate and costing
changes and the tracker merge, updated the tests, rebuilt the worktree,
ran the parallel_query tests in both protocols and the main suite, and
timed the cross join and TPC-H on a scratch server.
Rex Johnston
MDEV-42318 followup for parallel query tests
Vladislav Vaintroub
MENT-2856 Add --system-users option to protect designated accounts

The startup-only option --system-users=user@host,... lists accounts that
only system sessions (a listed account, bootstrap, replica or Galera
applier) may create, alter, drop, rename, grant to or revoke from.
Other sessions get ER_ACCESS_DENIED_ERROR for such statements.

The check runs at the statement entry, before Galera TOI, as the
appliers on the other nodes are exempt and would execute a statement
denied on the originating node.

Assisted-by: Claude:claude-sonnet-5-5
Daniel Black
MDEV-41870: segfault on bootstrap (SLES 15.7)

SLES 15.7 earlier had a liburing 2.1 version. MariaDB
packages are build with the version bumped 2.9. As ABI
incompatable elements are compiled into MariaDB because
of inlined functions, we need to explictly bump the
dependency to include the 2.9 version of liburing.

This is for both the server, and mariadb-backup if configured.
Oleksandr Byelkin
new CC 3.3
Susil
MDEV-41995 galera.MDEV-40727 result file has latin1 instead of utf8mb4

The four SHOW CREATE TABLE outputs in galera/r/MDEV-40727.result record
DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci. That is the server
default on 10.11 and 11.4, but not on 11.8, where the tables that the
test creates get utf8mb4 / utf8mb4_uca1400_ai_ci. The test therefore
fails on 11.8.

The merge of 11.4 into 11.8 (62b26c2f7cb8) brought in the 10.11/11.4
version of the result file. Use the utf8mb4 version, which 12.3 and
later already have.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>