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
Sergei Petrunia
MDEV-39368: Add mtr --replay-server option to test Optimizer Context Replay

Make --replay-server clean up the environment on replay server:
drop created tables, views, etc.
Sergei Petrunia
MDEV-39368: Add mtr --replay-server option to test Optimizer Context Replay

Re-commit the entire feature as one patch.

KEEP THIS AFTER ALL OPTIMIZER CONTEXT REPLAY COMMITS.
Oleksandr Byelkin
MDEV-40173 RPM conflicts on /usr/lib64/security

The move of the install location of pam files in MDEV-37197
(34aac090f2acc1a4b5850810fe41370c19659d55) resulted in different
install locations on different RPM distros.

Correct the RPM packaging to ignore the path of the pam files
(but not the pam files themselves).
Sergei Golubchik
MDEV-40340 mariadb-import --lock-tables crashes

don't change `argv` pointer, it's needed later for --lock-tables
Sergei Golubchik
MDEV-40311 mariadb-dump doesn't always quote identifiers

11.8 part. SHOW CREATE SERVER
bsrikanth-mariadb
MDEV-40388: sequence.simple fails on replay

The problem is that, when recording is enabled for the query such as,
explain select * from seq_1_to_10;
it recorded the table context having a DDL definition as: -

CREATE TABLE `seq_1_to_10` (
    ->  `seq` bigint(20) unsigned NOT NULL,
    ->  PRIMARY KEY (`seq`)
    -> ) ENGINE=SEQUENCE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;

Now, when that context is replayed, the DDL statement is executed.
But, we cannot create such a table, and instead it errors out saying
ERROR 1050 (42S01): Table 'seq_1_to_10' already exists.

Solution is to use: -
  CREATE TABLE IF NOT EXISTS seq_1_to_10 ...;

=====

Also, there is a different way to use sequences as: -
  Create sequence s1;
  Explain select * from s1;

Here, we should be recording the DDL statement, but no need to store the
stats for it. However, we didn't record the DDL statement earlier.
Moreover, sequence's next value should be the same in the replay environment.

Solution here is to record the DDL for such a sequence as
  CREATE TABLE IF NOT EXISTS s1 ...;
and also set its start value as the recorded environment's previous value using
  SELECT SETVAL(s1, prev_value);
Sergei Golubchik
MDEV-40340 mariadb-import --lock-tables crashes

don't change `argv` pointer, it's needed later for --lock-tables
Dave Gosselin
MDEV-40573:  Crash on multi-table DELETE with an impossible WHERE

A DELETE containing a single table, an index hint, an impossible WHERE
condition, and a window function will take the multi-delete code path
but never initialize tables for deletion, leading to a crash.  Such
a statement would never delete rows from the target table.  Record in the
multi_delete whether it was ever initialized for execution, and don't
attempt to delete anything if it wasn't initialized.

The index hint forces the single table DELETE to take the multi-table
codepath.  Since this case has an impossible WHERE condition, we set
subq_exit_fl which later causes JOIN::optimize_stage2 to skip the
multi-delete table initialization.  It's not safe to attempt
initialization when trying to find a "tableless" subquery plan, so
defend against this case with the new multi-delete flag added by
this commit.
Vladislav Vaintroub
MDEV-40323 CONNECT engine - add file access checks for JSON UDFs

Check FILE_ACL and secure_file_priv for the current user inside CONNECT
file UDFs (json_file, jfile_make, jbin_file, bson_file, bfile_make,
bbin_file).

Fix NULL filename: guard GetFileLength in jbin_file_init and check for
NULL fn in UDF bodies before the access check, so NULL arguments report
"Missing file name" instead of "Access denied".
Oleksandr Byelkin
MDEV-40173 RPM conflicts on /usr/lib64/security

The move of the install location of pam files in MDEV-37197
(34aac090f2acc1a4b5850810fe41370c19659d55) resulted in different
install locations on different RPM distros.

Correct the RPM packaging to ignore the path of the pam files
(but not the pam files themselves).
Sergei Petrunia
Code cleanup in JSON array-of-object reading, add unit tests.
bsrikanth-mariadb
MDEV-40383:innodb_gis.point_basic fails on replay

There are 2 problems: -
1. The REPLACE statement that is recorded doesn't store the
  value of geometry type field correctly.
2. The table definition that got recorded has fields with non-null constraint,
  and no default value is specified.
  Also, the "REPLACE INTO" statement that gets stored in the context,
  doesn't have any value specified for these non-null fields.

Solution is to: -
1. When using REPLACE INTO statement, store all the non-numeric values in HEX,
  whenever conversion from field's charset to output's charset is lossy.
2. Instead of storing only the column values that were projected in the
  query, store all the non-virtual column values into the recorded
  REPLACE INTO statement.

Implementation details: -
1. Introduce a new method is_charset_conversion_lossless() in filesort.cc,
  to check if the output charset to which field's data is being written to,
  results in a lossless conversion. If so, non-numeric values being witten
  using REPLACE INTO statement are stored in string representation,
  else they are converted to HEX.
2. From join_read_const(), and join_read_system() methods in sql_select.cc,
  re-read the const row for all the non-virtual fields in the table.
  After the row is re-read and recorded, restore the table->read_set,
  table->status, and the const row, to the value that was before.
Daniel Black
MDEV-39803 RPM dependencies missing from MariaDB-server-galera package

RPM dependencies where not included in cpack build due to incorrect
component name.

Corrects a103be381b38

Becase the wsrep_info plugin installs as a plugin, it overrites the
cpack_rpm server-galera PACKAGE_DEPENDS.

As such make the cmake/plugin.cmake only sets the PACKAGE_DEPENDS if
not already set. This allows plugin to override automatic REQUIRES,
fine-tuning their own dependencies
Sergei Golubchik
MDEV-37781 post-fix

move ER_STACK_OVERRUN_NEED_MORE test together with the others.
And remove not_asan/msan/ubsan includes as the fix suggests

followup for 2be9ba2537aa
forkfun
MDEV-39566 fix status_by_thread crash on live thread-count change

PFS_table_context snapshots the live thread/user/host/account
count at scan start and again on restore (filesort's second
rnd_init). If the count changed between the two, m_map_size
mismatched and the server aborted.

Skip the wasted re-sample on restore, bound each table's scan by
the frozen snapshot instead of the container's live count.
Sergei Golubchik
MDEV-40571 insufficient validation of frm data when opening a table

numerous checks that the frm is valid, no OOB reads,
values make sense (number of keyparts not less than number of keys,
no keys means no keyparts, number of long unique fields is not larger than
number of fields, fields values in the record don't overlap and don't
go over record ends, and so on). most asserts were changed to if()'s.
Sergei Golubchik
MDEV-40312 SHOW CREATE SERVER incorrect quoting

quote protocol name and option names
Sergei Petrunia
MDEV-39368: Add mtr --replay-server option to test Optimizer Context Replay

Re-commit the entire feature as one patch.

KEEP THIS AFTER ALL OPTIMIZER CONTEXT REPLAY COMMITS.
Sergei Golubchik
CREATE SERVER: fix option parsing to support backticks properly

CREATE SERVER used to:
* support arbitrary options in backticks and not in backticks
* hard-coded historical options worked *only* without backticks
* PORT range was different when given as a number or a string

all that is fixed, unused keywords are removed
Sergei Golubchik
MDEV-40571 insufficient validation of frm data when opening a table

numerous checks that the frm is valid, no OOB reads,
values make sense (number of keyparts not less than number of keys,
no keys means no keyparts, number of long unique fields is not larger than
number of fields, fields values in the record don't overlap and don't
go over record ends, and so on). most asserts were changed to if()'s.
Sergei Petrunia
Code cleanup in JSON array-of-object reading, add unit tests.
Vladislav Vaintroub
MDEV-40323 CONNECT engine - add file access checks for JSON UDFs

Check FILE_ACL and secure_file_priv for the current user inside CONNECT
file UDFs (json_file, jfile_make, jbin_file, bson_file, bfile_make,
bbin_file).

Fix NULL filename: guard GetFileLength in jbin_file_init and check for
NULL fn in UDF bodies before the access check, so NULL arguments report
"Missing file name" instead of "Access denied".
Oleksandr Byelkin
MDEV-40173 RPM conflicts on /usr/lib64/security

The move of the install location of pam files in MDEV-37197
(34aac090f2acc1a4b5850810fe41370c19659d55) resulted in different
install locations on different RPM distros.

Correct the RPM packaging to ignore the path of the pam files
(but not the pam files themselves).
Daniel Black
MDEV-37224 Remove UBSAN limitation from MTR tests

There's no good reason why undefined behaviour is
acceptable in our codebase let alone having a test that
triggers this.

The thread_stack_basic test because of compulation
has a different stack size under UBSAN. With replace_results
we can include all values of the default stack size
in this test.

plugins.multiauth was added in 031f11717d9f before
CONC-730 and MDEV-31379 corrected the ref10 implementaiton.
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(). If rollback fails
flag error to cause unireg_abort().
Daniel Black
MDEV-39169 Replace deprecated network functions in resolveip (testfix)

Check there is a ipv4 mapped address.
Daniel Black
MDEV-39803 RPM dependencies missing from MariaDB-server-galera package

RPM dependencies where not included in cpack build due to incorrect
component name.

Corrects a103be381b38

Becase the wsrep_info plugin installs as a plugin, it overrites the
cpack_rpm server-galera PACKAGE_DEPENDS.

As such make the cmake/plugin.cmake only set the PACKAGE_DEPENDS if
not already set.
Daniel Black
MDEV-39813 ST_GeomFromGeoJSON does not control recursion depth

Using stack_p wasn't a portable concept in 12.3 when JSON
parsing got unlimited depth. To let ST_GeomFromGeoJSON was
already a recursive function, needed because object order of "type"
may be after the "geometries", but with json_engine_t no longer
enforcing the depth, some stack checking was required.

Use the check_stack_depth function to allow excessively deep
GeoJSON objects to error.

As this is cleaned up the gis-json test can be enabled.

The exceeding stack depth is moved to lotofstack.test.
Vladislav Vaintroub
MDEV-40323 CONNECT engine - add file access checks for JSON UDFs

Check FILE_ACL and secure_file_priv for the current user inside CONNECT
file UDFs (json_file, jfile_make, jbin_file, bson_file, bfile_make,
bbin_file).

Fix NULL filename: guard GetFileLength in jbin_file_init and check for
NULL fn in UDF bodies before the access check, so NULL arguments report
"Missing file name" instead of "Access denied".
Sergei Golubchik
MDEV-40312 SHOW CREATE SERVER incorrect quoting

quote protocol name and option names
Sergei Golubchik
MDEV-40571 insufficient validation of frm data when opening a table

numerous checks that the frm is valid, no OOB reads,
values make sense (number of keyparts not less than number of keys,
no keys means no keyparts, number of long unique fields is not larger than
number of fields, fields values in the record don't overlap and don't
go over record ends, and so on). most asserts were changed to if()'s.
forkfun
Merge branch '13.0' into 'main'

check_grant_db(), mysqld_show_create_db(), get_schema_privileges_for_show(),
get_check_constraints_record(), and check_grant()'s any_combination_will_do
path (via get_all_tables()) still treated GRANT OPTION alone as a real
privilege, reintroduced by the MDEV-14443 DENY statement refactor. Same
fix as the original MDEV-37951 patch: exclude GRANT_ACL from the group
mask before testing "has any privilege".
Daniel Black
MDEV-32331: JSON path functions with no charset on path crash server

Across a range of JSON functions taking a path argument
there are SQL expressions that dont' have a character
set. If these expressions don't have a character set
fall back to the character set of the argument of the
json function that represent the document being operated
on. If this doesn't have a character set fall back to
my_charset_utf8mb4_bin.

This covers the 11.4 JSON_KEY_VALUE function also as it
reuses the Json_path_extractor::extract method.

Add nonnull and warn_unused_result to the json path
functions to facilitate compiler and UBSAN catching of the
problem early.

As null values of s_p are incompatible with report_path_error,
jump directly to a null return which is consistent with
the defination of the JSON sql funciton.
Daniel Black
MDEV-39803 RPM dependencies missing from MariaDB-server-galera package

RPM dependencies where not included in cpack build due to incorrect
component name.

Corrects a103be381b38

Becase the wsrep_info plugin installs as a plugin, it overrites the
cpack_rpm server-galera PACKAGE_DEPENDS.

As such make the cmake/plugin.cmake only set the PACKAGE_DEPENDS if
not already set.
Sergei Golubchik
fixup! MDEV-40312 SHOW CREATE SERVER incorrect quoting
Sergei Golubchik
mysqldump: remove dead and broken code

since 2006 (3840774309bc) mysqldump tried to be smart when dumping
events - it tried to automatically detected a delimiter per event
that was not present in the event body, using ";;" by default.

This never worked, was broken since the first commit. It either used
the default ";;" or failed after trying the same ";;" delimiter
2147483646 times.

All other objects (routines, triggers, etc) used a hard-coded ";;"
for 20 years, which apparently worked fine. Let's remove the old
broken logic and dump events like all other objects,
Sergei Golubchik
mysqldump: remove dead and broken code

since 2006 (3840774309bc) mysqldump tried to be smart when dumping
events - it tried to automatically detected a delimiter per event
that was not present in the event body, using ";;" by default.

This never worked, was broken since the first commit. It either used
the default ";;" or failed after trying the same ";;" delimiter
2147483646 times.

All other objects (routines, triggers, etc) used a hard-coded ";;"
for 20 years, which apparently worked fine. Let's remove the old
broken logic and dump events like all other objects,
Sergei Golubchik
CREATE SERVER: fix option parsing to support backticks properly

CREATE SERVER used to:
* support arbitrary options in backticks and not in backticks
* hard-coded historical options worked *only* without backticks
* PORT range was different when given as a number or a string

all that is fixed, unused keywords are removed
Sergei Golubchik
MDEV-40571 insufficient validation of frm data when opening a table

numerous checks that the frm is valid, no OOB reads,
values make sense (number of keyparts not less than number of keys,
no keys means no keyparts, number of long unique fields is not larger than
number of fields, fields values in the record don't overlap and don't
go over record ends, and so on). most asserts were changed to if()'s.
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
because getting snapshot and binlog are no mutually atomic, 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: backward compatibility: keep shipping binlog file
  in SST but
  - on donor fix the race between rotation and shipping so that the file
    shipped is the one that had been rotated;
  - on joiner discard shipped binlog in favour of one generated by
    wsrep_seed_binlog_gtid_state().
- 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]>