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 Golubchik
MDEV-35254 Add get_current_thd() service function
Marko Mäkelä
MDEV-40063 Corruption due to race in SET GLOBAL innodb_log_archive=ON

There was a race condition between log_t::write_checkpoint() and
the execution of SET GLOBAL innodb_log_archive=ON (enabling log archiving).
We had wrongly allowed the concurrent execution of log_t::set_archive()
and log_t::write_checkpoint(). The result was that
log_sys.next_checkpoint_no was corrupted. This could have broken
crash recovery.

log_t::write_checkpoint(): When we are releasing log_sys.latch while
durably writing the checkpoint header block, assign log_sys.resize_log
to log_sys.log to inform other threads that a checkpoint is in progress.
Previously, we only did this when innodb_log_archive=ON holds.

log_t::resize_start(): Relax a debug assertion for the logic change.

Tested by: Matthias Leich
Vladislav Vaintroub
MDEV-39951 DENY feature does not work for EVENT privilege

Fix calculation of need_table_or_column_check in check_access(),
so it does not consider already denied bits on DB level.

Add a test case for events (provided by Ramesh Sivaraman)
PranavKTiwari
MDEV-35920: Fix assertion failure decimals == 0 in Item_func_mod::fix_length_and_dec_int
Hex hybrid literals (0x..) were incorrectly treated as string values during hybrid
expression aggregation (CASE/COALESCE/IF/LEAST/IFNULL), causing NOT_FIXED_DEC to
propagate into numeric contexts. This led to an assertion failure in MOD() which
requires decimals == 0 for integer arithmetic.

Fix ensures hex hybrid values retain string collation behavior but enforce numeric
semantics by setting decimals = 0 and unsigned_flag = true.

Add regression test for MOD() with hex in hybrid expressions
Georg Richter
Don't use ulong in mysql.h/mariadb_stmt.h
PranavKTiwari
MDEV-35920: Fix assertion failure decimals == 0 in Item_func_mod::fix_length_and_dec_int
Hex hybrid literals (0x..) were incorrectly treated as string values during hybrid
expression aggregation (CASE/COALESCE/IF/LEAST/IFNULL), causing NOT_FIXED_DEC to
propagate into numeric contexts. This led to an assertion failure in MOD() which
requires decimals == 0 for integer arithmetic.

Fix ensures hex hybrid values retain string collation behavior but enforce numeric
semantics by setting decimals = 0 and unsigned_flag = true.

Add regression test for MOD() with hex in hybrid expressions
PranavKTiwari
MDEV-30297 Server crash / assertion failure in Compare_identifiers::operator upon dropping period with empty name
Lex_cstring::streq() could invoke Compare_identifiers on default-constructed Lex_cstring objects (str == NULL, length == 0). Compare_identifiers assumes non-null strings and asserts in debug builds or crashes in non-debug builds. Guard against null string pointers in streq() before invoking the comparator.
drrtuy
disable sfinae-incomplete warning for DuckDB code.
Daniel Black
MDEV-40040 XXH32/XXH3 NULL-correctness regression

MDEV-39661 removed the null checking of the arguments early. This worked
if the arguments to the function where known null to begin with.

args[0]->hash_val_str() can, on evaluation, change the null value of
args[0]. As such it always nees to be executed.

The hasher.finalize still needs to be called to free the memory (like
MDEV-39661) however a 0 result when null being set is required.

Tests by Roel Van de Paar

Co-Authored-By: Claude
Rex
MDEV-35565 Server crashes simplifying group by <subquery>

During optimization, we may call update_depend_map_for_order()
on a group by list containing an expression with an outer reference.
The table map for this outer reference will be collected by
Item_subselect::recalc_used_tables and used to return a depend_map.
This map will indicate the presence of tables not in this select and
can cause erroneous results, poor execution plans or crashes.
We update the class used to collect these bitmaps to check whether the
containing select_lex is applicable, and if not, set the OUTER_REF_TABLE_BIT
bit in the table map.
Lawrin Novitsky
More of "use-of-uninitialized-value" use
  • codbc-linux-amd64-msan: build linux-connector_odbc failed -  stdio
Vladislav Vaintroub
MDEV-40002 REVOKE DENY on table debug asserts with existing GRANT, without existing DENY

Fix handling of update_denies_in_user_table() inside replace_table_table()

replace_table_table is "special", and should return  -1 if  grant was
revoked, 1 if error, 0 if success. Whenever it is used, caller explicitly
checks for return code greater 0

It did however return -1 on all errors with denies. The debug assertion
that catches cases where my_error() is followed by my_ok() fired then.

This is now fixed. Added test cases for "REVOKE DENY on non-existing DENY
and existing GRANT" scenarios.
PranavKTiwari
MDEV-30297 Server crash / assertion failure in Compare_identifiers::operator upon dropping period with empty name
Lex_cstring::streq() could invoke Compare_identifiers on default-constructed Lex_cstring objects (str == NULL, length == 0). Compare_identifiers assumes non-null strings and asserts in debug builds or crashes in non-debug builds. Guard against null string pointers in streq() before invoking the comparator.
Vladislav Vaintroub
MDEV-14443 DENY statement

Implements DENY/REVOKE DENY and associated tasks.
Dearsh Oberoi
MDEV-35254 refactor: Make my_bit.h an independent header

Removed type aliases and macros defined in my_global.h from my_bit.h,
making it possible to include it in plugins or external code without
pulling in my_global.h
Daniel Black
MDEV-35462 Remove obsolete compiler version checks from RocksDB CMakeLists.txt (fix)

-fPIC was erronously removed in 526f0765b3f961803919ec2c47074c5e029acbfb. Replaced with the
POSITION_INDEPENDENT_CODE target property.
Vladislav Vaintroub
MDEV-39951 DENY feature does not work for EVENT privilege

Fix calculation of need_table_or_column_check in check_access(),
so it does not consider already denied bits on DB level.

Add a test case for events (provided by Ramesh Sivaraman)
Marko Mäkelä
WIP MDEV-39092: back up some non-InnoDB files
Daniel Black
MDEV-40043 Assertion in my_uca_hash_sort_utf8mb4 on SELECT XXH32(REGEXP_REPLACE...)

Some expressions are 0 length and appending nothing to a hash
is a no-op.
Yuchen Pei
MDEV-40048 [to-squash] Allow trigger 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
Marko Mäkelä
WIP MDEV-14992 BACKUP SERVER

This introduces a basic driver Sql_cmd_backup, storage engine interfaces,
and basic copying of InnoDB data files.

TODO: Complete the implementation of streaming backup
in GNU tar --format=oldgnu

backup_target: A structured data type to represent a target directory.
On Microsoft Windows, we must use directory paths because there is
no variant of CopyFileEx() that would work on file handles.

backup_sink: Wraps a per-thread output stream as well as storage engine
specific context.

handlerton::backup_start(), handlerton::backup_end(): Invoked at the
start or end of a backup phase, in the thread that executes a
BACKUP SERVER statement.

handlerton::backup_step(): A backup step that can be invoked from
multiple threads concurrently, between the execution of the corresponding
handlerton::backup_start() and handlerton::backup_end() of the same
phase.

copy_entire_file(): A file copying service for POSIX systems.

copy_file(): A sparse file-copying service for all systems.

InnoDB_backup::context: Backup context, attached to backup_sink
so that context can continue to exist between the time a
BACKUP SERVER releases all locks and another BACKUP SERVER starts
executing, with innodb_backup pointing to the new backup, while
the old backup is still being finished.

fil_space_t::write_or_backup: Keep track of in-flight page writes and
pending backup operation. We must not allow them concurrently, because
that could lead into torn pages in the backup.

fil_space_t::backup_end: The first page number that is not being backed up
(by default 0, to indicate that no backup is in progress).

fil_space_t::BACKUP_BATCH_SIZE: The number of preceding pages that will be
covered by fil_space_t::backup_end. This is the unit of "page range locking"
during InnoDB backup.

log_sys.backup: Whether BACKUP SERVER is in progress. The purpose of this
is to make BACKUP SERVER prevent the concurrent execution of
SET GLOBAL innodb_log_archive=OFF or SET GLOBAL innodb_log_file_size
when innodb_log_archive=OFF.

log_sys.archived_checkpoint: Keep track of the earliest available
checkpoint, corresponding to log_sys.archived_lsn. This reflects
SET GLOBAL innodb_log_recovery_start (which is settable now), for
incremental backup.

buf_flush_list_space(): Check for concurrent backup before writing each
page. This is inefficient, but this function may be invoked from multiple
threads concurrently, and it cannot be changed easily, especially for
fil_crypt_thread().
PranavKTiwari
MDEV-30297 Server crash / assertion failure in Compare_identifiers::operator upon dropping period with empty name
Lex_cstring_with_compare::streq() could invoke Compare_identifiers on default-constructed Lex_cstring objects (str == NULL, length == 0). Compare_identifiers assumes non-null strings and asserts in debug builds or crashes in non-debug builds. Guard against null string pointers in streq() before invoking the comparator.
drrtuy
chore: avoid building DuckDB at x86_32.
Daniel Black
MDEV-39661 LSAN Detectable memory leak in XXH_malloc upon SHUTDOWN

my_hasher_xxh32() dynamiclly allocated memory, however when a NULL
was passed to the function, a return happened before hasher.finalize(),
which freed the required memory.

Thanks Roel Van de Paar for driving AI to do most of the analysis
that scoped our the other uses of my_hasher_xxh32 and my_hasher_xxh3
as safe.
Vladislav Vaintroub
MDEV-40002 REVOKE DENY on table debug asserts with existing GRANT, without existing DENY

Fix handling of update_denies_in_user_table() inside replace_table_table()

replace_table_table is "special", and should return  -1 if  grant was
revoked, 1 if error, 0 if success. Whenever it is used, caller explicitly
checks for return code greater 0

It did however return -1 on all errors with denies. The debug assertion
that catches cases where my_error() is followed by my_ok() fired then.

This is now fixed. Added test cases for "REVOKE DENY on non-existing DENY
and existing GRANT" scenarios.
Vladislav Vaintroub
MDEV-14443 DENY statement

Implements DENY/REVOKE DENY and associated tasks.
Vladislav Vaintroub
MDEV-40028 Assertion `rights.allow_bits() == merged->cols' failed

Fixed mismatched memroot in new operator, in apply_deny_column.

MDEV-40014 Crash in SHOW GRANTS FOR user after REVOKE

Fixed premature my_hash_reset in update_role_columns, should not be
done if only DENYs are present

Also fixed unintended GRANT on column privileges when DENY should be
applied.
Vladislav Vaintroub
MDEV-40028 Assertion `rights.allow_bits() == merged->cols' failed

Fixed mismatched memroot in new operator, in apply_deny_column.

MDEV-40014 Crash in SHOW GRANTS FOR user after REVOKE

Fixed premature my_hash_reset in update_role_columns, should not be
done if only DENYs are present

Also fixed unintended GRANT on column privileges when DENY should be
applied.
Sergei Golubchik
MDEV-32362 post-review changes

* don't handle generated columns specially in --xml mode
* test header must be MDEV summary
* add test version markers
* add a test for generated/invisible mix
PranavKTiwari
MDEV-38988: Assertion failure in Protocol::end_statement or lack of warning upon query with INTERSECT and LIMIT ROWS EXAMINED
LIMIT ROWS EXAMINED sets ABORT_QUERY, which is a recoverable stop condition.
Previously saved_error triggered premature goto err in UNION/EXCEPT/INTERSECT execution,
skipping fake_select and breaking statement finalization.

Skip fatal error handling when ABORT_QUERY is set to allow normal warning-based
partial result completion.
Thirunarayanan Balathandayuthapani
MDEV-39706  Assertion `!thd || !coordinator_thd' failed

Problem:
========
  - This assert was introduced in commit
0152c617e80ccf3f33d3ea4b50c17d5f588613b1 (MDEV-39261), which sets
coordinator_thd in clone_oldest_view() and resets it to nullptr in
batch_cleanup() at the end of the batch.
When innodb_trx_purge_view_update_only_debug is enabled, InnoDB fail
to reset coordinator_thd. As a result, InnoDB fails with assert in
next batch

Solution:
========
trx_purge(): Reset coordinator_thd to nullptr when
innodb_trx_purge_view_update_only_debug is enabled.
monthdev
MDEV-38180 Add XXH32() and XXH3() SQL functions

MariaDB supports XXH hash algorithms for KEY partitioning, but there is
no SQL interface for computing these hashes directly.

Add XXH32() and XXH3() scalar functions for long string data types.
Reject non-string argument data types with
ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION, while preserving NULL
handling. Hash string values through the charset-aware Hasher path.

Register the functions and add MTR coverage for string literals, NULL,
collation-sensitive comparisons, illegal non-string arguments, and KEY
partitioning distribution for supported string columns.

Reviewed-by: Yuchen Pei <[email protected]>
Raghunandan Bhat
MDEV-39450: Memory corruption: overlapping memory ranges in `Field_longstr::compress` on UPDATE of compressed column

Problem:
  Values shorter than `column_compression_threshold` (default 100) are
  stored uncompressed. Reading such a column returns a pointer into that
  buffer rather than a copy.

  When the new value is a substring of the column that aliases this
  buffer at a non-zero offset, e.g. `RIGHT(c,n)` or `SUBSTRING(c,n)`,
  the source and destination overlap, and the `memcpy()` in the "store
  uncompressed" path copies overlapping regions, which is undefined
  behaviour.

Fix:
  Replace `memcpy` with `memmove` to avoid copying between overlapping
  memory regions.
Fariha Shaikh
MDEV-32362 Handle generated columns in mariadb-dump INSERT statements

Currently, generated column names and values are present in INSERT
statements created by the dump tool. While this doesn't break
restorability, it is unnecessary as values for generated columns are
calculated based on other column values and need not be explicitly
inserted.

Modify mariadb-dump to handle generated columns in INSERT statements:

- In default mode, generated column values are replaced with DEFAULT,
  preserving the user's chosen insert style.
- When --complete-insert is enabled (either explicitly or due to
  INVISIBLE columns), generated columns are omitted entirely from
  the column list and values.

The server computes the generated column values automatically in
both cases.

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.
Sergei Golubchik
MDEV-35254 post-review fixes

* reduced PARSEC_ITERATIONS_MAX because PKCS5_PBKDF2_HMAC() takes
  a signed int
* instead of checking for '0'..'L' range (which includes punctuation,
  check for the valid result of base62_to_uchar()
* add a connection test with non-default parsec_iterations
Dearsh Oberoi
MDEV-35254 Make iterations count configurable in PARSEC plugin

This patch adds a global and session level plugin variable
parsec_iterations to define the number of iterations to be
used when generating the key corresponding to the password.
It has a default value, lower and upper bounds.
Dmitry Shulga
MDEV-40004: Server crashes in sp_head::register_instr_mem_root_for_deallocation upon shutdown

n shutdown server could crash in case triggers executed during server run
and some of triggers instructions were re-compiled.

The crash is caused by attempt to allocate a memory for storing pointers
on mem_roots used for memory allocation taken place on re-parsing failing
trigger's statements. The reason of crash is dereferencing of nullptr
returning by the function current_thd().

To fix the issue, use dummy THD on shutdown the table definition cache.
tdc_start_shutdown() is solely invoked from the function clean_up()
but the later is called from many places around the source code, not only
from mysql_main(), particularly clean_up() is called from unireg_abort().
Therefore, the extra argument added into the signature of the function
cleanup() to allow explicit request of use dummy THD on shutdown the table
definition cache.
Raghunandan Bhat
MDEV-39450: Memory corruption: overlapping memory ranges in `Field_longstr::compress` on UPDATE of compressed column

Problem:
  Values shorter than `column_compression_threshold` (default 100) are
  stored uncompressed. Reading such a column returns a pointer into that
  buffer rather than a copy.

  When the new value is a substring of the column that aliases this
  buffer at a non-zero offset, e.g. `RIGHT(c,n)` or `SUBSTRING(c,n)`,
  the source and destination overlap, and the `memcpy()` in the "store
  uncompressed" path copies overlapping regions, which is undefined
  behaviour.

Fix:
  Replace `memcpy` with `memmove` to avoid copying between overlapping
  memory regions.
Marko Mäkelä
MDEV-40063 Corruption due to race in SET GLOBAL innodb_log_archive=ON

There was a race condition between log_t::write_checkpoint() and
the execution of SET GLOBAL innodb_log_archive=ON (enabling log archiving).
We had wrongly allowed the concurrent execution of log_t::set_archive()
and log_t::write_checkpoint(). The result was that
log_sys.next_checkpoint_no was corrupted. This could have broken
crash recovery.

log_t::write_checkpoint(): When we are releasing log_sys.latch while
durably writing the checkpoint header block, assign log_sys.resize_log
to log_sys.log to inform other threads that a checkpoint is in progress.
Previously, we only did this when innodb_log_archive=ON holds.

log_t::resize_start(): Relax a debug assertion for the logic change.

Tested by: Matthias Leich