maria:bb-10.6-mdev-29447

Last commit made on 2023-01-03
Get this branch:
git clone -b bb-10.6-mdev-29447 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.6-mdev-29447
Repository:
lp:maria

Recent commits

0ee0fb5... by Yuchen Pei

MDEV-29447 MDEV-26285 Refactor spider_db_mbase_util::open_item_func

Porting commit 3836098c29ef1b7ff9d5fbde99b690eab73a0df1 (MDEV-26285)
to current versions 10.3+ to fix a problem (MDEV-29447) where field
items that are arguments of a func item may be used before created /
initialised.

Signed-off-by: Yuchen Pei <email address hidden>

fce80b6... by Sergei Golubchik

sporadic failures of perfschema.statement_program_concurrency

wait until all three concurrent statements are truly completely
finished before quering P_S.

In particular "Logging slow query" stage happens after sending the
OK packet but before the statement appears in events_statements_history

5e3c948... by Sergei Golubchik

MDEV-29852 SIGSEGV in mysql_create_routine or is_acl_user on 2nd execution, ASAN use-after-poison in get_current_user (sql_acl.cc)

if lex->definer is replaced, take care to restore it at the
end of PS EXECUTE

4493642... by Marko Mäkelä

MDEV-29562 fixup: ASAN global-buffer-overflow

ha_spider::create(): Pass the correct length of the argument of the
CHARSET attribute. The macro STRING_WITH_LEN() is intended to be used
with NUL terminated string constants only. Here, it would incorrectly
pass sizeof(char*)-1 as the length.

5cec834... by Marko Mäkelä

MDEV-29896: mariadb-backup --backup --incremental --throttle=... hangs

io_watching_thread(): Declare as a detachable thread, similar to
log_copying_thread().

stop_backup_threads(): Wait for both log_copying_thread and
io_watching_thread to clear their flags. Expect log_sys.mutex
to be held by the caller.

xtrabackup_backup_func(): Initialize log_copying_stop before
creating io_watching_thread. This prevents a race condition
where io_watching_thread() could wait on the condition variable
before it had been fully initialized. This race condition would
cause a hang in the GNU libc implementation of pthread_cond_destroy()
at the end of stop_backup_threads().

This race condition was introduced in
commit 38fd7b7d9170369b16ff553f01669182e70bc9b5 (MDEV-21452).

5eb545e... by Yuchen Pei

MDEV-29562 Spider table charset error should happen correctly.

When trying to create a spider table with banned charsets including
utf32, utf16, ucs2 and utf16le[1], spider should emit an error
immediately, rather than wait until a separate statement that
establishes a connection (e.g. SELECT). This also applies to ALTER
TABLE statement that changes charsets.

[1] https://mariadb.com/kb/en/server-system-variables/#character_set_client

Signed-off-by: Yuchen Pei <email address hidden>
Reviewed-by: Nayuta Yanagisawa <email address hidden>

76c2402... by Robin Newhouse <email address hidden>

Fix build failure in sanitizer on GitLab-CI

Sanitizer tests were introduced in 617f45b for GitLab CI, but started
failing on latest Fedora version with error:

    $ yum install -y /usr/lib64/libasan.so.6.0.0 /usr/lib64/libtsan.so.0.0.0 /usr/lib64/libubsan.so.1.0.0
    Last metadata expiration check: 0:00:51 ago on Fri Dec 9 20:05:01 2022.
    No match for argument: /usr/lib64/libasan.so.6.0.0
    No match for argument: /usr/lib64/libtsan.so.0.0.0
    Error: Unable to find a match: /usr/lib64/libasan.so.6.0.0 /usr/lib64/libtsan.so.0.0.0

The reason for using specific library versions is unknown. Switch to
simply using latest package versions, as is works and is likely to work
best in the long run.

Also, enclose "../rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log" in
quotes to avoid `ambiguous redirect` error when $CI_JOB_NAME has spaces.

Additionally use "needs" statements to allow tests to run immediately
after dependent jobs passed instead of waiting for the full stage to
complete.

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

0a67daa... by Marko Mäkelä

MDEV-30235 InnoDB crash on table-rebuilding DDL when the statistics tables are corrupted

commit_try_rebuild(): Only invoke trx_t::drop_table_statistics()
if both InnoDB statistics tables are accessible (and exclusively
locked by the current transaction). This avoids a crash due to
ut_a(sym_node->table != NULL) in pars_retrieve_table_def().

The crash was repeated on a partial copy of a MariaDB 10.3 data
directory that lacked the *.ibd files for the statistics tables.

4f68302... by Marko Mäkelä

Merge 10.5 into 10.6

92ff7bb... by Marko Mäkelä

MDEV-30227 [ERROR] [FATAL] InnoDB: fdatasync() returned 9

fil_space_t::flush<false>(): If the CLOSING flag is set,
the file may already have been closed, resulting in EBADF
being returned by fdatasync(). In any case, the
thread that had set the flag should take care of invoking
os_file_flush_func().

The crash occurred during the execution of FLUSH TABLES...FOR EXPORT.

Tested by: Matthias Leich