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
Vladislav Vaintroub
Use the server's MariaDB::zlib target when built as a submodule

When Connector/C is built inside the MariaDB server tree, pick up the server's
zlib via the MariaDB::zlib target instead of running FIND_PACKAGE(ZLIB), so the
connector uses exactly the same zlib (bundled or system) as the server and no
longer depends on the FindZLIB result-variable signature. Standalone builds are
unchanged - they still fall back to FIND_PACKAGE(ZLIB).

Also stop adding zlib to CMAKE_REQUIRED_LIBRARIES: ZLIB_LIBRARY may now be an
(ALIAS) target which cannot be used inside try_compile() checks, and none of
those checks need zlib.

Server: MDEV-37996
Vladislav Vaintroub
Use the server's MariaDB::zlib target when built as a submodule

When Connector/C is built inside the MariaDB server tree, pick up the server's
zlib via the MariaDB::zlib target instead of running FIND_PACKAGE(ZLIB), so the
connector uses exactly the same zlib (bundled or system) as the server. This
also avoids depending on the FindZLIB result-variable signature. Standalone
builds are unchanged - they still fall back to FIND_PACKAGE(ZLIB).

Server: MDEV-37996
rusher
Add clang -Werror build job to CI
Georg Richter
Merge branch '3.3' into 3.4
  • cc-x-codbc-windows: 'dojob pwd if '3.4' == '3.4' ls win32/test SET TEST_DSN=master SET TEST_DRIVER=master SET TEST_PORT=3306 SET TEST_SCHEMA=odbcmaster if '3.4' == '3.4' cd win32/test if '3.4' == '3.4' ctest --output-on-failure' failed -  stdio
Vladislav Vaintroub
MDEV-37996 update libmariadb to use server's MariaDB::zlib

Remove hack in cmake/mariadb_connector_c.cmake that sets variables
to make connectors FIND_PACKAGE(ZLIB) use server's zlib.
it is not necessary anymore, and is expressed more directly.
sjaakola
MDEV-39681 delayed BF aborting with multi master load

Reason for the hanging, and occasional crashes turned out
to be orphaned innodb lock wait request of a BF aborted
local transaction, which had arrived in commit stage.

Reason is that wsrep BF-abort marks a transaction a deadlock
victim out-of-band, so (unlike native deadlock resolution)
the victim can still own a live LOCK_WAIT request;
if that orphaned waiter survives into commit/rollback,
another transaction granting it calls lock_wait_end() cross-thread
and corrupts the victim's state — surfacing as the lock_wait_end,
que_thr_step, and rollback_finish assertions.

This commit has fixes for claering lock wait status of BF aborted
transactions.

Commit has also a new mtr test: galera.galera_bf_abort_orphan_lock
to work as regression test for the fix.
Sergei Golubchik
MDEV-39841 handlersocket plugin default secret is empty

if handlersocket_plain_secret is not specified, generate a random one.
one can still set an empty secret in my.cnf if needed.
bsrikanth-mariadb
MDEV-39942: use actual_rec_per_key in loose scan sj optimization

While performing loose scan semi-join optimization in
Loose_scan_opt::check_ref_access_part1() [opt_subselect.h],
the filtered value in the explain plan was in-consistent for a table
with index when same data was inserted using "insert into t1 values()...",
and "insert into t1 select * from t2". This is noticed when
rec_per_key[] was used to get the number of records during optimization.

However, when actual_rec_per_key() is used to get the number of records,
we don't notice this discrepancy.

This PR changes the rec_per_key[] usage to actual_rec_per_key() in the
method Loose_scan_opt::check_ref_access_part1() [opt_subselect.h]
PranavKTiwari
Added logic for global temp table.
Alexey Yurchenko
MDEV-38147 error 1950 after mariabackup SST with gtid_strict_mode=ON

After a mariabackup SST the joiner could fail with

  ER_GTID_STRICT_OUT_OF_ORDER (error 1950)

while re-binlogging transactions received over IST.

The cause is that the binary log copied from the donor carries a
Gtid_list whose position can be ahead of the storage-engine snapshot:
BACKUP STAGE BLOCK_COMMIT blocks the engine commit (2PC step 3) but not
the binary log write (step 2), so transactions can be present in the
copied binlog that are not committed in the copied engine snapshot.
After the SST the joiner reports the (committed) engine position to the
cluster, IST resends those transactions, and re-binlogging them under
gtid_strict_mode=ON collides with the ahead Gtid_list -> error 1950.
(MDEV-34483 made the engine snapshot stop short of the binlog, which is
what exposed this.)

The copied binary log carries no transactions the joiner needs - only a
Gtid_list - so instead of shipping and then having to truncate/reconcile
it, the joiner now starts a fresh binary log and seeds its GTID position
from the storage-engine checkpoint during recovery. That checkpoint is
the committed cluster position, i.e. exactly where IST resumes, so the
joiner's binary log stays in lockstep with the rest of the cluster and
no out-of-order GTID can occur.

This works for both wsrep_gtid_mode settings; only the binlog domain of
the cluster stream differs:

  - wsrep_gtid_mode=ON : wsrep_gtid_domain_id (cluster writes are
    re-tagged to it), which is the domain stored in the checkpoint;
  - wsrep_gtid_mode=OFF: gtid_domain_id (cluster writes keep the node's
    configured domain).

Async-replica positions (mysql.gtid_slave_pos) are part of the engine
snapshot and survive the SST unchanged, so a Galera node can still serve
as an async master or replica across the SST.

This commit:
- sql/log.cc: adds wsrep_seed_binlog_gtid_state(), called from
  do_binlog_recovery() when the joiner has no binary log, seeding the
  binlog GTID state for the cluster domain to the SE checkpoint position.
- scripts/wsrep_sst_mariabackup.sh: no longer moves the donor's binary
  log into place on the joiner.
- extra/mariabackup: stop flushing and copying the donor's current
  binary log under --galera-info (removed write_current_binlog_file()).
  Its only purpose was to ship that binary log to the joiner, which now
  discards it; flushing needlessly rotated the donor's binary log on
  every SST. xtrabackup_galera_info and xtrabackup_binlog_info are still
  written.
- sql/wsrep_sst.cc: logs the position actually adopted from storage
  (the authoritative post-SST position) rather than the script-reported
  one.
- sql/handler.cc: downgrades the "Discovered discontinuity in recovered
  wsrep transaction XIDs" message in wsrep_order_and_check_continuity()
  from warning to debug level. With parallel appliers a snapshot
  routinely captures prepared XIDs that are not contiguous with the
  engine checkpoint, so this is normal during SST recovery and of no
  value in regular operation; the transactions past the checkpoint are
  re-delivered by the cluster (IST/SST) regardless.
- Adds an MDEV-38147 MTR test reproducing the issue.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Sergei Golubchik
MDEV-39776 SHOW CREATE TABLE corrupts `-quoted table options

Two problems:

1. option value specified as `foo bar` was not quoted,
  printed as foo bar, breaking CREATE TABLE.
2. Option value that included */ was printed as is, in unknown
  options when the whole option was commented out, this broke the
  comment: /* opt='val*/ue' */

Fix: simplify value printing, ignore the original quoting,
always print the value quoted as a string. Break comment markers
with an escape (as *\/) if inside a comment.

Note, cannot use `-quoting, because \-escapes don't work inside,
backticks, so */ cannot be broken.
forkfun
MDEV-39380 Assertion `arg2_int >= 0' failed in Item_func_additive_op::result_precision

COALESCE/IFNULL/CASE over a hex/bit literal went through string attribute
aggregation, which reset the hybrid's integer attributes to string defaults
(decimals=NOT_FIXED_DEC, unsigned_flag=false). Functions relying on the
integer nature then broke: ROUND()/TRUNCATE() tripped the
`args[0]->decimals == 0' / `unsigned_flag' asserts, and SUM() built a
DECIMAL with scale > precision.

Restore decimals=0 and unsigned_flag in
Type_handler_hex_hybrid::Item_hybrid_func_fix_attributes when the
aggregated result is still a hex hybrid.
Add val_int/val_real/val_decimal to Type_handler_hex_hybrid so
these functions return the same value as the bare literal in numeric context
Vladislav Vaintroub
MDEV-37781 ASAN build crashes on deep query with low thread stack

check_stack_overrun() was compiled out under ASAN, so a deeply nested
expression recursed in Item_func::fix_fields() until the stack was
exhausted and the server crashed instead of reporting
ER_STACK_OVERRUN_NEED_MORE.

Since MDEV-34533 (Monty) the stack usage seems to be accounted correctly
under ASAN via my_get_stack_pointer(), so the check seems to works there
too.

Fix:
Remove the #ifndef __SANITIZE_ADDRESS__  guard from check_stack_overrun()

Add a test for ER_STACK_OVERRUN_NEED_MORE
Vladislav Vaintroub
MDEV-37781 ASAN build crashes on deep query with low thread stack

check_stack_overrun() was compiled out under ASAN, so a deeply nested
expression recursed in Item_func::fix_fields() until the stack was
exhausted and the server crashed instead of reporting
ER_STACK_OVERRUN_NEED_MORE.

Since MDEV-34533 (Monty) the stack usage seems to be accounted correctly
under ASAN via my_get_stack_pointer(), so the check seems to works there
too.

Fix:
Remove the #ifndef __SANITIZE_ADDRESS__  guard from check_stack_overrun()

Add a test for ER_STACK_OVERRUN_NEED_MORE
Yuchen Pei
MDEV-40048 [to-squash] Allow trigger and LOCK TABLES to work with range interval auto partitioning

When a range interval auto partitioned table is the target of a
trigger, the triggering statement is not necessarily one that would
cause the auto-creation of new partitions, so we need to account for
that.

Also added support for LOCK TABLES ... WRITE.

Improved tests coverage by adapting tests from versioning.partition.
sjaakola
MDEV-38243 Write binlog row events for changes done by cascading FK operations

This commit implements a feature which changes the handling of cascading foreign
key operations to write the changes of cascading operations into binlog.
The applying of such transaction, in the slave node, will apply just the binlog
events, and does not execute the actual foreign key cascade operation.
This will simplify the slave side replication applying and make it more predictable
in terms of potential interference with other parallel applying happning
in the node.

This feature can be turned ON/OFF by new variable:
rpl_use_binlog_events_for_fk_cascade, with default value OFF

The actual implementation is largely by windsurf.

The commit has also mtr tests for testing rpl_use_binlog_events_for_fk_cascade
feature:  rpl.rpl_fk_cascade_binlog_row, rpl.rpl_fk_set_null_binlog_row and
rpl.fk_cascade_binlog_row_rollback
PranavKTiwari
Added logic for global temp table.
Dave Gosselin
MDEV-24658:  Optimizer trace reads a column not marked for read

When the optimizer trace is enabled, it's safe to read from a
constant table because the value in record[0] was materialized
during optimization and remains available, even after constants
propagation has removed the table from the read set.
Daniel Black
MDEV-40176: field_charset()->charpos(blob..) called with NULL

Problem:
  When `my_charpos_mb()` is called by `Field_blob::get_key_image_itRAW`
  with a start/end both being NULL. Because of this the blob_length
  must have been 0.

Fix:
  Rather than relying on character set functions to calculate the
  storage of nothing, bypass the calculation as the charpos() isn't
  going to return a value less than 0 (the blob_length).
Dave Gosselin
MDEV-24658:  Optimizer trace reads a column not marked for read

When the optimizer trace is enabled, it's safe to read from a
constant table because the value in record[0] was materialized
during optimization and remains available, even after constants
propagation has removed the table from the read set.
forkfun
MDEV-39380 Assertion `arg2_int >= 0' failed in Item_func_additive_op::result_precision

COALESCE/IFNULL/CASE over a hex/bit literal went through string attribute
aggregation, which reset the hybrid's integer attributes to string defaults
(decimals=NOT_FIXED_DEC, unsigned_flag=false). Functions relying on the
integer nature then broke: ROUND()/TRUNCATE() tripped the
`args[0]->decimals == 0' / `unsigned_flag' asserts, and SUM() built a
DECIMAL with scale > precision.

Restore decimals=0 and unsigned_flag in
Type_handler_hex_hybrid::Item_hybrid_func_fix_attributes when the
aggregated result is still a hex hybrid.
Add val_int/val_real/val_decimal to Type_handler_hex_hybrid so
these functions return the same value as the bare literal in numeric context
Vladislav Vaintroub
MDEV-37781 ASAN build crashes on deep query with low thread stack

check_stack_overrun() was compiled out under ASAN, so a deeply nested
expression recursed in Item_func::fix_fields() until the stack was
exhausted and the server crashed instead of reporting
ER_STACK_OVERRUN_NEED_MORE.

Since MDEV-34533 (Monty) the stack usage seems to be accounted correctly
under ASAN via my_get_stack_pointer(), so the check seems to works there
too.

Fix:
Remove the #ifndef __SANITIZE_ADDRESS__  guard from check_stack_overrun()

Add a test for ER_STACK_OVERRUN_NEED_MORE
sjaakola
MDEV-38243 Write binlog row events for changes done by cascading FK operations

This commit implements a feature which changes the handling of cascading foreign
key operations to write the changes of cascading operations into binlog.
The applying of such transaction, in the slave node, will apply just the binlog
events, and does not execute the actual foreign key cascade operation.
This will simplify the slave side replication applying and make it more predictable
in terms of potential interference with other parallel applying happning
in the node.

This feature can be turned ON/OFF by new variable:
rpl_use_binlog_events_for_fk_cascade, with default value OFF

The actual implementation is largely by windsurf.

The commit has also mtr tests for testing rpl_use_binlog_events_for_fk_cascade
feature:  rpl.rpl_fk_cascade_binlog_row, rpl.rpl_fk_set_null_binlog_row and
rpl.fk_cascade_binlog_row_rollback
forkfun
MDEV-39380 Assertion `arg2_int >= 0' failed in Item_func_additive_op::result_precision

COALESCE/IFNULL/CASE over a hex/bit literal went through string attribute
aggregation, which reset the hybrid's integer attributes to string defaults
(decimals=NOT_FIXED_DEC, unsigned_flag=false). Functions relying on the
integer nature then broke: ROUND()/TRUNCATE() tripped the
`args[0]->decimals == 0' / `unsigned_flag' asserts, and SUM() built a
DECIMAL with scale > precision.

Restore decimals=0 and unsigned_flag in
Type_handler_hex_hybrid::Item_hybrid_func_fix_attributes when the
aggregated result is still a hex hybrid.
Add val_int/val_real/val_decimal to Type_handler_hex_hybrid so
these functions return the same value as the bare literal in numeric context
bsrikanth-mariadb
MDEV-39942: use actual_rec_per_key in loose scan sj optimization

While performing loose scan semi-join optimization in
Loose_scan_opt::check_ref_access_part1() [opt_subselect.h],
the filtered value in the explain plan was in-consistent for a table
with index when same data was inserted using "insert into t1 values()...",
and "insert into t1 select * from t2". This is noticed when
rec_per_key[] was used to get the number of records during optimization.

However, when actual_rec_per_key() is used to get the number of records,
we don't notice this discrepancy.

This PR changes the rec_per_key[] usage to actual_rec_per_key() in the
method Loose_scan_opt::check_ref_access_part1() [opt_subselect.h]
PranavKTiwari
Added logic for global temp table.
Georg Richter
Added option -DWITH_TOOLS (default is OFF)

- Build of the tools directory is now optional
- Removed installation of the data directory
- Fixed README.md
  • cc-x-codbc-windows: 'dojob pwd if '3.4' == '3.4' ls win32/test SET TEST_DSN=master SET TEST_DRIVER=master SET TEST_PORT=3306 SET TEST_SCHEMA=odbcmaster if '3.4' == '3.4' cd win32/test if '3.4' == '3.4' ctest --output-on-failure' failed -  stdio
Vladislav Vaintroub
MDEV-37781 ASAN build crashes on deep query with low thread stack

check_stack_overrun() was compiled out under ASAN, so a deeply nested
expression recursed in Item_func::fix_fields() until the stack was
exhausted and the server crashed instead of reporting
ER_STACK_OVERRUN_NEED_MORE.

Since MDEV-34533 (Monty) the stack usage seems to be accounted correctly
under ASAN via my_get_stack_pointer(), so the check seems to works there
too.

Fix:
Remove the #ifndef __SANITIZE_ADDRESS__  guard from check_stack_overrun()

Add a test for ER_STACK_OVERRUN_NEED_MORE
Vladislav Vaintroub
MDEV-37996 update libmariadb to use server's MariaDB::zlib

Remove hack in cmake/mariadb_connector_c.cmake that sets variables
to make connectors FIND_PACKAGE(ZLIB) use server's zlib.
it is not necessary anymore, and is expressed more directly.
forkfun
MDEV-39380 Assertion `arg2_int >= 0' failed in Item_func_additive_op::result_precision

A 0xHHHH / b'..' literal keeps its hex_hybrid type through
COALESCE/IF/IFNULL/NVL/NVL2/NULLIF/CASE/LEAST/GREATEST, but was evaluated,
sized and stored as a string, so a wrapped literal behaved differently from a
bare one (10+COALESCE(0x31) gave 11 instead of 59;).

After the patch the numeric side of Type_handler_hex_hybrid so it matches the bare
literal:
- val_int/val_real/val_decimal read the bytes as a hex hybrid, not a number string
- Item_decimal_precision returns the integer precision (correct DECIMAL sizing
  for AVG/SUM, views, CREATE ... SELECT)
- Item_save_in_field stores it like the bare literal into any column type
- keep the hybrid type when aggregated with NULL (COALESCE(NULL, 0x31))
- restore decimals=0/unsigned after string attribute aggregation
Sergei Golubchik
MDEV-39841 handlersocket plugin default secret is empty

if handlersocket_plain_secret is not specified, generate a random one.
one can still set an empty secret in my.cnf if needed.
ParadoxV5
Fix redefining `bool` when including `ma_global.h` in C++ (#311)

* Fix redefining `bool` when including `ma_global.h` in C++

If `HAVE_BOOL` is not defined (by default), the C++ check didn’t matter because of the `||` operator.
  • cc-x-codbc-windows: 'dojob pwd if '3.4' == '3.4' ls win32/test SET TEST_DSN=master SET TEST_DRIVER=master SET TEST_PORT=3306 SET TEST_SCHEMA=odbcmaster if '3.4' == '3.4' cd win32/test if '3.4' == '3.4' ctest --output-on-failure' failed -  stdio
rusher
Add clang build job to CI
Sergei Golubchik
MDEV-39776 SHOW CREATE TABLE corrupts `-quoted table options

Two problems:

1. option value specified as `foo bar` was not quoted,
  printed as foo bar, breaking CREATE TABLE.
2. Option value that included */ was printed as is, in unknown
  options when the whole option was commented out, this broke the
  comment: /* opt='val*/ue' */

Fix: simplify value printing, ignore the original quoting,
always print the value quoted as a string. Break comment markers
with an escape (as *\/) if inside a comment.

Note, cannot use `-quoting, because \-escapes don't work inside,
backticks, so */ cannot be broken.
Vladislav Vaintroub
MDEV-37996 update libmariadb to use server's MariaDB::zlib

Remove hack in cmake/mariadb_connector_c.cmake that sets variables
to make connectors FIND_PACKAGE(ZLIB) use server's zlib.
it is not necessary anymore, and is expressed more directly.
Aleksey Midenkov
MDEV-39306 Index corruption on UPDATE when using versioned InnoDB table (on UPDATE)

VCOL_UPDATE_FOR_READ does not update virtual fields for the following
cases:

1. It is not in read_set;
2. It is not in the index, but can be calculated from index columns;
3. It is stored virtual column.

VCOL_UPDATE_FOR_WRITE does not have conditions 2. and 3.

Test case fails condition 3., stored vcol was not updated by
VCOL_UPDATE_FOR_READ. Since vers_update_fields() is only for write
operations it is safe to change it to VCOL_UPDATE_FOR_WRITE.
Alexey Yurchenko
MDEV-40179 Found N prepared transactions after mariabackup SST

With log_bin=ON a transaction is committed via two-phase commit (the
binary log is the second participant), so it passes through the InnoDB
XA-prepare state. While a donor is held in BLOCK_COMMIT for a mariabackup
backup, its parallel appliers (wsrep_slave_threads > 1) leave one or more
such writesets prepared-but-not-yet-committed, and the snapshot captures
them. On a freshly SST'd joiner nothing resolves these prepared
transactions: binlog crash recovery does not run (the joiner has no in-use
binlog to recover from), and the wsrep continuity-based commit is inactive
because wsrep_emulate_bin_log is FALSE when log_bin is ON. The leftover
prepared transactions then abort startup with "Found <N> prepared
transactions!". Note this does not depend on the prepared set being
non-contiguous - even a contiguous run aborts, because nothing commits
or rolls it back.

Rollback these transactions in xarecover_handlerton().

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Vladislav Vaintroub
Use the server's MariaDB::zlib target when built as a submodule

When Connector/C is built inside the MariaDB server tree, pick up the server's
zlib via the MariaDB::zlib target instead of running FIND_PACKAGE(ZLIB), so the
connector uses exactly the same zlib (bundled or system) as the server and no
longer depends on the FindZLIB result-variable signature. Standalone builds are
unchanged - they still fall back to FIND_PACKAGE(ZLIB).

Also stop adding zlib to CMAKE_REQUIRED_LIBRARIES: ZLIB_LIBRARY may now be an
(ALIAS) target which cannot be used inside try_compile() checks, and none of
those checks need zlib.

Server: MDEV-37996