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
mariadb-PranavTiwari
MDEV-41137 CHARACTER SET ANY_CS and CHARSET OF in stored routines

Allow CHARACTER SET ANY_CS for string parameters, and CHARSET OF var
(var%CHARSET in ORACLE mode) for parameters, variables and return types.
xnervwang
MDEV-41651 mariadb_dyncol_list_named() leaks the result array when a column name cannot be read

Same fix as Connector/C CONC-864.

Co-authored-by: Georg Richter <[email protected]>
forkfun
MDEV-41935 STR_TO_DATE returns NULL only when en_US locale is omitted under utf8mb4_bin

STR_TO_DATE() with month or day names (%M %b %W %a) and no locale
argument returned NULL with warning 1411 when the value had a
case-sensitive collation: utf8mb4_bin, *_cs, turkish_ci or VARBINARY.
Names are now compared in utf8mb4_general_ci whatever the collation of
the value, as in TO_DATE().

Since MDEV-26112, opening a table created before 12.3.2 failed with
error 1901 if a CHECK constraint, a STORED column or an indexed
VIRTUAL column used a two-argument STR_TO_DATE(). Names in these
tables are read as English: 'en_US' is added as the third argument,
SHOW CREATE TABLE shows it, and CHECK and REPAIR TABLE keep it.
A two-argument STR_TO_DATE() is allowed again in such columns if its
format has no names.

Also:
- name matching: the longest name wins, a complete name needs no word
  boundary after it ('01Jan2026'), and standalone and formatting month
  names are tried together (fi_FI 'marraskuuta'); an ambiguous prefix
  gives NULL (fi_FI 'Mar', pl_PL 'S'), and English does not decide it
- English names are accepted in the session locale, as before
  MDEV-26112; not with an explicit locale, nor in TO_DATE()
- no SIGSEGV for a utf16/utf32 value with a binary format
- a prepared statement no longer keeps the locale of a previous run
- the locale argument is left out of collation aggregation
- a utf8mb4 or binary value is no longer copied per row
- fa_AF had the locale number 125 of uz_Latn_UZ; now 130, also in
  INFORMATION_SCHEMA.LOCALES
- the sql_mode dependency of STR_TO_DATE() in generated columns is
  MDEV-42461

Assisted-By: Claude:claude-opus-5-5
Teemu Ollakka
MDEV-42510 Galera: tests for commits under BACKUP STAGE BLOCK_COMMIT

mariabackup copies the Aria log at BACKUP STAGE BLOCK_COMMIT and
expects no more Aria commits. On a Galera node, ha_commit_trans() does
not take MDL_BACKUP_COMMIT for wsrep threads. Local writes to
TRANSACTIONAL=1 Aria tables, and TOI such as GRANT, then commit during
BLOCK_COMMIT, and the backup or the SST joiner gets a corrupt Aria
table.

The tests hold the backup stages and check which writes commit. The
result files contain the correct outcomes. The tests fail until the
bug is fixed.

- galera_backup_block_commit_aria: local Aria DML, local GRANT and
  applied GRANT at BLOCK_COMMIT.
- galera_sst_mariabackup_block_commit_aria: local Aria DML and local
  GRANT on a mariabackup SST donor held at BLOCK_COMMIT.
- galera_backup_lock_matrix: each kind of write at each backup stage
  and at FTWRL.
- galera_backup_lock_window: each kind of write held at a sync point
  while node 1 takes the backup locks.
- galera_3nodes.galera_sst_mariabackup_backup_lock_matrix: each kind
  of write on a mariabackup SST donor held at each backup stage.

All tests run with combinations bf (wsrep_mode=BF_ABORT_MARIABACKUP)
and default.

A write that commits while the lock must block it prints a line that
starts with "BUG:". galera_backup_lock_bug.inc has the rules: FLUSH
and BLOCK_DDL block writes to non-transactional tables, BLOCK_DDL
blocks DDL, BLOCK_COMMIT blocks commits (InnoDB commits are not
checked), FTWRL blocks all writes. Rounds that deadlock or fail an
assertion are not run, and print a "BUG:" line. The next commit has
tests for these bugs.

On 10.11 (debug build), all five tests fail in both combinations. The
"BUG:" lines show local Aria DML that commits during BLOCK_COMMIT, and
on the SST donor also GRANT and TOI Aria DML. Without
BF_ABORT_MARIABACKUP, applied writes to non-transactional tables
commit during FLUSH, and on the SST donor DDL commits during
BLOCK_DDL.

Assisted-by: Claude:claude-opus-5-5
Maximilian Krög
MDEV-41836 Wrong result for indexed column = constant with fractional part

With ref access on an index, test_if_ref() removed the condition
"field = const" if storing the constant into the key field succeeded.
But some Field::store() methods round or truncate the value without
reporting an error, e.g. 46.5 stored into an INT column becomes 47.
The ref lookup then found rows with the rounded value, and the WHERE
check that would reject them had been removed.

Affected are integer, DECIMAL, DATETIME and TIME columns compared with
constants that have more precision than the column, e.g.
  int_col = 46.5, int_col = '46.5', dec_col_5_1 = 1.25,
  datetime_col = '2001-01-01 10:00:00.5'

Fix: remove the condition only if the stored value compares equal to
the constant (stored_field_cmp_to_item(), as the range optimizer does).
Integer constants stored into integer fields without an error are
exact, so the extra check is skipped for them. Notes and warnings from
the comparison are suppressed.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Vladislav Vaintroub
merge 10.11 to 11.4
Vladislav Vaintroub
MDEV-42338 follow-up: fix build with OpenSSL 4.1.0 and clang

Update libmariadb to a version that treats OpenSSL headers as system
headers and keeps OPENSSL_API_COMPAT at 1.1.0 in openssl.c.

The mysql and mysqltest clients don't use anything from violite.h, which
was their only source of OpenSSL headers. Remove the include and the
OpenSSL include directory from client/CMakeLists.txt, so no OpenSSL
header is compiled in these clients as a regular include.

mysql.cc got <sys/ioctl.h> from violite.h (through my_net.h) for
window_resize(); include it directly.

Assisted-by: Claude:claude-sonnet-5-5
Marko Mäkelä
Merge 13.2 into main
Kristian Nielsen
MDEV-41658 fix Galera node crash when a parallel slave worker is bf_killed

A parallel-replication worker would assert in ha_rollback_trans() because
wsrep_after_statement() and ha_commit_trans()'s wsrep error path could
roll back its transaction before retry_event_group() unmarks it as
committing.

Skip mark_start_commit() when using Galera. Galera certification can cause
rollback of parallel replication transactions during commit when there is a
conflicting transaction outside of replication. This can cause to start the
next GCO too early, while the previous GCO still needs to rollback and
retry.

Do not fail replication with an error when wsrep_after_statement() fails due
to a retryable error like brute-force kill.

Signed-off-by: Kristian Nielsen <[email protected]>
Jan Lindström
MDEV-41658 follow-up: map all wsrep errors, fix after_statement ordering

rpt_handle_event() now calls wsrep_after_statement() unconditionally,
so the provider handle and commit-order slot are released even when
apply_event_and_update_pos_for_parallel() already failed. Its own
failure maps through wsrep_override_error()/wsrep_current_error(),
covering every wsrep::client_error code instead of only
e_deadlock_error and e_interrupted_error, so has_temporary_error() can
recognise any resulting retryable error. Log severity for the
genuinely unexpected failure case reverts to WSREP_WARN.

The duplicated mark_start_commit() guard in retry_event_group() and
handle_rpl_parallel_thread() is factored into one
mark_start_commit_unless_wsrep() helper.

galera_parallel_slave_rollback.cnf drops the redundant
binlog-format=row, already set by the included
galera_2nodes_as_slave.cnf.

Assisted-by: Claude:claude-4.6-sonnet
Elena Stepanova
MDEV-42200 main.mysqlbinlog_stmt_compressed depends on previous tests

The test ran mysqlbinlog on the current binlog file from the start,
and if that file still held the previous test's events, it would
cause a mismatch. Additionally, thread_id value depended on the
chain of tests.

The part for thread_id is taken from 11.8, to preserve consistency.

Assisted-by: Claude:claude-sonnet-5-5
Reviewed-by: Kristian Nielsen
Marko Mäkelä
Merge 10.11 into 11.4
Elena Stepanova
MDEV-42237 rpl.rpl_read_old_relay_log_info fails on Windows (Linux-style path)

rpl.rpl_read_old_relay_log_info fails because the test overrides
relay-log.info with the Linux-style ./slave-relay-bin.000001,
while Windows uses the format with backslashes, .\slave-relay-bin.000001.
The patch modifies the file contents using a perl block, which keeps
the relay log name intact and only replaces the position. Thus the name
remains valid for whatever system the test is run on.

Assisted-by: Claude:claude-opus-5-5
Reviewed-by: Susil Behera
Samarth Deshpande
MDEV-21780 event_scheduler system variable's usage message doesn't mention the possible value "ORIGINAL"

ORIGINAL resets the event scheduler to the state the server was
started with, which is different from DEFAULT (always OFF). Add it
to the usage message of event_scheduler and re-record the results
that print it.
mariadb-PranavTiwari
MDEV-41151 SF erroneously caches an anchored return data type

Do not keep the result field of a stored function between
statements; create it again on each fix. Reset max_length in
cleanup() so a stale value is not passed on the next EXECUTE.

Reverts the caching added by MDEV-26115, safe after MDEV-37563.

The arena switch around init_result_field() is no longer needed.
The result field needed for one execution only and is allocated on
the current mem_root.
Hemant Dangi
MDEV-42446: Galera test failure on galera_sst_mariabackup_plugin_dir

Issue:
MDEV-41158 made the joiner require a per-transfer auth secret
unconditionally. This test (MDEV-42091) forges the SST wire protocol
by hand and predates that change, so the joiner now rejects its
payload with "Donor does not know my secret!" before mariadb-backup
--prepare ever runs.

Solution:
This test is about plugin_dir trust, not donor auth, so tell the
joiner to skip the secret requirement instead of forging that
unrelated protocol too, via sst-mariabackup-allow-unauthenticated-donor.
Elena Stepanova
MDEV-42228 MTR tests fail with "File already exist" for .expect files on Windows

On Windows mtr workers are threads of one process, so a handle opened
while reading the .expect file could be inherited by a server spawned
at the same time by another worker. That kept the file from being
deleted for the lifetime of that server, and the next --write_file of
the .expect file failed with "File already exist".

Read the .expect file under the spawn lock.

Assisted-by: Claude:claude-opus-5-5
Reviewed-by: Vladislav Vaintroub
Vladislav Vaintroub
update C/C
Vladislav Vaintroub
update C/C
Vladislav Vaintroub
Fix 11.8 build with system PCRE2 on FreeBSD

import_util linked the bare pcre2-posix/pcre2-8 libraries and got no
include directory, so pcre2posix.h was not found.
Elena Stepanova
MDEV-42202 perfschema.relaylog fails when run after other replication tests

The test checks file I/O instrumentation accumulated since server
startup, so it relied on getting freshly started servers. With
duplicate options removed, mtr may now reuse servers left by
a previous replication test, and the test sees binary/relay log
files and statistics from it.

Restart both servers at the beginning of the test, removing
binary and relay logs while the servers are down. RESET MASTER
and RESET SLAVE are not sufficient, as performance schema keeps
instances of files deleted by them, and a restart opens a new
binary log anyway.

Assisted-by: Claude:claude-opus-5-5
Reviewed-by: Susil Behera
Elena Stepanova
MDEV-42198 Options from MTR opt files are added multiple times

Options from .opt files of included files were appended every time
the file was sourced, so they got repeated once per include path.
It caused unnecessary server restarts, and too long server command
lines lead to startup failures on Windows.

Now each file caches only its own .opt options plus an ordered list
of the files (itself and everything it sources) whose options apply,
each file listed once. The test's options are assembled from that list.
Options of included files still precede those of the including file.
If a file is sourced several times, its options are applied at the
place of its last inclusion, so the effective option values stay
the same as before, and a test can still source a file again to
override options set by files sourced in between.

Assisted-by: Claude:claude-opus-5-5
Reviewed-by: Alice Sherepa
Elena Stepanova
MDEV-42238 rpl.rpl_row_mysqlbinlog fails on Windows (charset problem)

rpl.rpl_row_mysqlbinlog fails because apparently the client command
line on Windows cannot interpret the literal cp932 string which is
passed to it. Since the point of the test is not how the original
INSERT happens, but how it further works while replaying the binlog,
it should be acceptable to insert a hex-encoded value

Reviewed-by: Susil Behera
Vladislav Vaintroub
MDEV-42338 Treat system library headers as SYSTEM includes

Mark include directories for system OpenSSL and system pcre2 as SYSTEM
so that warnings from their headers are not promoted to errors under
-Werror. Bundled library headers are left as regular includes.

System zlib already gets SYSTEM treatment because ZLIB::ZLIB is an
IMPORTED target (CMake marks imported target includes as SYSTEM by
default).

Assisted-by: Claude:claude-opus-4-6
mariadb-PranavTiwari
MDEV-41137 CHARACTER SET ANY_CS and CHARSET OF in stored routines

Allow CHARACTER SET ANY_CS for string parameters, and CHARSET OF var
(var%CHARSET in ORACLE mode) for parameters, variables and return types.
Teemu Ollakka
MDEV-42510 Galera: tests for deadlocks and DDL under backup locks

Bugs found while testing MDEV-42510. The result files contain the
correct outcomes. Each faulty outcome prints a line that starts with
"BUG:", so the tests fail while the bugs exist.

A. galera_ftwrl_bf_deadlock: with wsrep_mode=BF_ABORT_MARIABACKUP,
  FLUSH TABLES WITH READ LOCK takes its backup lock, then pauses the
  provider. The pause waits for a write that is in the provider order
  and has not taken its backup lock yet. The write waits for the
  backup lock: in this mode MDL_lock::can_grant_lock() does not grant
  it to TOI and appliers. Writes: applied InnoDB DML, local ALTER
  TABLE, local GRANT.
B. galera_backup_block_commit_bf_deadlock: the same deadlock with
  BACKUP STAGE BLOCK_COMMIT, which also takes its lock before it
  pauses the provider in this mode. Writes that wait for a backup
  lock that BLOCK_COMMIT blocks: local and applied ALTER TABLE,
  applied REPLICATE_MYISAM INSERT.
C. galera_sst_mariabackup_donor_ddl: without BF_ABORT_MARIABACKUP, a
  mariabackup SST donor does not pause the provider, and
  can_grant_lock() grants every backup lock to TOI. On the donor, a
  local ALTER TABLE commits during BLOCK_DDL, a local GRANT commits
  during BLOCK_COMMIT, and a local ALTER TABLE during BLOCK_COMMIT
  fails the assertion backup_stage <= BACKUP_WAIT_FOR_FLUSH in
  backup_log_ddl().
D. galera_backup_unlock_resume: UNLOCK TABLES after FTWRL, and BACKUP
  STAGE END, release the backup lock before they resume the provider.
  A TOI write that waits for the backup lock then fails with
  ER_UNKNOWN_COM_ERROR: "Replication paused on node for FTWRL/BACKUP
  STAGE". New debug sync points
  wsrep_unlock_global_read_lock_before_resume and
  wsrep_backup_stage_before_resume_and_resync hold the statement
  between the release and the resume.

Only a kill of the node ends the deadlocks in A and B.
galera_backup_lock_deadlock.inc kills node 1 and starts it again.
galera_restart_default.inc then restarts both nodes with the options
of the test.

On 10.11 (debug build), all four tests fail with "BUG:" lines.

Assisted-by: Claude:claude-opus-5-5
Yuchen Pei
MDEV-25848 [wip] Index scalars and nested arrays like MEMBER OF does

MEMBER OF is JSON_CONTAINS(js, JSON_QUOTE(value)), which treats a
scalar document as a 1-element array and looks into nested arrays.
The array index only indexed the top-level elements of a top-level
array, and returned an ignorable error otherwise, so INSERT IGNORE
could store a row that MEMBER OF matches but the index does not.

Index every scalar of the document at any array depth, a scalar
document as one entry, and skip objects, which never match a scalar.
SQL NULL is not an error any more either: it has no entries.

This closes finding #5.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Rabari9999
MDEV-42357 Slave fails to uncompress small compressed row events

row_log_event_uncompress() rejected a compressed row event when its
column count was larger than the event length in bytes ("width >
src_len"). The two are different units: the column bitmap takes only
(width + 7) / 8 bytes, so a valid event of a wide table can be shorter
than its column count, for example a mostly-zero row of a 100-column
table compresses to about 70 bytes. The slave IO thread then stopped
with "Uncompress the compressed binlog failed" (error 1595). The check
was added by MDEV-41732. mysqlbinlog was not affected, as it passes
UINT_MAX32 as src_len.

Compare the width with the bits available in the rest of the event
instead. That rejects only widths whose bitmap cannot fit, which the
bm_size checks that follow would reject as well, and it still keeps
(width + 7) / 8 and 2*bm_size from overflowing.

Analysis and test case by the reporter of MDEV-42357.
Jan Lindström
MDEV-41658 follow-up: fix unreachable retry-detection branch

rpt_handle_event() read thd->wsrep_trx().state() right after
wsrep_after_statement(thd) returned, looking for s_must_abort or
s_cert_failed to decide whether to map the wsrep error onto a
retryable MariaDB error. wsrep::transaction::after_statement()
(wsrep-lib) never returns with the transaction in either of those two
states - its own exit assertion only allows s_executing, s_prepared,
s_committed, s_aborted or s_must_replay - so the check always took the
plain-warning branch and the error mapping never ran.

wsrep_after_statement(thd) returning true already means the wsrep side
recorded a retryable error (a BF abort or certification failure
resolved during the call), and wsrep::transaction::cleanup() has by
then cleared the transaction's own bf_aborted()/active()/id_, so there
is nothing further to learn from the transaction state afterwards. The
mapping is now attempted directly from that signal, falling back to
the warning only when there is neither a MariaDB error already set nor
a wsrep error left to map.

Also notes, where mark_start_commit_unless_wsrep() skips marking a
Galera worker's commit as startable early, the throughput trade-off
this makes against a non-Galera worker.

Assisted-by: Claude:claude-4.6-sonnet
Marko Mäkelä
Merge 11.8 into 12.3
mariadb-PranavTiwari
MDEV-41137 CHARACTER SET ANY_CS and CHARSET OF in stored routines

Allow CHARACTER SET ANY_CS for string parameters, and CHARSET OF var
(var%CHARSET in ORACLE mode) for parameters, variables and return types.
Marko Mäkelä
Merge 12.3 into 13.2
Vladislav Vaintroub
merge 10.11 to 11.4

# Conflicts:
# storage/connect/CMakeLists.txt
# storage/rocksdb/mysql-test/rocksdb/t/mariadb_port_fixes.test
Vladislav Vaintroub
Fix 11.8 build with system PCRE2 on FreeBSD

import_util linked the bare pcre2-posix/pcre2-8 libraries and got no
include directory, so pcre2posix.h was not found.
Elena Stepanova
MDEV-42236 rpl.rpl_change_master_long_channel_name fails on Windows (too long path)

rpl.rpl_change_master_long_channel_name fails on Windows because it
expects a 252-character name (base name, excluding the path) to be
valid; on Windows the whole path is limited to 260 characters, so
a 252-character name makes it too long. The patch disables the test
for Windows.

Reviewed-by: Susil Behera
Vladislav Vaintroub
MDEV-37996 CMake: MariaDB:: targets for bundled-or-system libraries

Stop overwriting the standard find_package() result variables (ZLIB_FOUND,
ZLIB_LIBRARIES, ZLIB_INCLUDE_DIR(S), ...), this breaks vcpkg.

Provide namespaced INTERFACE targets that point at either the bundled or
the system library and carry their include directories (and, for SSL, the
compile definitions)

  MariaDB::zlib, MariaDB::OpenSSL, MariaDB::pcre2-8, MariaDB::pcre2-posix,
  MariaDB::fmt, MariaDB::readline

Link these consistently instead of the scattered ${*_LIBRARIES} and
${*_INCLUDE_DIR(S)} variables sprinkled across the tree.

Bundled pcre2-posix depends on pcre2-8 so the static link order is correct
for consumers that link only posix.

wolfssl carries its own usage requirements (HAVE_WOLFSSL,
WOLFSSL_USER_SETTINGS); MariaDB::OpenSSL keeps only HAVE_OPENSSL.

Update libmariadb to 3.3 (47a31a98): handles MariaDB::zlib as a submodule.
Vladislav Vaintroub
merge 11.4 to 11.8

# Conflicts:
# extra/CMakeLists.txt
# extra/wolfssl/CMakeLists.txt
sjaakola
MDEV-42420 Use two applier threads in tests that pause the applier

Galera periodically delivers a COMMIT_CUT action. It has only a local
seqno and must pass the local monitor in an applier thread. Tests that
paused the only applier of a node, and then waited for a local
transaction on that node to certify or reach a later sync point, could
hang until timeout when a COMMIT_CUT was ordered before the local
transaction. These hangs are sporadic because a COMMIT_CUT comes only
about every 128 transactions.

Fix the affected tests in the same way as galera_sr.mysql-wsrep#215:
set wsrep_slave_threads = 2 on the paused node for the duration of the
test, so the second applier can process the COMMIT_CUT. At the end,
restore the original value and run a DDL from the other node. The
extra applier exits only after it applies a writeset, and that DDL
brings the applier count back down before the next test.

Fixed tests:
  galera.MDEV-29512
  galera.galera_MDEV-29512
  galera.MW-292
  galera.galera_as_slave_replay
  galera.galera_ddl_fk_conflict
  galera.galera_insert_bulk
  galera.galera_savepoint_replay
  galera.galera_sequences_bf_kill
  galera.galera_sequences_bf_kill_sr
  galera.galera_slave_replay
  galera.galera_sp_bf_abort
  galera.galera_transaction_replay
  galera.mysql-wsrep-bugs-607
  galera_sr.MDEV-25717
  galera_sr.galera_sr_bf_abort

In galera.MW-292, also replace the 3 second sleep and the
TIMEDIFF(SYSDATE(), NOW()) < 2 check with two consecutive NOW(6)
reads. A stuck timestamp returns the same value in both, so the test
no longer needs to wait.

Assisted By: Claude Opus 5.5
Vihaan Jain
MDEV-41927 MASTER_DEMOTE_TO_SLAVE is rejected as an unquoted column identifier

Add MASTER_DEMOTE_TO_SLAVE_SYM to keyword_func_sp_var_and_label in
sql/sql_yacc.yy so that MASTER_DEMOTE_TO_SLAVE and
MASTER_DEMOTE_TO_REPLICA can be used as unquoted identifiers (table
names, column names, aliases), consistent with neighboring
replication options.
Aleksey Midenkov
MDEV-20266 rocksdb.mariadb_port_fixes fails in BB about twice a day

The EXPLAIN of MDEV-14563 test case sporadically shows ALL instead of
range:

  -1 SIMPLE t2 range a a 32 NULL # Using where
  +1 SIMPLE t2 ALL a NULL NULL NULL # Using where

The two rows of t1 and t2 are still in the memtable when EXPLAIN runs.
ha_rocksdb::info() takes stats.records and records_in_range() takes
the range estimate from GetApproximateMemTableStats(), which counts
skiplist nodes of random height. The memtable of the default column
family also holds the data of the tests run before on the same server.
So both estimates vary between runs, and when the range estimate is
not less than stats.records, the optimizer prefers the table scan.

The fix flushes the memtable and runs ANALYZE TABLE before each
EXPLAIN, like index_merge_rocksdb.test does. Then the estimates come
from the SST file statistics. Both statements are hidden from the
result, so the result file is unchanged.