maria:st-10.6-MDEV-29575-is_crash

Last commit made on 2022-10-03
Get this branch:
git clone -b st-10.6-MDEV-29575-is_crash https://git.launchpad.net/maria

Branch merges

Branch information

Name:
st-10.6-MDEV-29575-is_crash
Repository:
lp:maria

Recent commits

0f65166... by Vlad Lesin

MDEV-29575 Access to innodb_trx, innodb_locks and innodb_lock_waits along with detached XA's can cause SIGSEGV

trx->mysql_thd can be zeroed-out between thd_get_thread_id() and
thd_query_safe() calls in fill_trx_row(). trx_disconnect_prepared()
zeroes out trx->mysql_thd. And this can cause null pointer dereferencing
in fill_trx_row().

fill_trx_row() is invoked from fetch_data_into_cache(), which, in turns,
iterates transactions with trx_sys.trx_list.for_each() function, which
holds trx_sys.trx_list.mutex during the iteration.

Bug fix is in reseting trx_t::mysql_thd in trx_disconnect_prepared()
under trx_sys.trx_list.mutex lock.

MTR test case can't be created for the fix, as we need to wait for
trx_t::mysql_thd reseting in fill_trx_row() after trx_t::mysql_thd was
checked for null while trx_sys.trx_list.mutex is held. But
trx_t::mysql_thd must be reset in trx_disconnect_prepared() under
trx_sys.trx_list.mutex. There will be deadlock.

900d7bf... by Sergei Golubchik

Merge branch '10.5' into 10.6

3a21162... by Sergei Golubchik

Merge branch '10.4' into 10.5

d4f6d2f... by Sergei Golubchik

Merge branch '10.3' into 10.4

dd8833b... by Sergei Golubchik

cleanup: suppress rocksdb compilation warning, fix a comment

fa6d7e4... by Sergei Golubchik

compilation error

extended initializers are only allowed since c++11

2ab52cc... by Sergei Golubchik

update the test after merge

after d7d3ad698abd debug_sync waits are no longer interrupted by
soft kills that server shutdown is using. Luckily in this test
there's no need to wait, it wants the commit to be properly completed,
fully committed in both engines.

3744b8a... by Alexander Barkov

MDEV-20760 Add Type_handler::KEY_pack_flags()

Backporting from 10.5 to 10.4

This is needed to fix MDEV-28727 easier.

194cc36... by Sergei Golubchik

Merge branch '10.5' into 10.6

f65ba9a... by Oleksandr "Sanja" Byelkin

MDEV-17124: mariadb 10.1.34, views and prepared statements: ERROR 1615 (HY000): Prepared statement needs to be re-prepared

The problem is that if table definition cache (TDC) is full of real tables
which are in tables cache, view definition can not stay there so will be
removed by its own underlying tables.
In situation above old mechanism of detection matching definition in PS
and current version always require reprepare and so prevent executing
the PS.

One work around is to increase TDC, other - improve version check for
views/triggers (which is done here). Now in suspicious cases we check:
 - timestamp (microseconds) of the view to be sure that version really
   have changed;
 - time (microseconds) of creation of a trigger related to time
   (microseconds) of statement preparation.