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
Monty
MDEV-39519 Change mariadb-dump to use SHOW REPLICA STATUS instead of SHOW SLAVE STATUS

Changes done to increase MySQL compatibility:
- Use SHOW REPLICA STATUS instead of SHOW SLAVE STATUS for retrieving
  slave status. If this fails with syntax error, retry with SHOW SLAVE
  STATUS.
- If SHOW MASTER FAILS, retry with MySQL 8.4 syntax SHOW BINARY LOG STATUS
- Add in MariaDB server SHOW BINARY LOG STATUS as an alias for
  SHOW MASTER STATUS.
Alexey Botchkov
MDEV-15479 Empty string is erroneously allowed as a GEOMETRY column value.

Empty string disallowed.
Aquila Macedo
MDEV-39479 Mroonga: avoid hang on invalid index flags

Stop parsing index flags after reporting an invalid flag in
mrn_parse_grn_index_column_flags().

Otherwise, an invalid index comment such as flags "COMPRESS_ZSTD" can
make CREATE TABLE loop forever while emitting warnings. Add a regression
test for this case and check that the invalid flag is reported once and
the default index flags are used.
Monty
Ensure that mtr.out-of-source is not acccidently calling itself

Calling itself will cause extensive memory usage that can kill
the machine when it runs out of memory (happend to me).

Fixed by having mtr.out-of-source checking that it is not calling itself.
In addition added a check for cmake to expand symlinks to make the
check if we are running mtr 'out of source' safer.

Author: Sergei Golubchik <[email protected]> (CMakeList.txt changes)
Oleksandr Byelkin
fix long name on view protocol
Sergei Golubchik
MDEV-39481 ASAN error on malformed WKB polygon

let's make is difficult for wkb and len to desync
Sergei Golubchik
MDEV-39292 set architecture before it's used

followup for 29453945ba22
Alessandro Vetere
MDEV-38814 Reduce pessimistic update fallbacks

A high rate of index lock SX-to-X upgrades was traced to two patterns in
btr_cur_*_update() that turn benign UPDATEs into pessimistic fallbacks:

1. btr_cur_optimistic_update() returns DB_UNDERFLOW whenever the page
    would drop below BTR_CUR_PAGE_COMPRESS_LIMIT after the
    delete-then-insert, even when the record itself is growing. On a
    freshly split page this re-triggers a merge the moment the next
    update lands, defeating the split that just happened.

2. btr_cur_pessimistic_update() handles the DB_OVERFLOW fallback by
    calling btr_cur_insert_if_possible() unconditionally. When the
    uncompressed page cannot satisfy BTR_CUR_PAGE_REORGANIZE_LIMIT after
    a reorganize, that retry fails too and the same page churns through
    pessimistic_update without ever splitting.

Introduce a system variable innodb_reduce_pessimistic_update_fallbacks
(BOOL, default OFF) that gates both fixes:

* btr_cur_optimistic_update() returns DB_UNDERFLOW only when the new
  record is strictly smaller than the old one, so growing updates do
  not trip the merge path.
* btr_cur_pessimistic_update() skips btr_cur_insert_if_possible() and
  falls through to a page split when the optimistic error was
  DB_OVERFLOW, the page is uncompressed and still holds at least one
  record after the in-place delete (so the forced split produces 1+1,
  not 0+1), the record is growing, and a reorganize would not free
  BTR_CUR_PAGE_REORGANIZE_LIMIT bytes.

Same-size updates take the optimistic path under both fixes (no merge,
no split), matching the intent that only size-changing updates
contribute to space pressure. The trade-off is that an opportunistic
merge that previously triggered on any update to a sparse page now
requires an actual shrink to fire.

To make the impact measurable, expose seven debug-only atomic counters
via SHOW GLOBAL STATUS:

  Innodb_btr_cur_n_index_lock_upgrades
  Innodb_btr_cur_pessimistic_insert_calls
  Innodb_btr_cur_pessimistic_update_calls
  Innodb_btr_cur_pessimistic_delete_calls
  Innodb_btr_cur_pessimistic_update_optim_err_underflows
  Innodb_btr_cur_pessimistic_update_optim_err_overflows
  Innodb_mtr_n_index_x_lock_calls

A new test, innodb.index_lock_upgrade, drives a 1000-row INSERT /
UPDATE / DELETE workload on a 4K-page table across three shapes (PK
only; PK + secondary index on a DATETIME column; same with
ROW_FORMAT=COMPRESSED, KEY_BLOCK_SIZE=2). It snapshots all seven
counters plus the index_page_* INNODB_METRICS between phases. The
test runs in two combinations (off and on) to lock in counter
deltas for both the legacy and the optimized paths; the compressed
table also covers the deliberate scope limitation that the
pessimistic-side branch is gated to uncompressed pages while the
optimistic-side change applies uniformly.
Sergei Golubchik
MDEV-39493 FILE privilege isn't checked for derived

check global privileges separately,
before checking for per-table SELECT_ACL
Oleksandr Byelkin
new CC 3.3
Thirunarayanan Balathandayuthapani
Serialize concurrent fulltext optimization

dict_acquire_mdl(): function now supports both MDL_SHARED (default)
and MDL_EXCLUSIVE via the exclusive template parameter.

Updated FTS optimize to acquire MDL_EXCLUSIVE first then downgrade
to MDL_SHARED_UPGRADABLE to serialize concurrent fulltext optimizations.
Raghunandan Bhat
MDEV-39265: Assertion `(mem_root->flags & 4) == 0` failed upon 2nd execution `USING DEFAULT` with sequence

Problem:
  When a prepared statement uses `DEFAULT` with sequence, on its
  second or subsequent execution, server tries to allocate TABLE_LIST
  object (used for adding sequence table to `internal_tables` list) on
  statement's memory root. This fails with an assert because statement's
  memory root is marked read-only after the first execution.

  CREATE SEQUENCE s;
  CREATE TABLE t (a INT DEFAULT(NEXTVAL(s)));
  PREPARE stmt FROM "UPDATE t SET a = ?";

  EXECUTE stmt USING 3; -- first execution, marks mem_root read-only
  EXECUTE stmt USING DEFAULT;  -- tries to allocate on second execution

Fix:
  Temporarily clear the read-only flag on the statement memory root to
  allow the allocation. Also adds a debug hook to verify allocation
  happens not more than once per prepared statement and per internal
  table added to the list.
Oleksandr Byelkin
new wolfssl v5.9.1-stable
Thirunarayanan Balathandayuthapani
MDEV-39261 MariaDB crash on startup in presence of indexed virtual columns

Problem:
========
Purge threads computing virtual columns could crash due to:
1. Stale TABLE* pointers when tables are flushed/rebuilt during purge
2. open_purge_table() called close_thread_tables() on failure, making
MDL tickets invalid before purge could release them
3. Purge coordinator opened TABLE* but workers accessed it with wrong
TABLE->in_use
4. No retry mechanism when open_purge_table() failed due to concurrent
FLUSH TABLES, BACKUP STAGE, or ALTER TABLE operations

Solution:
========
1. Removed close_thread_tables() from open_purge_table(). Purge
coordinator thread should close explicitly in close_and_reopen()

2. Added retry logic: when open_purge_table() returns NULL due to
table flush/rebuild, set must_wait() flag and retry in
close_and_reopen()

3. Update close_and_reopen() with purge_table parameter to
close the failed table. Pass it to trx_purge_close_tables()
for proper cleanup

4. Properly set and reset TABLE::in_use during purge operations:
- Set to coordinator_thd in row_purge_parse_undo_rec() when opening
- Reset in trx_purge_close_table() when closing

5. The auto_increment initialization now happens unconditionally for
purge threads , ensuring the auto_increment counter is always
properly initialized when purge opens tables with virtual columns
Alessandro Vetere
MDEV-39600 Reduce contention in buf_flush_ahead()

When calling buf_flush_ahead() with furious=false, the function
updates the async target buf_flush_async_lsn and, if necessary notifies
the page cleaner thread to start flushing more eagerly, to avoid
a long stall later when checkpoint will be required.

When many threads call buf_flush_ahead() with furious=false, if
the update of buf_flush_async_lsn is gated inside
buf_pool.flush_list_mutex, this can cause significant contention,
just to deliver the new buf_flush_async_lsn value and a potential
notification to the page cleaner thread.

This commit enables, for the non furious case, lock-free update
of buf_flush_async_lsn and lock-free check of the page cleaner idle
flag, to avoid the contention on buf_pool.flush_list_mutex.
The lock is acquired by the CAS-loop winner thread and only
after the page cleaner is observed idle.
The cleaner clears buf_flush_async_lsn via CAS, so a concurrent
lock-free bump is preserved across the clear.
Since the reads are not protected by the mutex, there is a chance that
the decision to not signal the page cleaner thread is wrong.
In the worst case though, under sustained redo-log pressure,
eventually a wakeup signal will be delivered to the page cleaner thread
anyway, so the risk of a long stall is limited.

Similar reasoning applies to the possibly wrong decision taken by the
page cleaner thread to go to idle: eventually it will be woken up.
Oleksandr Byelkin
new CC 3.3
Sergei Golubchik
MDEV-39478 COM_STMT_EXECUTE incorrectly checks for parameter value length

* remove redundant checks for `len` in `get_param_length()`
* validate return value `length` in `get_param_length()`
* fix all `Item_param::set_param_XXX()` methods to never read past `len`

note that all `Item_param::set_param_XXX()` methods correctly handle
zero-length values.
Rucha Deodhar
MDEV-39213: json range syntax crash

Analysis:
When json is being parsed, the step decreases without a out-of-bound check
resulting in failure.
Fix:
Before decreasing the step, check if it will result into out of bound.
Thirunarayanan Balathandayuthapani
MDEV-39261 MariaDB crash on startup in presence of indexed virtual columns

Problem:
========
A single InnoDB purge worker thread can process undo logs from different
tables within the same batch. But get_purge_table(), open_purge_table()
incorrectly assumes that a 1:1 relationship between a purge worker thread
and a table within a single batch. Based on this wrong assumtion,
InnoDB attempts to reuse TABLE objects cached in thd->open_tables for
virtual column computation.

1) Purge worker opens Table A and caches the TABLE pointer in thd->open_tables.
2) Same purge worker moves to Table B in the same batch, get_purge_table()
retrieves the cached pointer for Table A instead of opening Table B.
3) Because innobase::open() is ignored for Table B, the virtual column
template is never initialized.
4) virtual column computation for Table B aborts the server

Solution:
========
- Introduced purge_table class which has the following
purge_table: Stores either TABLE* (for tables with indexed virtual
columns) or MDL_ticket* (for tables without) in a single union
using LSB as a flag.
For tables with indexed virtual columns: opens TABLE*, accesses
MDL_ticket* via TABLE->mdl_ticket
For tables without indexed virtual columns: stores only MDL_ticket*.

trx_purge_attach_undo_recs(): Coordinator opens both dict_table_t*
and TABLE* with proper MDL protection. Workers access cached
table pointers from purge_node_t->tables without opening
their own handles

purge_sys.coordinator_thd: Distinguish coordinator from workers
in cleanup logic. Skip innobase_reset_background_thd() for
coordinator thread to prevent premature table closure during
batch processing. Workers still call cleanup to release their
thread-local resources

trx_purge_close_tables():
Rewrite for purge coordinator thread
1) Close all dict_table_t* objects first
2) Call close_thread_tables() once for all TABLE* objects
3) Release MDL tickets last, after tables are closed

Added table->lock_mutex protection when reading (or) writing
vc_templ->mysql_table and mysql_table_query_id. Clear cached
TABLE* pointers before closing tables to prevent stale pointer
access

Declared open_purge_table() and close_thread_tables() in trx0purge.cc
Declared reset_thd() in row0purge.cc and dict0stats_bg.cc.
Removed innobase_reset_background_thd()
Alexey Botchkov
MDEV-39589 Wrong results with xmltype as a virtual column.

Store value in the XML column even if an error happened.
Sergei Golubchik
MDEV-39481 ASAN error on malformed WKB polygon
Thirunarayanan Balathandayuthapani
MDEV-28730 Remove internal parser usage from InnoDB FTS

InnoDB FTS performed all reads and DML on its auxiliary,
common and CONFIG tables through the InnoDB internal SQL
graph parser. Replace that path with direct B-tree access
via a new query-executor layer, and delete the parser-era
helpers.

row0query.h, row/row0query.cc - new QueryExecutor:
- General MVCC-aware record traversal and basic DML on the
clustered index. Sits on a btr_pcur and a transaction-owned
mtr; record processing goes through a RecordCallback that
bundles two std::functions:
  compare_record() returns SKIP / PROCESS / STOP for a record
  process_record() handles each PROCESS-ed (MVCC-visible) row

Public API:
  read()              scan a clustered index with a search key
  read_all()          full clustered scan (optional start tuple)
  read_by_index()    scan a secondary index, fetch the matching
                      clustered record, deliver it to the callback
  insert_record()    insert a tuple into the clustered index
  delete_record()    delete a row identified by tuple
  delete_all()        delete every row in the clustered index
  select_for_update() position+X-lock the matching clustered row
  update_record()    update the row select_for_update() locked,
                      falling back to optimistic/pessimistic and
                      external storage paths as needed
  replace_record()    upsert: select_for_update()+update_record(),
                      else insert_record()
  lock_table(), handle_wait(), commit_mtr()

fts0exec.h, fts/fts0exec.cc - new FTSQueryExecutor:
Thin wrapper over QueryExecutor specialised for FTS tables.
Opens and locks the required tables once and exposes typed
helpers keyed by table family.

Auxiliary INDEX_[1..6]:
  open_all_aux_tables()
  insert_aux_record(aux_index, fts_aux_data_t)
  delete_aux_record(aux_index, fts_aux_data_t)
  read_aux()        range scan from a given word
  read_from_range()  paginated read that absorbs
                    DB_FTS_EXCEED_RESULT_CACHE_LIMIT internally
                    and resumes from the last word seen

Common deletion tables (DELETED, DELETED_CACHE, BEING_DELETED,
                        BEING_DELETED_CACHE):
  open_all_deletion_tables()
  insert_common_record(), delete_common_record(),
  delete_all_common_records(), read_all_common()

CONFIG table (<key, value>):
  open_config_table() / set_config_table()
  insert_config_record(), update_config_record() (upsert),
  delete_config_record(), read_config_with_lock()

fts_aux_data_t carries the auxiliary row payload.
RecordCallback specialisations live alongside the executor:
  CommonTableReader collects doc_ids from common tables that
    share the <doc_id> schema.
  ConfigReader extracts <key, value> and provides
    compare_config_key() for fast key matching.
  AuxRecordReader scans auxiliary indexes with an
    AuxCompareMode (GREATER_EQUAL / GREATER / LIKE / EQUAL)
      driving the comparator; tracks the last word seen so a
      paginated scan can resume.

fts_query() walks index and common tables via
QueryExecutor::read_by_index() with RecordCallback;

fts_write_node() writes auxiliary rows through
FTSQueryExecutor::insert_aux_record() / delete_aux_record()
with fts_aux_data_t.

fts_optimize_write_word() now goes through the same
insert/delete path.

fts_select_index{,_by_range,_by_hash} return uint8_t (was
ulint) with a simpler control flow.

fts_optimize_table() binds a thd to its transaction whether
invoked from a user thread or the FTS optimize thread.

fts_optimize_t drops its fts_index_table and fts_common_table
fts_table_t fields; fts_query_t drops fts_common_table.

storage/innobase/fts/fts0sql.cc is deleted along with the
commented-out and unreferenced parser-era helpers it held.

dict_sys.latch is now acquired once per fts_sync_table(),
fts_optimize_table() and fts_query() call to open every
auxiliary and common table in one pass, instead of being
re-acquired per table.
Alexey Botchkov
MDEV-39589 Wrong results with xmltype as a virtual column.

Store value in the XML column even if an error happened.
Sergei Golubchik
MDEV-39498 mroonga_command() incorrect result length metadata
Monty
MDEV-39519 Change mariadb-dump to use SHOW REPLICA STATUS instead of SHOW SLAVE STATUS

Changes done to increase MySQL compatibility:
- Use SHOW REPLICA STATUS instead of SHOW SLAVE STATUS for retrieving
  slave status. If this fails with syntax error, retry with SHOW SLAVE
  STATUS.
- If SHOW MASTER FAILS, retry with MySQL 8.4 syntax SHOW BINARY LOG STATUS
- Add in MariaDB server SHOW BINARY LOG STATUS as an alias for
  SHOW MASTER STATUS.
Sergei Golubchik
MDEV-39498 more fixes

* use max_length=640
* also fix mroonga_highlight_html, mroonga_normalize, mroonga_snippet_html
* remove disable_cursor_protocol from all mroonga tests
Varun Deep Saini
MDEV-35548: Fix out-of-bounds array access in json_get_path_start

json_get_path_start() set p->last_step to p->steps - 1, creating a
pointer before the beginning of the steps[] array. This is undefined
behavior flagged by UBSAN as "index -1 out of bounds for type
json_path_step_t[32]".

Use NULL as the sentinel value instead, and check for NULL in
json_get_path_next() rather than comparing against p->steps.

Backport to 10.6 of commit 4f546897b87144f4219094c5a852d766d5a46b74.

Additional test case from Rucha Deodhar

Signed-off-by: Varun Deep Saini <[email protected]>
Signed-off-by: Varun Deep Saini <[email protected]>
Oleksandr Byelkin
new CC 3.3
Alessandro Vetere
MDEV-38814 Enable optimization by default
Alexey Botchkov
MDEV-39575 Protocol::end_statement(): Assertion `0' failed after insert into xmltype union of valid and invalid xml.

Field_xmltype::store has to do the my_error when it gets invalid XML,
  just the warning with the -1 return results in the DBUG_ASSERT.

Also the UpdateXML function result reverted back to the STRING as
it can legally produce invalid XML, so we can't have columns built
from the UpdateXML to be XMLTYPE.
Sergei Golubchik
MDEV-39413 wsrep unsafe handling of parameters

introduce safe() wrapper for parameters that can later be interpolated
into command line.
Use as

- var="foo$BAR"
+ var="foo$(safe BAR)"

A parameter is safe, if it contains no spaces, single quotes or backticks
Sergei Golubchik
zlib 1.3.2
Sergei Golubchik
MDEV-39540 crash due to narrowing cast in update_ref_and_keys()
Alexey Botchkov
MDEV-39573 Server crashes in Item_char_typecast::fix_length_and_dec_internal after select xmltype.

Charset specified for XMLTYPE constructor.
Error returned if XML is in UTF16/UTF32 as we can't parse it yet.
XML check added so only well-formed allowed.
Sergei Golubchik
MDEV-39516 s3 curl_easy_setopt requires long values otherwise compile failure

update submodule to compile on fc44
Oleksandr Byelkin
Merge branch '12.3' into 13.0
Sergei Golubchik
MDEV-39266 Stack Overflow via alloca() in Privilege Table JSON Parser