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
Abdelrahman Hedia
MDEV-29803: Change mariadb-binlog --gtid-strict-mode default to OFF

The --gtid-strict-mode option in mariadb-binlog was introduced in MDEV-4989
with a default of ON. This causes mariadb-binlog to refuse to display
events when it encounters out-of-order GTIDs, which commonly happens
when replaying a remote binlog into a server and then reading back the
resulting local binlog files.

This is overly restrictive for a diagnostic/display tool. While the
server's gtid_strict_mode makes sense as a safety mechanism, applying
the same strict validation by default in the client tool prevents users
from even inspecting problematic binlog files.

Change the default to OFF so that mariadb-binlog processes binlog files
without erroring on out-of-order GTIDs by default. Users who want strict
validation can still explicitly pass --gtid-strict-mode.

Added regression test binlog.mdev_29803 that verifies:
- Default (OFF): reading binlog files with replayed events succeeds
- Explicit --gtid-strict-mode: still produces the expected error
ParadoxV5
uninitialized? ok.
Kristian Nielsen
MDEV-39779: binlog.binlog_gtid_index sporadic failure

The GTID index is written asynchronously from the binlog background thread,
the test would fail when trying to read the index file before the background
thread had time to write it.

Fix by making the test case wait for the file to reach the expected size
before accessing.

Signed-off-by: Kristian Nielsen <[email protected]>
Sergei Petrunia
WIP: Move "worker" part to pwt_manager_base2/pwt_worker_base2

"bool stop" and "reaped" are not moved yet.
Sergei Petrunia
Rename pwt_manager_base->pwt_thread_manager, pwt_worker_base->pwt_thread
Fariha Shaikh
MDEV-33660 Add note when setting AUTO_INCREMENT lower than next value

Currently, ALTER TABLE ... AUTO_INCREMENT = N silently fails when using
values lower than the next AUTO_INCREMENT value in the column.

Add a note when attempting to set AUTO_INCREMENT to a lower value than
the next AUTO_INCREMENT value, and maintain the higher value.

Update existing test suites and add a new test to the maria suite for
the newly added note.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
Daniel Black
MDEV-40921 Large allocations Use MMAP_NORESERVE (but not large_pages)

The default innodb_buffer_pool_size_max of 8TiB cannot be reserved on
Illumos because anonymous mappings reserve backing store (swap) when they
are created, irrespective of the page protections. Pass MAP_NORESERVE when
reserving the buffer pool address range; swap is still properly reserved,
and out-of-memory reported, when ranges are committed.

commit message by Andy Fiddaman.

On Linux MAP_NORESERVE has similar meaning in that no swap space is
reserved. In the Linux case per manual(mmap), mariadbd may SEGV if there
isn't the swap space available. This quick kill seems preferable to
attempting to run a buffer pool from swap.

Note MAP_NORESERVE isn't used for large pages as we want the allocation
failure to be early. Having failure on a first access here is
unrecoverable while an large page allocation failure can fall back to
a non-large page.

Place -1 ptr constant with MAP_FAILED. Its used elsewhere in code and
matches mmmap documentation.

Other BSDs and MacOS appear to not implement the flag.
Dave Gosselin
MDEV-39441: Add dbug_print() helpers for join-related types

Introduces new dbug_print() functions for the following types:
  dbug_print(NESTED_JOIN)
  dbug_print(JOIN)
  dbug_print(TABLE_LIST)
  dbug_print(JOIN_TAB)
  dbug_print(List<Item>)

Typically pointers to instances of the given types are passed.
The dbug_print(List<Item>) is intended to show result row before
sending to client (e.g., invoke in debugger while tracing end_send)
but may work in other contexts.

These functions produce nicely formatted output, please use them
in conjunction with the formatted printfs available in GDB or LLDB:
  (gdb) printf "%s", dbug_print(join_tab)
  (lldb) p printf("%s", dbug_print(table))

Example output from dbug_print(JOIN) in LLDB.  The last line with
value 1302 is the number of characters produced by the printf
command.

(lldb) p printf("%s",dbug_print(join))
JOIN [0x15801bfe8]  table_count=3  const_tables=0
join_list 0x158018340 [1 element(s)]:
--- #0 ---
  [0x15801af10] "(nest_last_join)"  join=INNER (outer_join=0)  nested_join=0x15801b618 (elements=2)
    NESTED_JOIN [0x15801b618]
      used_tables:    0x0
      not_null_tables: 0x0
      n_tables:        0
      counter:        0
      nest_type:      1 (JOIN_OP_NEST)
      nj_map:          0x0
      join_list:
        join_list 0x15801b618 [2 element(s)]:
        --- #0 ---
          [0x15801a308] "t3"  join=LEFT (outer_join=1)  map=0x4
            ON: `test`.`t2`.`a` = `test`.`t3`.`a`
        --- #1 ---
          [0x158019b30] "(nest_last_join)"  join=INNER (outer_join=0)  nested_join=0x15801a238 (elements=2)
            NESTED_JOIN [0x15801a238]
              used_tables:    0x0
              not_null_tables: 0x0
              n_tables:        0
              counter:        0
              nest_type:      0
              nj_map:          0x0
              join_list:
                join_list 0x15801a238 [2 element(s)]:
                --- #0 ---
                  [0x1580187c0] "t1"  join=RIGHT (outer_join=2)  map=0x1
                    ON: `test`.`t1`.`a` = `test`.`t2`.`a`
                --- #1 ---
                  [0x158018f08] "t2"  join=INNER (outer_join=0)  map=0x2
(int) 1302
Marko Mäkelä
fixup! c909702dfcd2261a73cd0ca6a6ce5703ddda411a
Rex Johnston
PQ:  allow workers to pre-aggregate SUM, COUNT, MIN, MAX for the manager
Marko Mäkelä
MDEV-40756 Incorrect multi-batch recovery of file size

file_name_t::page0_lsn: Keep track of the last applied
recv_sys_t::parse_page0() so that a multi-batch recovery
will not reset the file to a smaller size.

Reviewed by: Thirunarayanan Balathandayuthapani
Daniel Black
MDEV-40750 gcc-16.1.0 on ppc64 causes innodb to fail to compile

Assembler comes up with the error:
unrecognized opcode: `dcbstps'

dcbstps is a Power 10 instruction. The default target arch on most
platforms is Power 8 or 9.

Added the target power10 to the function pmem_phwsync. The execution
of this function is gated on the ISA 3.1 in pmem_persist_init so
there's no chance of a SIGILL.

clang supports this target as arch=pwr10 and gcc as cpu=power10.
Revert back to using opcodes for old versions.
sjaakola
MDEV-38869 sequence conflicts with streaming replication

Sequence access conflicts with streaming replication could cause the
server to hang, as shown in MDEV-38869.

A sequence table is written from SEQUENCE::next_value() while
SEQUENCE::mutex is held. For a streaming transaction the row write in
handler::ha_write_row() would then replicate a fragment and block waiting
for certification and commit order, while an applier may be waiting for
the same mutex in SEQUENCE::set_value(). Neither side can proceed, the
node deadlocks and the BF abort of the local transaction can never be
delivered.

This commit avoids the deadlock by skipping the streaming replication
step for sequence table rows. The row is already in the write set and is
replicated with the following fragment, or at commit.

Only that one step is skipped. The skip is passed down as a parameter to
wsrep_after_row() and wsrep_after_row_internal() rather than by not
calling them at all, so the row is still counted against
wsrep_max_ws_rows and wsrep_check_pk() still runs. A transaction using
sequences heavily therefore cannot silently exceed the configured write
set row limit.

The commit has also a new mtr test for three sequence/SR conflict
scenarios: galera.galera_sequences_bf_kill_sr

- a streaming transaction and an applier competing for SEQUENCE::mutex,
  where both are expected to commit

- the same, but with the applier also BF aborting the local transaction
  over a gap lock. A streaming transaction cannot be replayed, so it is
  rolled back and the client gets ER_LOCK_DEADLOCK. The applier is held
  at the abort_trx_end sync point until the abort has been issued, so
  that the local transaction cannot finish its fragment first

- twelve row inserts on both nodes with wsrep_trx_fragment_unit=rows, so
  that each node reserves several sequence cache ranges and the sequence
  table writes land inside fragments carrying several rows. The values
  the two nodes hand out must not overlap
Kristian Nielsen
MDEV-40575: Sporadic failure of rpl.rpl_gtid_crash

The test fails because the slave is configured in the test with the flaky
--init-rpl-role=slave option by default. As the test case is crashing the
slave at various points, this option occasionally causes the slave to
*truncate* away a transaction during crash recovery, which is surely not
intended for this test.

The use of init-rpl-role=slave by default goes back to 2007(!), when this
option did not have any functionality, and when the option was re-purposed
for the flaky truncate-binlog-at-recovery functionality this default was
overlooked and not removed. The tests that want to test this marginal
functionality should (and do) enable it explicitly.

So remove the use of init-rpl-role=slave by default in the mtr --suite=rpl.

Signed-off-by: Kristian Nielsen <[email protected]>
Akshat Nehra
MDEV-40867 CONNECT writes unvalidated data from remote filter into fixed-len buffer

TestFil() in storage/connect/tabtbl.cpp uses unbounded sscanf
format specifiers to parse TABID filter values pushed from
ha_connect::CheckCond(). When a WHERE tabname='...' filter
exceeds NAME_LEN bytes (192), sscanf overflows the
stack-allocated tn[NAME_LEN] buffer, corrupting the stack
and crashing mysqld with SIGSEGV.

Fix: add width specifiers to bound all sscanf writes:
- %7s for op[8]
- %192[^'] for tn (NAME_LEN bytes + null terminator)

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
Yuchen Pei
MDEV-40805 Do not call lock_rec_convert_impl_to_expl if a table S-lock is held

lock_clust_rec_read_check_and_lock() skipped the implicit-to-explicit
conversion only under a table LOCK_X. When a table LOCK_S is held the
conversion is equally pointless: no other transaction can hold an
implicit X-lock on the record, because modifying a row requires a
table LOCK_IX and LOCK_IX is incompatible with our LOCK_S.
lock_table_has() matches stronger modes, so testing LOCK_S subsumes
the old LOCK_X test.
Kristian Nielsen
MDEV-39774: Assertion on slave with binlog_row_image=MINIMAL

When finding the row to modify for a row event, and when not using
rnd_pos_by_record() to locate the row, the code would use
table->use_all_columns(), which makes the read_set and write_set point
to the table->s->all_set in the table share. This caused problems when
other code later modified bits in the read_set or write_set, which
ends up wrongly modifying the table share.

We can just use bitmap_set_all(table->read_set) to mark to read all
columns and leave the possibility to later change the bits as needed.

This code changes in this patch must be null-merged from 10.11 to
11.4, as there the problem is fixed differently.

Signed-off-by: Kristian Nielsen <[email protected]>
Sergei Golubchik
bug: incorrect plugin retry on COM_CHANGE_USER

as soon as the server sends any packet, plugin should not
work in mysql_change_user mode anymore, and should use the data
that the server sends, not the old mysql->scramble_buf
sjaakola
MDEV_38952 Improve galera_sequences family of tests

This commit fixes a sporadic failure with the test case 1,
where recorded result depends on node 1 applying node 2's replicated
sequence update before it resumes its already-open transaction:

- Node 2 SELECT NEXTVAL(s) writes reserved_until=21 and replicates it.
- On node 1 that lands in Rows_log_event::update_sequence()
  Since 21 > next_free_value (9), adjust_values(21) discards node 1's  still-cached value 9.

  Nothing enforced that ordering: node 1's INSERTs run inside BEGIN, and sync wait does not happen mid-transaction.

The fix is to use selarate session, node_1_ctrl, to wait until node 1 has applied the update, before node 1 resumes its transaction
ParadoxV5
Huh, IO Thread started does not necessarily mean Binlog Dump Thread started.
Kristian Nielsen
MDEV-40575: Sporadic failure of rpl.rpl_gtid_crash

The test fails because the slave is configured in the test with the flaky
--init-rpl-role=slave option by default. As the test case is crashing the
slave at various points, this option occasionally causes the slave to
*truncate* away a transaction during crash recovery, which is surely not
intended for this test.

The use of init-rpl-role=slave by default goes back to 2007(!), when this
option did not have any functionality, and when the option was re-purposed
for the flaky truncate-binlog-at-recovery functionality this default was
overlooked and not removed. The tests that want to test this marginal
functionality should (and do) enable it explicitly.

So remove the use of init-rpl-role=slave by default in the mtr --suite=rpl.

Signed-off-by: Kristian Nielsen <[email protected]>
Marko Mäkelä
MDEV-40728 Recovery wrongly fails if FILE_CREATE is followed by FILE_RENAME

deferred_spaces.deferred_dblwr(): Skip newly created tablespaces
to avoid a bogus invocation of fil_space_free().

fil_name_process(): Simplify the logic. If no matching tablespace is
found but file_name_t::create_lsn had been set in response to parsing
a FILE_CREATE record, try to apply FILE_RENAME to deferred_spaces.

log_parse_file(): Parse each FILE_ record only once. In multi-batch
recovery, there may be redundant calls that would break the logic of
fil_name_process().
sjaakola
MDEV-40903 galera.MDEV-38260 fails with ER_BINLOG_IN_USE on RESET MASTER

The test fails from 12.3 onwards on the final cleanup step:

mysqltest: At line 98: query 'reset master' failed: ER_BINLOG_IN_USE
(4243): Cannot execute RESET MASTER as the binlog is in use by a
connected slave or other RESET MASTER or binlog reader.

The binlog-in-engine work added a use-count guard around RESET MASTER
in MYSQL_BIN_LOG::reset_logs(): every binlog reader, a slave dump thread
included, registers itself through start_use_binlog(), and RESET MASTER
now refuses with ER_BINLOG_IN_USE while the count is non-zero. Earlier
versions reset the binlog even with a slave still attached, which is why
the test passes on 11.8 and older.

The test's cleanup stops the async slave on node_2 and then immediately
runs RESET MASTER on the master node_3. The dump thread on node_3 does
not disappear at STOP SLAVE; it lingers until it next notices the closed
connection, so it is often still registered when RESET MASTER arrives.

Fix here is to use include/reset_master.inc, which terminates dump
threads and retries on ER_BINLOG_IN_USE.
Kristian Nielsen
Merge 10.11 -> 11.4
sjaakola
MDEV-36677 rsync sst fails with different innodb_log_group_home_dir and datadir

Backported the fix done by Pekka Lampio for mariaDB 11.4 in PR
https://github.com/mariadb-corporation/codership-mariadb-server/pull/543

The PR has a fix for wsrep_sst_rsync script and new mtr test:
galera_3nodes.galera_mdev_36677" to check that the rsync SST method of Galera
works correctly also when the joiner node store InnoDB log files in a dedicated
directory separate from the data dictionary

Note: merging this PR to 11.4 may not be fully functional as there are other
changes in the rsync SST script. Take a look at the original 11.4 PR when merging.
Daniel Black
MDEV-37224 Remove UBSAN limitation from MTR tests

Having a not_ubsan.inc as a test case exclusion mechanism is
allowing developers to ignore UBSAN issues. As undefined behaviour
detected at runtime or compile time isn't acceptable in the
code base, remove the exclusion.

The lotofstack test, the only user of not_ubsan.inc, has this
exclusion because the stack size under UBSAN lacks predictability.

Adjust its exclusion because of this criteria, and not its UBSAN
status.

Reviewer: Jimmy Hu <[email protected]>
Alexey Yurchenko
Merge branch '10.11' into MDEV-38147-missing-result-file
Brandon Nesterenko
MDEV-40823: rpl.rpl_queue_event_length_mismatch 'row' fails: Error condition reached in include/wait_for_slave_param.inc

rpl.rpl_queue_event_length_mismatch can sporadically fail at the start
of the second test case, when starting the slave in an expectedly valid
state. This is because the previous test case (1) could not properly
finish cleaning up before it was torn down by the second test case. That
is, the previous test case corrupts a rotate event and ensures the
master catches and errors properly on this corruption. To clean up, test
case 1 resets the debug_dbug state of the master's binlog_dump_thread,
so it can re-send the rotate event that it had previously corrupted.
The test case never actually ensures this rotate event made it to the
slave though. The second test case also arms the binlog_dump_thread to
corrupt a rotate event (but in a different way). If the second test case
stopped the slave before the slave was able to retrieve this corrected
event; the next time the binlog dump thread would start (from test case
2), it would start with a debug_dbug state that would again corrupt this
rotate event (that otherwise should make it problem-free to the slave).
The corrupted rotate event from test case 2 is only meant to apply to
the rotate event *after* FLUSH LOGS.

To fix this, test cases 1 and 2 now end by waiting for the IO thread to
reach the master's position

Signed-off-by: Brandon Nesterenko <[email protected]>
Sergei Petrunia
Rename pwt_worker_base2->pwt_worker_base, pwt_manager_base2->pwt_manager_base
Oleksandr Byelkin
Merge branch '10.11' into mariadb-10.11.19
ParadoxV5
MDEV-32947 Async conflicts with semi-sync in multi-source

`@@rpl_semi_sync_slave_enabled` can be changed without stopping
replication, because it takes effect when a connection is established.
But when it takes effect, it applies to *all* replication connections.
This means that starting an async connection will switch any ongoing
semi-sync connections to async as well, and vice versa, which will
cause those connections to fail to replicate in the wrong mode.

This fix resolves this oversight by changing the value application
to specific to only the establishing connection (technically,
moving the singleton’s field `Repl_semi_sync_slave::m_slave_enabled`
to the instance variable `Master_info::semi_sync_enabled`).
Note, `Master_info::semi_sync_reply_enabled` must remain separate,
because it only disables ACK replying in async slave fallback,
whereas the semi-sync slave setting also controls whether the IO
thread should expect additional semi-sync flags in event packets.

Consequently, rather than leaving the status variable
`Rpl_semi_sync_slave_status` ambiguous, this commit refines it to show
`@@default_master_connection`’s status, matching `Slave_running` & co..
These designs build toward MDEV-40941,
which proposes migrating `@@rpl_semi_sync_slave_enabled`
to a proper per-connection configuration.
Vladislav Vaintroub
Rocksdb - suppress MSVC warning in external code

ribbon_impl.h(879,1): warning C4723: potential divide by 0
on VS2025
Alexey Yurchenko
MDEV-38147 add missing result file for MDEV-38147_gtid_off test
Mohammad Tafzeel Shams
MDEV-39795: Assertion `n_reserved > 0' failed

Problem:
========

1. Assertion `n_reserved > 0` failed in fseg_create():

fsp_reserve_free_extents() has a special condition for small
tablespaces where it reserves individual pages instead of full
extents. In such cases, n_reserved can be 0 even when the
reservation succeeds, causing the assertion ut_ad(n_reserved > 0)
to fail incorrectly.

The code was checking n_reserved to determine whether a reservation
had already been attempted, but this logic breaks for small
tablespaces where pages, rather than extents, are reserved.

2. Encryption metadata not cleared for compressed-only pages:

buf_page_encrypt() only cleared encryption-related metadata
fields (key-version and crypt-checksum) when the page was
neither encrypted nor compressed. However, these fields should
also be cleared when page_compressed is true but encrypted is
false, to avoid leaving stale encryption metadata in
compressed-only pages.

Solution:
=========

buf_page_encrypt(): Refactored the early-return logic. Encryption
metadata fields are now cleared whenever encrypted is false,
regardless of page_compressed. The function returns early only
when both !encrypted and !page_compressed.

fseg_create(): Reintroduced a boolean variable `reserved` to track
whether fsp_reserve_free_extents() has been attempted (removed as
part of MDEV-38419 | c7313da), replacing assertion `n_reserved > 0`.
Added an early return when DB_DECRYPTION_FAILED is encountered
during inode allocation.

my_error_innodb(): Added handling for DB_DECRYPTION_FAILED to
report decryption errors to the user through ER_GET_ERRMSG.
Rex Johnston
PQ:  allow workers to pre-aggregate SUM, COUNT, MIN, MAX for the manager