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
drrtuy
fix: fix stack size warning.
Fariha Shaikh
MDEV-39153 Fix sporadic main.change_master_default mismatch

The test used "restart_abort:" in the expect file, which MTR never
recognized. It fell through to the else branch, deleted restart_opts,
and started the server with defaults (heartbeat_period=60 instead of 0).

Replace restart_abort with direct --exec $MYSQLD calls.

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.
Aleksey Midenkov
WITHOUT_ABI_CHECK followup

Followup for b337e14440b as info_src takes time too.
info_src does not make much sense without ABI check.
Kristian Nielsen
Fix locking bug around rpl_binlog_state::find_most_recent().

The rpl_binlog_state::find_most_recent() returned an rpl_gtid* pointing into
internal memory of the rpl_binlog_state object that could change anytime
after returning from the function, potentially having the caller read
invalid data.

Fix by instead copying the rpl_gtid value out into caller-supplied memory.

Signed-off-by: Kristian Nielsen <[email protected]>
forkfun
Merge branch '11.4' into '11.8'
Alexander Barkov
MDEV-40009 SIGSEGV in Sql_path::from_text

Problem:
- The string passed to Sql_path::from_text() could be in
  various character sets, returned by Item::val_str_ascii(),
  which is not necessarily utf8mb3.
- While the code in Sql_path::from_text() was written in the way
  that "str" was considered to be in utf8mb3.
- As as result, cs->charset() in this line:
    auto len = cs->charlen(curr, end);
  could return a negative value and the whole loop got stuck.

Changes:
- Fixing Sys_var_path::from_item() to use val_str() instead of val_str_ascii(),
  to get the original value from "item", without any conversion.
- Moving the conversion code inside Sql_path::from_text().
Daniel Black
MDEV-35738 mariadb build -fsanitize=pointer-compare

invalid pointer pairs are when the length/memory of one string are
intermixed with another.

For comp_err, the end null pointer was compared to soffset within
my_strtoll10. As we didn't need the end position a NULL arg option
was compatble.

For uca-dump, Address Sanitizer raises invalid pointer pair because
argv options (opt) don't have an obvious correlation of having a start
at opt_X.length, even though the lstrncmp makes this true.

The DBUG_ASSERTS of strmov (added MDEV-11752) where incompatible with
pointer-compare. Replaced strmov with static inline version in
m_string.h using memmove that allows overlaps, and being inline allows
the uneeded parts of the implementation to be optimized away.
Daniel Black
MDEV-40488 disable connect.odbc_sqlite3 test on ASAN

Leak appears in libltdl which is opened by the unixodbc
driver. There doesn't appear to any mishandling at the
ODBC level of the connect storage engine.
Sergei Golubchik
MDEV-36147 MariaDB cannot open page-compressed InnoDB tables at startup if innodb_compression_algorithm other than zlib is specified

When innodb_compression_algorithm is set to a non-zlib algorithm (e.g.
lz4) and the provider plugin is loaded from mysql.plugin rather than
command line, InnoDB failed to start because it checked for the provider
at plugin initialization time, before plugin_load() reads mysql.plugin.

Fix:
* InnoDB returns HA_ERR_RETRY_INIT when the compression provider is
  missing.
* In sql_plugin.cc, the retry loop is changed to not reap until
  mysql.plugin has been loaded

Assisted-By: Claude:claude-4.6-sonnet
Aleksey Midenkov
MDEV-39063 Server crashes at Item_func_lastval and Item_func_setval with CTE alias

Pure aliases are not handled properly by Item_func_lastval::val_int()
and Item_func_setval::val_int().

This is followup fix for MDEV-33985 where it missed similar cases for
LASTVAL() and SETVAL().

add_table_to_list() does not create MDL request for pure aliases,
i.e. when there is no table_list->db set or TL_OPTION_ALIAS was
set. When the expression is not inside CTE the case with empty db is
handled by:

  else if (!lex->with_cte_resolution && lex->copy_db_to(&db))
    DBUG_RETURN(0);

So, table_list gets current database name and the query is failed with
ER_NO_SUCH_TABLE error.

The fix adds the case of is_pure_alias() check for val_int() methods
and fails it with ER_NOT_SEQUENCE2 error.

Note: semantics for TL_OPTION_ALIAS cannot be based on empty db, only
parser can set TL_OPTION_ALIAS as resolve_references_to_cte() relies
on TL_OPTION_ALIAS after copy_db_to().
drrtuy
fix: extra try-catch during plugin init.
Sergei Golubchik
MDEV-37840 Server crashes when executing FLUSH PRIVILEGES after starting with skip-grant-tables and creating mysql.host table

hash_filo's mutex was lazily initialized in clear(), but grant_reload()
locks acl_cache->lock without first calling clear(). With
--skip-grant-tables, acl_cache is created but clear() is never called
(acl_reload() skips it on error), leaving the mutex uninitialized.

Fix: initialize the mutex eagerly in the hash_filo constructor and
remove the now-redundant init flag.

Assisted-By: Claude:claude-4.6-sonnet
Alexander Barkov
MDEV-40790 SELECT INTO row_type_of.field crashes the server

The server crashed on DBUG_ASSERT on a SELECT into:
- a `ROW TYPE OF table1` field variable
- a `ROW TYPE OF cursor1` field variable

Fix:

- Adding a class my_var_sp_row_field_by_name
- Adding a method sp_rcontext::set_variable_row_field_by_name()
- Fixing the DBUG_ASSERT
ParadoxV5
Test for MDEV-39788

MDEV-39788 found that the recent refactor on the `main` (now 12.3)
branch missed the (inconsistent) detail that, unlike `relay-log.info`,
`master.info`’s line count _includes_ the line-count line itself.

This commit extends and simplifies the test
`rpl.rpl_read_new_relay_log_info` to `main.rpl_new_info` so it
* Checks this detail to remind future changes of this type of mistake.
* Covers `@@master_info` as well.
* Covers the refactor’s buggy format as a downgrade/revert test.

While here, this commit also includes a new-format version
of MDEV-38020’s test to double as the value read check.

Reviewed-by: Brandon Nesterenko <[email protected]>
forkfun
MDEV-39522 Query with UNION fails in Oracle sql_mode with ER_BAD_FIELD_ERROR/ER_UNKNOWN_TABLE

MDEV-37325 unconditionally wrapped union subqueries in derived tables,
breaking name resolution of outer-scope/correlated references inside
the unions (producing ER_UNKNOWN_TABLE errors).

Delay the wrap until a following operator has a different linkage.
In Oracle mode all set operators share one priority and bind
left-to-right, so wrapping the accumulated prefix on each operator
change enforces it. This also corrects the row multiplicity of mixed
set operations toward left-to-right order.

create_priority_nest(): when the nest covers the whole prefix, point
the wrapper's first_nested at itself. Cut the prefix with
cut_next() before wrapping and re-register it on the outer unit;

Aleksey Midenkov:

In Oracle mode optimize_bag_operation() returns early, so union_distinct is
never recomputed and the stale value reaches execution.
Register the wrapper first, then run fix_distinct(): reset_distinct() now
scans the new outer chain (the wrapper alone) and correctly leaves
union_distinct NULL; a following DISTINCT operand re-establishes it.
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
Alexander Barkov
MDEV-40639 Open SYS_REFCURSOR crash, if many cursors inside a function

Problem:

If:
- A routine A() opened a SYS_REFCURSOR with a function B() in the SELECT list
- The function B() also opened some SYS_REFCURSORs

Then reallocation of the cursor array THD::m_statement_cursors could happen
during the execution of B(), so all sp_cursor_array_element pointers inside
sp_instr_copen_by_ref::exec_core() of routine A() became invalid.

Fix:

Chaging the data type of sp_cursor_array:
- from Dynamic_array<sp_cursor_array_element>
- to Dynamic_array<sp_cursor_array_element*>

So now only reallocations of the array of cursor pointers happen,
while sp_cursor_array_element instances always stay on their originally
allocated memory positions.

Note:
sp_cursor_array_element instances are allocated using the standart C++ "new"
and deleted using the standard C++ "delete". Using a MEM_ROOT does not
seem to be relevant here.
ParadoxV5
MDEV-39788: Remove added line in `master.info` format

The line-count lines in `master.info` and `relay-log.info`
have been inconsistent (off by one) since their introduction.
MDEV-37530 “fixed” this with its common code merger by chance,
changing `master.info` to use `relay-log.info`’s line-count definition.
This change, howëver, affected backward compatibility,
as `master.info` now expects an ignored MySQL-only line
where the first `key=value` option, `master_use_gtid`, is.

Since this legacy text-based format has limitations that make
it due for replacement, only code reüsablility is valuable,
and its consistency does not outweigh its compatibility.
Therefore, this commit solves this problem without reverting code by:
* Changing the writing code to be compatible with both interpretations
  (albeit inconsistent with the reading code)
* Adding a shim entry to `master.info`’s list
  to emulate prior versions’ reading behaviour
  * Although this solution can only restore upgrade compatibility with
    versions 10.0+, versions before MariaDB 10 have long been EOL.

While here, this commit also fixes code and
comments that contradict the actual effect.

[P.S.] The test for this regression is pushed to 10.11 in PR #5147.

Reviewed-by: Brandon Nesterenko <[email protected]>
Daniel Black
MDEV-40414 Server crash in Charset::charset upon JSON operations

JSON_EQUALS didn't check that ::val_str() of its arguments
where not-null before attempting to test their equality.

JSON_OVERLAPS also ensure that ::val_json() isn't null.
Fariha Shaikh
MDEV-39459 Fix bad sync pattern for chain replication MTR tests

In chain replication (1->2->3), syncing only server_3 after
save_master_gtid on server_1 does not guarantee server_2 has committed,
because server_2's binlog dump thread can send events to server_3 before
commit_ordered() completes on server_2.

Fix affected rpl tests by syncing server_2 before server_3, and update
result files accordingly.

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.
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
Remove no_valgrind_without_big.inc from *C* include dir

The identical file is in mysql-test/include where it is used.
drrtuy
fix: MDEV-40452 ASAN builds complain about enourmous stack consumption b/c of the reference pointer used for stack usage calculations.
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.
Andrei Elkin
MDEV-40824 slave_run_triggers_for_rbr enabled slave ignores after-insert trigger's error

MDEV-15990 commit did not handle after-trigger error on
slave_run_triggers_for_rbr slave server.
That made an error from such failing trigger lost.

The reason was a flaw in new logics coded for
Write_rows_log_event::write_row().

It is amended now. For any sql error out of the after-trigger
HA_ERR_GENERIC handler error code is returned instead of zero. That
error-stops serial slave as expected (also by pre-MDEV-15990 code).
Optimistic parallel slave may retry, contingent upon the trigger's sql error.

Note: idempotent-mode tolerance of trigger-internal errors and
the per-row last_errno reset are left for a follow-up.
Aleksey Midenkov
MDEV-38854 Assertion table->vers_write fails upon ODKU into table with versioned column

In MDEV-25644 vers_check_update() sets vers_write to false in case it
returns false. It is ok for UPDATE but is not correct for ODKU is bulk
insert requires vers_write on next tuple.

The fix return vers_write value back when vers_check_update() and
related vers_insert_history_row() are done in ODKU.
drrtuy
fix: clean DeltaAppender after at rollback or disconnect.
Alexey (Holyfoot) Botchkov
MDEV-39654 No warning after CAST( AS xmltype).

Warning added.
Mohammad Tafzeel Shams
MDEV-39800: Assertion `!(mode & 2048U) || (mode & 512U) || is_supremum' failed

ISSUE:

Lock bypassing optimization allows an X-lock request to skip
waiting locks when the requesting transaction already holds an
S-lock on the same record. This optimization is designed for
regular B-tree record locks that use heap-number-based conflict
detection.

Spatial index predicate locks use different semantics. They
perform MBR (Minimum Bounding Rectangle) overlap checks for
conflict detection and must not participate in bypass
optimization.

The assertion failure occurred because predicate insert
intention locks is not considered inside lock bypass code,
which assumed all insert intention locks must be either gap
locks or on the supremum record (MDEV-34877).

ut_ad(!(insert_intention) || (gap) || is_supremum)

Additionally, predicate locks could incorrectly enable
bypass_mode because the existing checks did not explicitly
exclude LOCK_PREDICATE locks.

FIX:

- lock_t::is_predicate(): Add a helper to identify spatial
  index locks.

- lock_t::can_be_bypassed(): Return false for predicate
  locks.

- lock_rec_has_to_wait_in_queue(): Update the assertion to
  allow predicate insert intention locks. Also add a
  !is_predicate() check to bypass_mode calculation.

- lock_rec_queue_validate_bypass(): Add an early return to
  skip bypass validation for predicate locks.
drrtuy
chore: renaming, extra docs and bump DuckDB to gamma.
Georgi (Joro) Kodinov
MDEV-40661: mysql_upgrade.test not stable on a busy server

The cleanup of the old connection goes on in the background.
It can take longer on a busy server and this triggers the active sessions
warning in DROP user.
Stablizied the test by disabling the warnings.
forkfun
Merge branch '11.8' into '12.3'
Kristian Nielsen
MDEV-40729: Refactor my_xid to be a struct with the full data

This is a refactoring commit in preparation for changing the internal XID
used for binlog two-phase commit and recovery.

The existing internal XID consists of server_id (4 bytes) and query_id (8
bytes). But the existing code only puts the query_id into the my_xid
datatype, leaving the server_id implicit in the parts of the code that pass
around my_xid, thus hard-wiring to the server_id global value.

This commit changes my_xid to be a struct containing conn_id and commit_id,
to match what will be used in MDEV-40729 where these constitute a
transaction id shared between the server and the client.

To clearly distinguish the refactor-only changes from changes in logic, this
commit only changes the code to pass around two-value my_xid explicitly, but
preserves the existing (server_id, query_id) values in internal XID. It maps
server_id to commit_id, and query_id to conn_id.

An empty / dummy my_xid is used with the value 0 in a couple of places in
the existing code; this is replaced with a my_xid with commit_id==0. This
will not conflict with real XID, as server_id cannot be 0, and in MDEV-40729
the commit_id will start at 1.

Signed-off-by: Kristian Nielsen <[email protected]>
Alexey (Holyfoot) Botchkov
MDEV-39683 Numeric aggregates should end up with an error for xmltype.

Appropriate xxx_fix_length_and_dec() added to the Type_handler_xmltype.
Prathamesh Hukkeri
MDEV-40122: `+DEFAULT` is not a valid value for master_heartbeat_period

MDEV-28302 changed the grammar for master_heartbeat_period to accept
DEFAULT (via num_or_default), while MDEV-38454 added an opt_plus to
allow numeric values with an explicit `+` sign.  The combination made
the rule `opt_plus num_or_default`, which also accepted `+DEFAULT`,
equivalent to `= DEFAULT`.

Move the opt_plus under num_or_default's definition, so that `+` may
only precede a numeric literal, and DEFAULT is a separate alternative.
Now `master_heartbeat_period= +DEFAULT` is a syntax error again, while
`= +45` and `= DEFAULT` are both accepted.
Sergei Petrunia
MDEV-40738: main.cte_update_delete missing DROP VIEW v1, refers to wrong MDEVs.

Fix the testcase.
drrtuy
chore: DuckDB build.sh exposes build with ASAN flag.
forkfun
Merge branch '10.11' into '11.4'
Daniel Black
MDEV-39113 MSAN/ADDR addr2line stack resolver detrimental

MSAN/ASAN test environment, the addr2line was so high in memory
utilization that it was the pick of the OOM killer to resolve the OOM
situation. Once this occurred there wasn't a saved core or gdb backtrace
of the core to resolve the issue.

To resolve this, make stack-trace default to 0 (off) for the addr2line
base implementation under memory sanitizer and address sanitizer.

MariaDB-backup also forces the enabling of stack-trace. Disabling this
unconditionally reduces the risk of a user operational impact if a
lengthy stack trace starting in a mariadb-backup critical locked period.

The mysqld--help test now excludes the stack-trace as its result is
environment dependant. The "Defaults to..." output for suppressed
variables, currently only stack-trace, is excluded.

Since thread-stack is an excluded varable, the ubsan/asan exclusions
from commits dfa6fba9595a and dfa6fba9595a aren't required.
Mohammad Tafzeel Shams
MDEV-40504: Fix memory leak in mariabackup incremental copy

ibx_copy_incremental_over_full() : Replace die() with
proper error handling to avoid memory leaks when RocksDB
backup directory operations fail.