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.
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
Dave Gosselin
MDEV-39618:  Assertion failed

In run_fj_null_complement_pass, the FULL JOIN null complement pass
called ha_end_keyread() on the right table to switch from index access
before rescanning, but never restored keyread after it finished; so
do that.
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.
Alexey Botchkov
MDEV-39592 ALTER.. with xmltype silently overwrites row with prior rows data.

tests added.
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.
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.
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.
Monty
Removed compiler warnings about not used/set not used variables in groonga
Alexey Botchkov
MDEV-39589 Wrong results with xmltype as a virtual column.

Store value in the XML column even if an error happened.
Dave Gosselin
In end_send, grab the list of fields from the prior join_tab if available

Allocate the full_join_duplicate_filter with operator new.  Add a comment
to the assertion and condense a couple of conditionals together.
Monty
Fixed that max_session_mem_used.test works for valgrind builds
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.
Arcadiy Ivanov
fixup! 6e9ae08b7ad79885425652bc648f8fc56f7b1177

Fix 32-bit compile: use `sizeof(void*)` for blob pointer memcpy

`portable_sizeof_char_ptr` is always 8 (the record slot width), but
actual pointer size is 4 on 32-bit. The production code (`hp_hash.c`)
uses `HP_PTR_SIZE = sizeof(void*)` for memcpy of pointer values.
The test must do the same to avoid `-Werror=stringop-overflow`.
Alexey Botchkov
MDEV-39599 AddressSanitizer: heap-use-after-free in escape_string_for_mysql after sp with invalid xml (xmltype)).

Test case added.
Alexey Botchkov
MDEV-39589 Wrong results with xmltype as a virtual column.

Store value in the XML column even if an error happened.
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.
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]>
Arcadiy Ivanov
fixup! 07846d3ef329caca03d26e58e200f3f2d1e4f04b

Replace exact `Created_tmp_%` counts with ON/OFF checks in blob_big tests

Exact temp table counts vary between 32-bit and 64-bit platforms
because view protocol creates additional temp tables whose overflow
behavior depends on pointer size and internal structure sizes.

Replace `SHOW STATUS LIKE 'Created_tmp%'` with a query that reports
ON/OFF for `CREATED_TMP_TABLES` and `CREATED_TMP_DISK_TABLES`. This
preserves the key assertions (disk tables created vs not created)
while being platform-independent.
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-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
Arcadiy Ivanov
Use SHA256 integrity checks in blob_fallback test

Store SHA2(blob, 256) on insert and compare on retrieval instead of
direct string comparison. Use non-repeat blob patterns to make
corruption detection more meaningful.
Sergei Golubchik
MDEV-39266 Stack Overflow via alloca() in Privilege Table JSON Parser