<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/mariadb-git.git/sql/sql_class.cc, branch 10.2-MDEV-25114</title>
<subtitle>github.com: MariaDB/server.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/'/>
<entry>
<title>MDEV-24114 : Crash: WSREP: invalid state ROLLED_BACK (FATAL)</title>
<updated>2021-08-16T12:48:53+00:00</updated>
<author>
<name>Jan Lindström</name>
<email>jan.lindstrom@mariadb.com</email>
</author>
<published>2021-08-03T04:00:34+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=2736e9054e9d9ddddba931f57966e44a0cedd0c7'/>
<id>2736e9054e9d9ddddba931f57966e44a0cedd0c7</id>
<content type='text'>
Reverts fix for MDEV-23328 i.e. commit 29bbcac0ee841

In this fix we try to modify normal SQL KILL in a following way:

trx_id= thd_to_trx(victim_thd)-&gt;id;
mutex_unlock(victim_thd-&gt;LOCK_thd_data);
mutex_unlock(victim_thd-&gt;LOCK_thd_kill);
lock_mutex_enter
trx=find_and_lock_trx_by_id(trx_id)
mytex_lock(trx-&gt;mysql_thd-&gt;LOCK_thd_kill);
mutex_lock(trx-&gt;mysql_thd-&gt;LOCK_thd_data)

For THD::awake() we use:

mutex_lock(thd-&gt;LOCK_thd_kill);
mutex_lock(thd-&gt;LOCK_thd_data);
thd-&gt;awake();
mutex_unlock(thd-&gt;LOCK_thd_data);
mutex_unlock(thd-&gt;LOCK_thd_kill);

For THD::set_killed in most cases we use

mutex_lock(thd-&gt;LOCK_thd_kill);
mutex_lock(thd-&gt;LOCK_thd_data);
thd-&gt;set_killed_no_mutex(...);
mutex_unlock(thd-&gt;LOCK_thd_data);
mutex_unlock(thd-&gt;LOCK_thd_kill);
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts fix for MDEV-23328 i.e. commit 29bbcac0ee841

In this fix we try to modify normal SQL KILL in a following way:

trx_id= thd_to_trx(victim_thd)-&gt;id;
mutex_unlock(victim_thd-&gt;LOCK_thd_data);
mutex_unlock(victim_thd-&gt;LOCK_thd_kill);
lock_mutex_enter
trx=find_and_lock_trx_by_id(trx_id)
mytex_lock(trx-&gt;mysql_thd-&gt;LOCK_thd_kill);
mutex_lock(trx-&gt;mysql_thd-&gt;LOCK_thd_data)

For THD::awake() we use:

mutex_lock(thd-&gt;LOCK_thd_kill);
mutex_lock(thd-&gt;LOCK_thd_data);
thd-&gt;awake();
mutex_unlock(thd-&gt;LOCK_thd_data);
mutex_unlock(thd-&gt;LOCK_thd_kill);

For THD::set_killed in most cases we use

mutex_lock(thd-&gt;LOCK_thd_kill);
mutex_lock(thd-&gt;LOCK_thd_data);
thd-&gt;set_killed_no_mutex(...);
mutex_unlock(thd-&gt;LOCK_thd_data);
mutex_unlock(thd-&gt;LOCK_thd_kill);
</pre>
</div>
</content>
</entry>
<entry>
<title>follow-up MDEV-18166: rename marking functions</title>
<updated>2021-07-12T19:00:40+00:00</updated>
<author>
<name>Nikita Malyavin</name>
<email>nikitamalyavin@gmail.com</email>
</author>
<published>2021-06-28T18:31:14+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=f64a4f672ab9c5338a700a05650df394a732aac9'/>
<id>f64a4f672ab9c5338a700a05650df394a732aac9</id>
<content type='text'>
Reformulate mark_columns_used_by_index* function family in a more laconic
way:

mark_columns_used_by_index -&gt; mark_index_columns
mark_columns_used_by_index_for_read_no_reset -&gt; mark_index_columns_for_read
mark_columns_used_by_index_no_reset -&gt; mark_index_columns_no_reset
static mark_index_columns -&gt; do_mark_index_columns
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reformulate mark_columns_used_by_index* function family in a more laconic
way:

mark_columns_used_by_index -&gt; mark_index_columns
mark_columns_used_by_index_for_read_no_reset -&gt; mark_index_columns_for_read
mark_columns_used_by_index_no_reset -&gt; mark_index_columns_no_reset
static mark_index_columns -&gt; do_mark_index_columns
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-23886 Reusing CTE inside a function fails with table doesn't exist</title>
<updated>2021-05-21T23:00:35+00:00</updated>
<author>
<name>Igor Babaev</name>
<email>igor@askmonty.org</email>
</author>
<published>2021-05-13T02:32:29+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=43c9fcefc07d2f42b65950e76adfbc3c1e8acb28'/>
<id>43c9fcefc07d2f42b65950e76adfbc3c1e8acb28</id>
<content type='text'>
In the code existed just before this patch binding of a table reference to
the specification of the corresponding CTE happens in the function
open_and_process_table(). If the table reference is not the first in the
query the specification is cloned in the same way as the specification of
a view is cloned for any reference of the view. This works fine for
standalone queries, but does not work for stored procedures / functions
for the following reason.
When the first call of a stored procedure/ function SP is processed the
body of SP is parsed. When a query of SP is parsed the info on each
encountered table reference is put into a TABLE_LIST object linked into
a global chain associated with the query. When parsing of the query is
finished the basic info on the table references from this chain except
table references to derived tables and information schema tables is put
in one hash table associated with SP. When parsing of the body of SP is
finished this hash table is used to construct TABLE_LIST objects for all
table references mentioned in SP and link them into the list of such
objects passed to a pre-locking process that calls open_and_process_table()
for each table from the list.
When a TABLE_LIST for a view is encountered the view is opened and its
specification is parsed. For any table reference occurred in
the specification a new TABLE_LIST object is created to be included into
the list for pre-locking. After all objects in the pre-locking have been
looked through the tables mentioned in the list are locked. Note that the
objects referenced CTEs are just skipped here as it is impossible to
resolve these references without any info on the context where they occur.
Now the statements from the body of SP are executed one by one that.
At the very beginning of the execution of a query the tables used in the
query are opened and open_and_process_table() now is called for each table
reference mentioned in the list of TABLE_LIST objects associated with the
query that was built when the query was parsed.
For each table reference first the reference is checked against CTEs
definitions in whose scope it occurred. If such definition is found the
reference is considered resolved and if this is not the first reference
to the found CTE the the specification of the CTE is re-parsed and the
result of the parsing is added to the parsing tree of the query as a
sub-tree. If this sub-tree contains table references to other tables they
are added to the list of TABLE_LIST objects associated with the query in
order the referenced tables to be opened. When the procedure that opens
the tables comes to the TABLE_LIST object created for a non-first
reference to a CTE it discovers that the referenced table instance is not
locked and reports an error.
Thus processing non-first table references to a CTE similar to how
references to view are processed does not work for queries used in stored
procedures / functions. And the main problem is that the current
pre-locking mechanism employed for stored procedures / functions does not
allow to save the context in which a CTE reference occur. It's not trivial
to save the info about the context where a CTE reference occurs while the
resolution of the table reference cannot be done without this context and
consequentially the specification for the table reference cannot be
determined.

This patch solves the above problem by moving resolution of all CTE
references at the parsing stage. More exactly references to CTEs occurred in
a query are resolved right after parsing of the query has finished. After
resolution any CTE reference it is marked as a reference to to derived
table. So it is excluded from the hash table created for pre-locking used
base tables and view when the first call of a stored procedure / function
is processed.
This solution required recursive calls of the parser. The function
THD::sql_parser() has been added specifically for recursive invocations of
the parser.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the code existed just before this patch binding of a table reference to
the specification of the corresponding CTE happens in the function
open_and_process_table(). If the table reference is not the first in the
query the specification is cloned in the same way as the specification of
a view is cloned for any reference of the view. This works fine for
standalone queries, but does not work for stored procedures / functions
for the following reason.
When the first call of a stored procedure/ function SP is processed the
body of SP is parsed. When a query of SP is parsed the info on each
encountered table reference is put into a TABLE_LIST object linked into
a global chain associated with the query. When parsing of the query is
finished the basic info on the table references from this chain except
table references to derived tables and information schema tables is put
in one hash table associated with SP. When parsing of the body of SP is
finished this hash table is used to construct TABLE_LIST objects for all
table references mentioned in SP and link them into the list of such
objects passed to a pre-locking process that calls open_and_process_table()
for each table from the list.
When a TABLE_LIST for a view is encountered the view is opened and its
specification is parsed. For any table reference occurred in
the specification a new TABLE_LIST object is created to be included into
the list for pre-locking. After all objects in the pre-locking have been
looked through the tables mentioned in the list are locked. Note that the
objects referenced CTEs are just skipped here as it is impossible to
resolve these references without any info on the context where they occur.
Now the statements from the body of SP are executed one by one that.
At the very beginning of the execution of a query the tables used in the
query are opened and open_and_process_table() now is called for each table
reference mentioned in the list of TABLE_LIST objects associated with the
query that was built when the query was parsed.
For each table reference first the reference is checked against CTEs
definitions in whose scope it occurred. If such definition is found the
reference is considered resolved and if this is not the first reference
to the found CTE the the specification of the CTE is re-parsed and the
result of the parsing is added to the parsing tree of the query as a
sub-tree. If this sub-tree contains table references to other tables they
are added to the list of TABLE_LIST objects associated with the query in
order the referenced tables to be opened. When the procedure that opens
the tables comes to the TABLE_LIST object created for a non-first
reference to a CTE it discovers that the referenced table instance is not
locked and reports an error.
Thus processing non-first table references to a CTE similar to how
references to view are processed does not work for queries used in stored
procedures / functions. And the main problem is that the current
pre-locking mechanism employed for stored procedures / functions does not
allow to save the context in which a CTE reference occur. It's not trivial
to save the info about the context where a CTE reference occurs while the
resolution of the table reference cannot be done without this context and
consequentially the specification for the table reference cannot be
determined.

This patch solves the above problem by moving resolution of all CTE
references at the parsing stage. More exactly references to CTEs occurred in
a query are resolved right after parsing of the query has finished. After
resolution any CTE reference it is marked as a reference to to derived
table. So it is excluded from the hash table created for pre-locking used
base tables and view when the first call of a stored procedure / function
is processed.
This solution required recursive calls of the parser. The function
THD::sql_parser() has been added specifically for recursive invocations of
the parser.
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-16962 Assertion failed in open_purge_table upon concurrent ALTER/FLUSH</title>
<updated>2021-04-27T08:51:17+00:00</updated>
<author>
<name>Nikita Malyavin</name>
<email>nikitamalyavin@gmail.com</email>
</author>
<published>2021-04-06T18:31:00+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=6ba5f81c7dcb133d2f4fabb7f24b76286fa868a3'/>
<id>6ba5f81c7dcb133d2f4fabb7f24b76286fa868a3</id>
<content type='text'>
So we are having a race condition of three of threads, resulting in a
deadlock backoff in purge, which is unexpected.

More precisely, the following happens:
T1: NOCOPY ALTER TABLE begins, and eventually it holds MDL_SHARED_NO_WRITE
 lock;
T2: FLUSH TABLES begins. it sets share-&gt;tdc-&gt;flushed = true
T3: purge on a record with virtual column begins. it is going to open a
 table. MDL_SHARED_READ lock is acquired therefore.
Since share-&gt;tdc-&gt;flushed is set, it waits for a TDC purge end.
T1: is going to elevate MDL LOCK to exclusive and therefore has to set
 other waiters to back off.
T3: receives VICTIM status, reports a DEADLOCK, sets OT_BACKOFF_AND_RETRY
 to Open_table_context::m_action

My fix is to allow opening table in purge while flushing. It is already
done the same way in other maintainance facilities like REPAIR TABLE.

Another way would be making an actual backoff, but Open_table_context
does not allow to distinguish it from other failure types, which still
seem to be unexpected. Making this would require hacking into
Open_table_context interface for no benefit, in comparison to passing
MYSQL_OPEN_IGNORE_FLUSH during table open.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So we are having a race condition of three of threads, resulting in a
deadlock backoff in purge, which is unexpected.

More precisely, the following happens:
T1: NOCOPY ALTER TABLE begins, and eventually it holds MDL_SHARED_NO_WRITE
 lock;
T2: FLUSH TABLES begins. it sets share-&gt;tdc-&gt;flushed = true
T3: purge on a record with virtual column begins. it is going to open a
 table. MDL_SHARED_READ lock is acquired therefore.
Since share-&gt;tdc-&gt;flushed is set, it waits for a TDC purge end.
T1: is going to elevate MDL LOCK to exclusive and therefore has to set
 other waiters to back off.
T3: receives VICTIM status, reports a DEADLOCK, sets OT_BACKOFF_AND_RETRY
 to Open_table_context::m_action

My fix is to allow opening table in purge while flushing. It is already
done the same way in other maintainance facilities like REPAIR TABLE.

Another way would be making an actual backoff, but Open_table_context
does not allow to distinguish it from other failure types, which still
seem to be unexpected. Making this would require hacking into
Open_table_context interface for no benefit, in comparison to passing
MYSQL_OPEN_IGNORE_FLUSH during table open.
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-24872 : galera.galera_insert_multi MTR failed: crash with SIGABRT</title>
<updated>2021-02-17T08:28:37+00:00</updated>
<author>
<name>Jan Lindström</name>
<email>jan.lindstrom@mariadb.com</email>
</author>
<published>2021-02-16T10:05:45+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=45e33e05e2529e456fc4ce28f9f32fbe1a546526'/>
<id>45e33e05e2529e456fc4ce28f9f32fbe1a546526</id>
<content type='text'>
Problem was that we tried to lock THD::LOCK_thd_data after we have
acquired lock_sys mutex. This is against mutex ordering rules.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem was that we tried to lock THD::LOCK_thd_data after we have
acquired lock_sys mutex. This is against mutex ordering rules.
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-23851 BF-BF Conflict issue because of UK GAP locks</title>
<updated>2021-01-18T06:09:06+00:00</updated>
<author>
<name>sjaakola</name>
<email>seppo.jaakola@iki.fi</email>
</author>
<published>2020-12-09T19:53:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=beaea31ab12ab56ea8a6eb5e99cf82648675ea78'/>
<id>beaea31ab12ab56ea8a6eb5e99cf82648675ea78</id>
<content type='text'>
Some DML operations on tables having unique secondary keys cause scanning
in the secondary index, for instance to find potential unique key violations
in the seconday index. This scanning may involve GAP locking in the index.
As this locking happens also when applying replication events in high priority
applier threads, there is a probabality for lock conflicts between two wsrep
high priority threads.

This PR avoids lock conflicts of high priority wsrep threads, which do
secondary index scanning e.g. for duplicate key detection.

The actual fix is the patch in sql_class.cc:thd_need_ordering_with(), where
we allow relaxed GAP locking protocol between wsrep high priority threads.
wsrep high priority threads (replication appliers, replayers and TOI processors)
are ordered by the replication provider, and they will not need serializability
support gained by secondary index GAP locks.

PR contains also a mtr test, which exercises a scenario where two replication
applier threads have a false positive conflict in GAP of unique secondary index.
The conflicting local committing transaction has to replay, and the test verifies
also that the replaying phase will not conflict with the latter repllication applier.
Commit also contains new test scenario for galera.galera_UK_conflict.test,
where replayer starts applying after a slave applier thread, with later seqno,
has advanced to commit phase. The applier and replayer have false positive GAP
lock conflict on secondary unique index, and replayer should ignore this.
This test scenario caused crash with earlier version in this PR, and to fix this,
the secondary index uniquenes checking has been relaxed even further.

Now innodb trx_t structure has new member: bool wsrep_UK_scan, which is set to
true, when high priority thread is performing unique secondary index scanning.
The member trx_t::wsrep_UK_scan is defined inside WITH_WSREP directive, to make
it possible to prepare a MariaDB build where this additional trx_t member is
not present and is not used in the code base. trx-&gt;wsrep_UK_scan is set to true
only for the duration of function call for: lock_rec_lock() trx-&gt;wsrep_UK_scan
is used only in lock_rec_has_to_wait() function to relax the need to wait if
wsrep_UK_scan is set and conflicting transaction is also high priority.

Reviewed-by: Jan Lindström &lt;jan.lindstrom@mariadb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some DML operations on tables having unique secondary keys cause scanning
in the secondary index, for instance to find potential unique key violations
in the seconday index. This scanning may involve GAP locking in the index.
As this locking happens also when applying replication events in high priority
applier threads, there is a probabality for lock conflicts between two wsrep
high priority threads.

This PR avoids lock conflicts of high priority wsrep threads, which do
secondary index scanning e.g. for duplicate key detection.

The actual fix is the patch in sql_class.cc:thd_need_ordering_with(), where
we allow relaxed GAP locking protocol between wsrep high priority threads.
wsrep high priority threads (replication appliers, replayers and TOI processors)
are ordered by the replication provider, and they will not need serializability
support gained by secondary index GAP locks.

PR contains also a mtr test, which exercises a scenario where two replication
applier threads have a false positive conflict in GAP of unique secondary index.
The conflicting local committing transaction has to replay, and the test verifies
also that the replaying phase will not conflict with the latter repllication applier.
Commit also contains new test scenario for galera.galera_UK_conflict.test,
where replayer starts applying after a slave applier thread, with later seqno,
has advanced to commit phase. The applier and replayer have false positive GAP
lock conflict on secondary unique index, and replayer should ignore this.
This test scenario caused crash with earlier version in this PR, and to fix this,
the secondary index uniquenes checking has been relaxed even further.

Now innodb trx_t structure has new member: bool wsrep_UK_scan, which is set to
true, when high priority thread is performing unique secondary index scanning.
The member trx_t::wsrep_UK_scan is defined inside WITH_WSREP directive, to make
it possible to prepare a MariaDB build where this additional trx_t member is
not present and is not used in the code base. trx-&gt;wsrep_UK_scan is set to true
only for the duration of function call for: lock_rec_lock() trx-&gt;wsrep_UK_scan
is used only in lock_rec_has_to_wait() function to relax the need to wait if
wsrep_UK_scan is set and conflicting transaction is also high priority.

Reviewed-by: Jan Lindström &lt;jan.lindstrom@mariadb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-23536 Race condition between KILL and transaction commit</title>
<updated>2021-01-11T20:54:47+00:00</updated>
<author>
<name>Sergei Golubchik</name>
<email>serg@mariadb.org</email>
</author>
<published>2021-01-11T12:21:42+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=9b750dcbd89ecf455211a77348a85464b282abee'/>
<id>9b750dcbd89ecf455211a77348a85464b282abee</id>
<content type='text'>
Server part:
  kill_handlerton() was accessing thd-&gt;ha_data[] for some other thd,
  while it could be concurrently modified by its owner thd.

  protect thd-&gt;ha_data[] modifications with a mutex.
  require this mutex when accessing thd-&gt;ha_data[] from kill_handlerton.

InnoDB part:
  on close_connection, detach trx from thd before freeing the trx
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Server part:
  kill_handlerton() was accessing thd-&gt;ha_data[] for some other thd,
  while it could be concurrently modified by its owner thd.

  protect thd-&gt;ha_data[] modifications with a mutex.
  require this mutex when accessing thd-&gt;ha_data[] from kill_handlerton.

InnoDB part:
  on close_connection, detach trx from thd before freeing the trx
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "MDEV-23536 : Race condition between KILL and transaction commit"</title>
<updated>2021-01-11T20:54:47+00:00</updated>
<author>
<name>Sergei Golubchik</name>
<email>serg@mariadb.org</email>
</author>
<published>2021-01-11T12:16:38+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=66f4900b517681da2aed3b562158ef58679961e4'/>
<id>66f4900b517681da2aed3b562158ef58679961e4</id>
<content type='text'>
This reverts the server part of the commit 775fccea0
but keeps InnoDB part (which reverted MDEV-17092 5530a93f4).

So after this both MDEV-23536 and MDEV-17092 are reverted,
and the original bug is resurrected.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts the server part of the commit 775fccea0
but keeps InnoDB part (which reverted MDEV-17092 5530a93f4).

So after this both MDEV-23536 and MDEV-17092 are reverted,
and the original bug is resurrected.
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-23536 : Race condition between KILL and transaction commit</title>
<updated>2021-01-08T15:11:54+00:00</updated>
<author>
<name>Jan Lindström</name>
<email>jan.lindstrom@mariadb.com</email>
</author>
<published>2020-12-17T12:20:23+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=775fccea0c24b529bb2ec6888e34e7fae2ba25dd'/>
<id>775fccea0c24b529bb2ec6888e34e7fae2ba25dd</id>
<content type='text'>
A race condition may occur between the execution of transaction commit,
and an execution of a KILL statement that would attempt to abort that
transaction.

MDEV-17092 worked around this race condition by modifying InnoDB code.
After that issue was closed, Sergey Vojtovich pointed out that this
race condition would better be fixed above the storage engine layer:

If you look carefully into the above, you can conclude that
thd-&gt;free_connection() can be called concurrently with
KILL/thd-&gt;awake(). Which is the bug. And it is partially fixed in
THD::~THD(), that is destructor waits for KILL completion:

Fix: Add necessary mutex operations to THD::free_connection()
and move WSREP specific code also there. This ensures that no
one is using THD while we do free_connection(). These mutexes
will also ensures that there can't be concurrent KILL/THD::awake().

innobase_kill_query
  We can now remove usage of trx_sys_mutex introduced on MDEV-17092.

trx_t::free()
  Poison trx-&gt;state and trx-&gt;mysql_thd

This patch is validated with an RQG run similar to the one that
reproduced MDEV-17092.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A race condition may occur between the execution of transaction commit,
and an execution of a KILL statement that would attempt to abort that
transaction.

MDEV-17092 worked around this race condition by modifying InnoDB code.
After that issue was closed, Sergey Vojtovich pointed out that this
race condition would better be fixed above the storage engine layer:

If you look carefully into the above, you can conclude that
thd-&gt;free_connection() can be called concurrently with
KILL/thd-&gt;awake(). Which is the bug. And it is partially fixed in
THD::~THD(), that is destructor waits for KILL completion:

Fix: Add necessary mutex operations to THD::free_connection()
and move WSREP specific code also there. This ensures that no
one is using THD while we do free_connection(). These mutexes
will also ensures that there can't be concurrent KILL/THD::awake().

innobase_kill_query
  We can now remove usage of trx_sys_mutex introduced on MDEV-17092.

trx_t::free()
  Poison trx-&gt;state and trx-&gt;mysql_thd

This patch is validated with an RQG run similar to the one that
reproduced MDEV-17092.
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-23875 is failing to build on windows.</title>
<updated>2021-01-04T09:27:15+00:00</updated>
<author>
<name>Rucha Deodhar</name>
<email>rucha.deodhar@mariadb.com</email>
</author>
<published>2021-01-04T09:27:15+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=25db9ffa8bdab8a2f2af3c7f154343dd6c6d238f'/>
<id>25db9ffa8bdab8a2f2af3c7f154343dd6c6d238f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
