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-39382: Trace replay produces "Impossible WHERE noticed after reading const tables"

Constant table check in make_join_statistics() checks the value of
"table->file->stats.records", not table->used_stat_records. These
two values can be different.

So, make the Optimizer Context save and restore both values.
(used_stat_records was saved already, this patch also saves
table->file->stats.records).
Raghunandan Bhat
MDEV-39271: SIGSEGV in `check_word`|(`extract_date_time`|`extract_oracle_date_time`)

Problem:
  Date and time functions - `STR_TO_DATE` and `TO_DATE` (in Oracle mode)
  both use `check_word` to check if a string token matches a valid
  locale-specific day or month name. Server crashed because of an
  un-initialized typelib member(`type_lengths`) for date locales which
  are not present in `Oracle_date_locale` (e.g: `ar_DZ`).

Fix:
  Initialize `type_lengths` for all supported locales by iterating over
  `my_locales` array instead of `Oracle_date_locale` during server
  startup.
Daniel Black
MDEV-34902: debian-start erroneously reports issues

Remove the complexity of check_for_crashed_tables
by removing it all together. When check_for_crashed_tables
was written there was a desire to recover MyISAM tables.

With Aria being default from 10.4 for system tables,
and all non-MyISAM engines being able to do crash
recovery there isn't the need to autocheck as part
of a system service.

With check_for_crashed_tables removed there is no need
for a mailx package recommendation.
Kristian Nielsen
MDEV-39277: Performance regression in 12.3.0 when using legacy binlog

The flags trx->active_commit_ordered and trx->active_prepare got cleared in
trx_init() during the fast part of commit (ie. commit_ordered()). This is
too early, then the values are lost when processing reaches
trx_commit_complete_for_mysql(). This caused the MDEV-232 optimization to be
omitted, adding an extra fsync() at the end of commit when using the legacy
binlog and causing severe performance regression.

The values of trx->active_commit_ordered and trx->active_prepare must
persist to the end of commit procesing, same as trx->is_registered. This is
done in this patch, active_commit_ordered and active_prepare are cleared in
trx_deregister_from_2pc() together with trx->is_registered in
trx_deregister_from_2pc(), and asserted to be cleared when
trx->is_registered is set for a following transaction.

Signed-off-by: Kristian Nielsen <[email protected]>
Vladislav Vaintroub
Fix merge

New [ERROR] entries can now appear in error log, when dropping a
a non-existent event.
Raghunandan Bhat
MDEV-36763: Assertion failed in `Type_handler_json_common::json_type_handler_from_generic`

Problem:
  Queries with hybrid functions like `NULLIF`, `IF` and `NVL2` crashes
  because of early calls to `Item_hybrid_func_fix_attributes` added by
  the patch MDEV-36716 inside
  - `Item_func_nullif::fix_length_and_dec`
  - `Item_func_case_abbreviation2::cache_type_info()`
  to properly block `ROW` type arguments.

  Hybrid functions correctly populate `m_type_handler` member by calling
  `aggregate_for_result` prior to calling fix attributes. Since the
  return types of `NULLIF`, `IF`, etc are determined by single argument,
  `aggregate_for_result` result was not called.

  When `Item_hybrid_func_fix_attributes` was called without populating
  `m_type_handler` explicitly, a debug assert in JSON handler failed.

Fix:
  Ensure type handler is set before calling fix attribute function.
Rucha Deodhar
MDEV-39212: JSON_MERGE_PATCH depth crash

Analysis:
The crash happens because we run out of stack space

Fix:
Add a stack overflow check.
Sergei Petrunia
MDEV-39368: Print warnings for replay EXPLAINs.
SAY-5
fix occured typo in func_str.test

Signed-off-by: SAY-5 <[email protected]>
Sergei Petrunia
MDEV-39368: Do not try to replay EXPLAIN FOR CONNECTION
Raghunandan Bhat
MDEV-34951: InnoDB index corruption when renaming key name with same letter to upper case.

Problem:
  InnoDB index corruption occurs when an index is renamed to a name that
  differs only in case (e.g., 'b' to 'B'). The SQL layer uses
  case-insensitive comparison and fails to recognize the change.

Fix:
  Use case-sensitive comparison when matching index names during
  ALTER TABLE to correctly identify and handle case changes.
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().
Marko Mäkelä
MDEV-39263 innodb_snapshot_isolation fails to prevent lost updates under contention

lock_clust_rec_read_check_and_lock(): Refine the check whether
the transaction that last modified the record is still active.
The only thing that should matter is whether we are allowed to see
the record. If the implicit lock holder transaction was active and
we succeeded in acquiring the lock, this means that the transaction
had been committed. We must return DB_RECORD_CHANGED (ER_CHECKREAD)
in that case. We want to avoid returning it before the lock wait,
in case the other transaction will be rolled back.

Thanks to Vadim Tkachenko of Percona for reporting this bug,
as well as Kyle Kingsbury for the broader testing that led to this
finding. Vadim's test case was simplified by me and the root cause
analyzed with https://rr-project.org and an additional patch that
added std::this_thread::yield() at the start of
trx_t::commit_persist(). An even better spot should have been
right after the call to trx_t::commit_state().

The addition to the test innodb.lock_isolation is based on the work
by Teemu Ollakka, which was essential for refining this fix.

Reviewed by: Thirunarayanan Balathandayuthapani
Dave Gosselin
MDEV-32290: Server crashes in sub_select_cache

A query inside UNION marked uncacheable could crash during a
subsequent execution on an assertion in sub_select_cache (like when a
derived table is materialized again inside a recursive CTE) or in
join_read_first because the cleanup at the end of one execution freed
state the next execution relies on.

The cleanup decision in JOIN::join_free looked only at an individual
SELECT_LEX's uncacheable flag.  That flag does not propagate down from
the enclosing unit to sibling branches, so a UNION "branch" would be
cleaned up as if it were the only query even when the containing UNION
is certain to run it again.  Change the cleanup check to Consider the
unit's uncacheable flag (and not only the SELECT_LEX's) to keep
preserve state required on subsequent executions.
Marko Mäkelä
MDEV-39162: Remove innodb_log_file_size limit for innodb_log_archive

Let us reserve 8 bytes per checkpoint, so that we can
support the full 64-bit innodb_log_file_size.
Marko Mäkelä
Merge 12.3
Alexey Botchkov
MDEV-39210 ExtractValue/UpdateXML crash.

XML parser fixed to handle <! and <? correctly.
Marko Mäkelä
fixup! 72fe787ef57e02f53addbf078cf69ebdbd68fc84
Rucha Deodhar
MDEV-33843: Server crashes by stack-overflow with UPDATEXML

Analysis:
The stack size if insufficient and there is no stack overrun check.

Fix:
Add stack overrun check.
Alexey Botchkov
MDEV-39210 ExtractValue/UpdateXML crash.

test and a comment fixed.
Vladislav Vaintroub
Merge branch '11.8' into 12.3
SAY-5
fix occured typo in handler.cc

Signed-off-by: SAY-5 <[email protected]>
Sergei Petrunia
MDEV-39368: Refuse to run with --replay-server and --parallel
Daniel Black
MDEV-30953: Add MariaDB-server-galera (RPM) fix

The wsrep SST scripts weren't part of the server-galera
component so CPack didn't put them in the MariaDB-server-galera
package.

The previous existing per file component wasn't used so this
was simplified.
Sergei Golubchik
MDEV-39404 Gtid_log_event crash

validate xid.gtrid_length and xid.bqual_length just like XID_EVENT does
Marko Mäkelä
fixup! 8f402eb43a0c8b7997b3830016c84e3fc1f8b7ed
Alexandru Diaconu
MDEV-38792: TO_DATE: Inconsistent treatment of separators

Before this fix, TO_DATE() returned NULL when the date string
contained extra non-alphanumeric separators that were not present
in the format string. For example:

  TO_DATE('2002 - AD', 'YYYY AD')  -- returned NULL
  TO_DATE('2024---01---01', 'YYYYMMDD')  -- returned NULL

Oracle handles these cases flexibly by ignoring extra separators.

Fix: skip non-alphanumeric separators in the date string before
matching each format token. A '-' or '+' sign is preserved when
the format is SYYYY, to allow signed year parsing.

Reported-by: Elena Stepanova <[email protected]>
Signed-off-by: Alexandru Diaconu <[email protected]>
Sergei Petrunia
Remove garbage comment
Dave Gosselin
MDEV-32290: Server crashes in sub_select_cache

A query inside UNION marked uncacheable could crash during a
subsequent execution on an assertion in sub_select_cache (like when a
derived table is materialized again inside a recursive CTE) or in
join_read_first because the cleanup at the end of one execution freed
state the next execution relies on.

The cleanup decision in JOIN::join_free looked only at an individual
SELECT_LEX's uncacheable flag.  That flag does not propagate down from
the enclosing unit to sibling branches, so a UNION "branch" would be
cleaned up as if it were the only query even when the containing UNION
is certain to run it again.  Change the cleanup check to Consider the
unit's uncacheable flag (and not only the SELECT_LEX's) to keep
preserve state required on subsequent executions.
Rucha Deodhar
MDEV-39179: Incorrect NULL handling in UPDATE ... RETURNING result

Analysis:
OLD_VALUE() swapped only field->ptr, leaving null_ptr pointing to the
current record. This caused incorrect NULL results.

Fix:
Store null_ptr_old for record[1] and swap it together with ptr to
preserve correct NULL semantics.
Marko Mäkelä
Fix GCC-16 -Wmaybe-uninitialized
Daniel Black
MDEV-37197 RPM: Install PAM modules and systemd units in /usr/lib (not /lib)

Since Fedora 17 and about 2012, the directory
/lib{,64} has been a symlink to /usr/lib{,64}.

This has been verified on RHEL8, 9, 10, Fedora
, OpenEuler.

SLES1507, OpenSUSE 1506 and earlier (there is no
OpenSUSE 1507) had the old location for pam but
since their 1600 version they are now standardised.

References:
- https://fedoraproject.org/wiki/Features/UsrMove
- https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/
SAY-5
fix occured typo in sql_path.h

Signed-off-by: SAY-5 <[email protected]>
Alexey Botchkov
MDEV-15479 Empty string is erroneously allowed as a GEOMETRY column value.

Empty string disallowed.
Sergei Petrunia
MDEV-39368: Make mysql-test-run check if replay server is alive

and restart it if needed.
Sergei Golubchik
MDEV-39408 mbstream insufficient path validation

reject paths that could not have been written by mariadb-backup
Otto Kekäläinen
MDEV-37197 Deb: Install PAM modules and systemd units in /usr/lib (not /lib)

Since Fedora 17 and about 2012, the directory /lib has been a symlink to
/usr/lib. Debian started a similar migration in 2019. Nowadays all major
Linux distributions have a merged /usr, and the canonical location for
files should be /usr/lib instead of just /lib.

The location of PAM modules and systemd files is the last remaining
`*_DEB` variables should fully complete the usr merge migration.

Additionally re-applied `debputy reformat --style=black` to get files
sorted in a standardized order.

References:
- https://fedoraproject.org/wiki/Features/UsrMove
- https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#a-merged-usr-is-now-required
- https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/
Alexey Yurchenko
MDEV-38787 wsrep_slave_fk_checks=OFF results in inconsistency
Since ATM wsrep does not replicate any cascaded changes (because they are
not binlogged in the upstream code) we have to rely on foreign checks on
replicas to reproduce the cascade. Thus setting wsrep_slave_fk_checks=OFF
will result in inconsistency in any setup where there are cascading relations.
Mark this option as deprecated and make it a NOOP.
Aleksey Midenkov
MDEV-36362 MariaDB crashes when parsing fuzzer generated PARTITION

Function calls in INTERVAL expression of DDL have little
sense. SETVAL() fails because sequences require opened tables and
vers_set_interval() is called at earlier stage.

The fix throws ER_SUBQUERIES_NOT_SUPPORTED for sequence functions
SETVAL(), NEXTVAL(), LASTVAL() when the context does not allow
subselect (determined by clause_that_disallows_subselect).