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
fix sporadic galera test failures

* query @@datadir before audit is enabled, not directly before reading
  the log. just in case cat gets the log before SELECT is flushed.
* wait for a table to be dropped
Sergei Golubchik
MDEV-31024 Server crash / ASAN use-after-poison in Binary_string::free_buffer / Item_func_sformat::~Item_func_sformat

re-allocate Item_func_sformat::val_arg in shallow_copy()
to keep it in the same memroot as the item.
Rucha Deodhar
MDEV-36653: main.mysql_upgrade-28915 test case timeout

Analysis:
Leaving 'event_scheduler=ON' with a 1-second interval creates a background
loop that constantly hits mysql.event with MDL_SHARED_WRITE locks.

Fix:
Turn 'GLOBAL event_scheduler=OFF' right before running upgrade. This drains
the background worker threads and drops the shared locks so the
upgrade can acquire its exclusive lock and finish instantly.
Sergei Golubchik
MDEV-23486 RBR can bypass secure_timestamp=YES

Add tests for system versioning.
INSERT is fixed, but UPDATE is still broken.
Sergei Golubchik
Revert "MDEV-17677: Keywords followed by .number parsed as identifiers"

This reverts commit 895b28d6721eadfad0d47723fcc949eae75cf8cf.
Sergei Golubchik
MDEV-39654 schema-qualified unquoted table name starting with digit fails to parse

add 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. Store all the non-numeric values in HEX, when using REPLACE INTO
  statement.
2. Instead of storing only the column values that were projected in the
  query, store all the column values into the recorded REPLACE INTO
  statement.

Implementation details: -
1. Modify the format_and_store_row() method in filesort.cc, to accept an
  argument that tells whether to store non-numeric vales in hex or the
  default string type. The value of new argument is by default false,
  but is set to TRUE, when recording a const row for base tables.
  The default value of FALSE is used when mysql.[table|column|index]_stats
  table is used in the REPLACE INTO statement.
2. From join_read_const(), and join_read_system() methods in sql_select.cc,
  re-read the const row for all the fields in the table. After the row
  is read, restore the table->read_set to the value that was before.
Rex Johnston
MDEV-17846 Wrong result with grouping select from merged derived table

When a grouping select referring to a derived table has an outer
reference within it's select list, that outer reference isn't
properly fixed.  It isn't added to
outer_context->select_lex->inner_refs_list for later resolution during
JOIN::prepare.  As it is not fixed, the Item pointer arrays associated
with the temporary table filled during the join process are now incorrect
and we end up with an incorrect join->outer_ref_cond evaluation and
potentially a wrong result.
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.
Sergei Golubchik
.gitignore plugin/auth_pam/testing/mariadb_mtr
Sergei Golubchik
MDEV-39821 heap-use-after-free in heap_rnext with tree indexes

heap_update() forgot to update key_changed
Rucha Deodhar
MDEV-23500: Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())'
failed in Diagnostics_area::set_ok_status upon multi-table update

Analysis:
When NULL field from internal temporary table is copied to
NOT-NULL so there is error about truncation  but this error is not
reported so we get the failure.

Fix:
Return the error state.
Sergei Golubchik
fix sporadic galera test failures

* query @@datadir before audit is enabled, not directly before reading
  the log. just in case cat gets the log before SELECT is flushed.
* wait for a table to be dropped
Sergei Golubchik
cleanup: only include my_compare.h into heap code as needed

to avoid name conflict on `get_key_length`
Sergei Golubchik
MDEV-28743 Roles without grants are handled wrong

In propagate_role_grants_action() (called by grant_reload() on startup
and FLUSH PRIVILEGES), role privilege merging uses a counter-based
bottom-up ordering: each role's counter tracks how many of its granted
sub-roles still need to be processed, and merge_role_privileges() merges
a role only once its counter reaches zero.

The bug: when an intermediate role such as org_role_1 (which inherits
only from a USAGE-only app_role_1) was merged with no privilege changes,
merge_role_privileges() returned 1 as an optimisation to stop upward
traversal.  This prevented the traversal from ever reaching user_role_1
to decrement its counter.  A second leaf traversal (from app_role_2)
could decrement user_role_1's counter only once, leaving it at 1
instead of 0, so user_role_1 was never merged and had no effective
privileges.

The "stop if nothing changed" optimisation is valid for incremental
propagate_role_grants() calls (after a single GRANT/REVOKE), where
every ancestor was already correctly merged.  It is not valid for the
full-reload case, where the counters must be decremented by every leaf
traversal to guarantee correct bottom-up ordering.

Fix: add an initial_load flag to PRIVS_TO_MERGE.  When set (only in
propagate_role_grants_action), the early-stop optimisation is disabled
so traversals always visit all ancestors.

Assisted-By: Claude:claude-4.6-sonnet
Sergei Golubchik
MDEV-40337 store user vars in a dedicated memroot

user_var_entry objects and their names have a connection lifetime,
they exist until the connection ends (or is reset), and then they're
all deleted at once. This is exactly the use case for MEM_ROOT,
let's store them there.

Additionally, let's set MY_ROOT_USE_MPROTECT flag to keep this memroot
off the general heap where user_var_entry values are stored
and where heap buffer overflows can happen.

The latter makes memory allocations for the MEM_ROOT about 10x more
expensive, so let's always start with an empty memroot (= zero overhead
if no user variables are used) and on THD cleanup let's retain one
memroot block (= zero overhead if the next connection takes THD from the
cache and uses user variables up to one block size).

Assisted-By: Claude:claude-4.8-opus
Sergei Golubchik
cleanup: get_item_copy<>(item)

make get_item_copy<T>(item) return T* not a generic Item*
helps to avoid casts when a copy needs to be fixed before returning.
Sergei Golubchik
MDEV-26910 mysqld_multi starts same instance multiple times with the risk to crash database

a group name may be present in a file more than once.
use hash to deduplicate.
Sergei Golubchik
MDEV-37951 SHOW TABLES allows users with only GRANT OPTION privilege to read all table names in the database "mysql"

GRANT_ACL bleeds into thd->col_access via check_access()'s
"*save_priv |= db_access" path (db_access inherits master_access).
Two guards that relied on the absence of any privilege bit then
failed to treat GRANT_ACL as exceptional:

1. check_show_access() (sql_parse.cc): the fallback
  "!col_access && check_grant_db()" was bypassed when col_access
  held only GRANT_ACL, letting a global-GRANT-OPTION user pass the
  outer gate for SHOW TABLES / SHOW TABLE STATUS / SHOW TRIGGERS.
  Fix: use !(col_access & ~GRANT_ACL) so any real privilege still
  bypasses check_grant_db while GRANT_ACL alone does not.

2. get_all_tables() (sql_show.cc): the per-table shortcut
  "!(col_access & TABLE_ACLS)" was taken for col_access == GRANT_ACL
  because GRANT_ACL is part of TABLE_ACLS, skipping per-table checks
  and exposing all table names.
  Fix: use TABLE_ACLS & ~GRANT_ACL so that only genuine table-access
  bits suppress the per-table privilege check.

Assisted-By: Claude:claude-4.6-sonnet
Sergei Golubchik
MDEV-40341 store read-only sysvars in a read-only root

Store all READ_ONLY sysvar values in the read_only_root

Even though READ_ONLY sysvars are protected, for string variables
it usually means that the pointer cannot be changed. The value it
points to - the string itself - still can be. Let's store all
values of string READ_ONLY sysvars in the read_only_root.

sysvars that point directly into argv are copied to read_only_root.
sysvars that have their values calculated and allocated now
must be explicitly marked with PREALLOCATED to let it know they
have to be free()-d.

Assisted-By: Claude:claude-4.8-opus
Rex Johnston
MDEV-17846 Wrong result with grouping select from merged derived table

When a grouping select referring to a derived table has an outer
reference within it's select list, that outer reference isn't
properly fixed.  It isn't added to
outer_context->select_lex->inner_refs_list for later resolution during
JOIN::prepare.  As it is not fixed, the Item pointer arrays associated
with the temporary table filled during the join process are now incorrect
and we end up with an incorrect join->outer_ref_cond evaluation and
potentially a wrong result.
Sergei Golubchik
cleanup: get_item_copy<>(item)

make get_item_copy<T>(item) return T* not a generic Item*
helps to avoid casts when a copy needs to be fixed before returning.
Sergei Golubchik
MDEV-23486 RBR can bypass secure_timestamp=YES

fix TIMESTAMP DEFAULT NOW() and ON UPDATE NOW()

Caveat: rbr cannot work without an index - if the slave overwrites
timestamp columns, before-image won't match in full, this is expected.
Sergei Golubchik
UBSAN warning:

sql/table.h:237:16: runtime error: load of value 4, which is not a valid value for type 'bool'

the warning was about uninitialized `bool in_field_list`
let's initialize the whole ORDER when it's allocated.
Sergei Golubchik
MDEV-40413 ALTER TABLE ... CONVERT ... PARTITION doesn't encode partition names

CONVERT ... PARTITION passed user-specified partition names to
create_partition_name() with translate=FALSE, so names needing
filename escaping (e.g. `foo-bar`) didn't match the on-disk file.
Pass TRUE to encode them.
Sergei Golubchik
MDEV-39363 Logical Bug in `NOT ( ... XOR ... )` Evaluation with Implicit Type Conversion

for 0.1f val_int() is 0, val_bool() is 1.
Sergei Golubchik
MDEV-24598 Duplicate CHECK constraint names are allowed

Column-level CHECK constraints derive their effective name from the column's
field name when read from frm (name_length=0 fallback in
init_from_binary_frm_image). An explicit table-level constraint with the same
name as a column that carries a column-level check creates a duplicate in
information_schema.check_constraints.

Two cases:
1. CREATE TABLE t (a INT CHECK (a>2), CONSTRAINT a CHECK (a<5)) -- both
  end up named "a".
2. JSON columns auto-receive a JSON_VALID column check named after the field.
  CREATE TABLE t (json_c1 JSON, CONSTRAINT json_c1 CHECK (...)) produces
  a duplicate "json_c1".

Fix in mysql_prepare_create_table_finalize: when validating explicit
table-level constraint names, also check them against field names of columns
that carry column-level check constraints (ER_DUP_CONSTRAINT_NAME).

Fix in make_unique_constraint_name / fix_constraints_names: pass the column
list so that auto-generated names (CONSTRAINT_1, CONSTRAINT_2, ...) skip
names already taken by column-level checks.

Update check_constraint.test: the MDEV-16630 test relied on the now-rejected
duplicate (column check "b" + table constraint "b"). Rename the table-level
constraint to "b_and_a" to preserve the intent: verifying that field
constraints and table constraints produce distinct error-message formats.

Assisted-By: Claude:claude-4.6-sonnet
Sergei Golubchik
MDEV-40341 store read-only sysvars in a read-only segment

Protect all READ_ONLY sysvars from run-time changes.

Put them into a separate ELF section with a special attribute
and mprotect() this section after the server is fully initialized.

Verify that they're all protected in the sys_var constructor.

One exception: opt_noacl (--skip-grant-tables) can be changed
from 1 to 0 on FLUSH PRIVILEGES. Let's briefly drop the
protection for this 1->0 change. It can be needed only once
in a server lifetime and only if it was started with --skip-grant-tables

On shutdown the protection is removed, making variables writable
again because shutdown resets some of them during the cleanup

Assisted-By: Claude:claude-4.8-opus
Sergei Golubchik
MDEV-26910 mysqld_multi starts same instance multiple times with the risk to crash database

a group name may be present in a file more than once.
use hash to deduplicate.
Sergei Golubchik
MDEV-25813 ASAN errors in err_conv / field_unpack upon multi-UPDATE causing ER_DUP_ENTRY

InnoDB always frees allocated in record[0] blobs even
when reading into record[1].
Let's read into record[0] for consistency.
Sergei Golubchik
MDEV-25813 ASAN errors in err_conv / field_unpack upon multi-UPDATE causing ER_DUP_ENTRY

InnoDB always frees allocated in record[0] blobs even
when reading into record[1].
Let's read into record[0] for consistency.
Daniel Black
tst
Sergei Golubchik
UBSAN warning:

sql/table.h:237:16: runtime error: load of value 4, which is not a valid value for type 'bool'

the warning was about uninitialized `bool in_field_list`
let's initialize the whole ORDER when it's allocated.
Sergei Golubchik
MDEV-40186 MEMORY tables incorrectly restart index scan on DELETE

remember the last found key and restart the search (if needed)
from it not from the original one.
Sergei Golubchik
MDEV-40411 SFORMAT ignores max_allowed_packet

do our own allocator that implements std::allocator interface
but uses our memory accounting (my_malloc) and limits max allocation
(e.g. to max_allowed_packet).

use it for fmt::vformat_to.
later can be used for various std:: stuff too.
Sergei Golubchik
apply reasonable limits to initid.max_length as provided by UDF

UDF can set max_length incorrectly, e.g. to 2138 for an integer.
let's cap UDF-provided value by a type-specific limit.
Sergei Golubchik
MDEV-30555 The server does not detect changes in NULL-ability of system table columns

Table_check_intact::check() validated column names, types, and charsets but
not NULL-ability. Altering a system table column (e.g. mysql.proc.definer)
to drop NOT NULL would pass the check undetected, silently corrupting data
stored through that column.

Add a CAN_BE_NULL flag bit in the high bit of TABLE_FIELD_TYPE::type.length.
Set it on nullable column entries; the check now validates nullability in both
directions. NOT NULL columns need no annotation (the common case). The flag
is encoded as `{ STRING_WITH_LEN("type") + CAN_BE_NULL }` which keeps the
intent readable at the definition site.

Apply CAN_BE_NULL annotations to all TABLE_FIELD_TYPE arrays:
mysql.proc, mysql.event, mysql.table_stats, mysql.column_stats,
mysql.index_stats.

Assisted-By: Claude:claude-4.6-sonnet
Sergei Golubchik
MDEV-31024 Server crash / ASAN use-after-poison in Binary_string::free_buffer / Item_func_sformat::~Item_func_sformat

re-allocate Item_func_sformat::val_arg in shallow_copy()
to keep it in the same memroot as the item.
Sergei Golubchik
MDEV-40425 handlersocket crashes on read with huge number of fields

* fix handlersocket to unlink it's THD, this apparently was broken
  for years
* add a check for fldnum
* add a first ever handlersocket test
Sergei Golubchik
MDEV-39318 some MTR tests fail with --ssl

* many test expected error 2013 (CR_SERVER_LOST)
  they should also expect 2026 (CR_SSL_CONNECTION_ERROR)
* some test --connect and expect a specific pre-auth error,
  they should use NOSSL option
* some tests start with invalid certificate - they work because
  mariadb-test doesn't connect with ssl by default. With --ssl
  it does and simply cannot connect. These tests use include/not_ssl.inc
* ssl_cipher restarts the server internally with invalid cipher.
  it should reconnect the default connection without SSL, otherwise
  mariadb-test will fail to connect after server is restarted
* tests that print ssl status without forcing it first - shouldn't,
  they don't know whether ssl is enabled or not.
* some perfschema tests are socket-specific and use include/not_ssl.inc
* perfschema status tables had too small column for ssl_ciphers value.
  Fixed as in f34afeaf6b83 (MDEV-39318)