1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Revert MDEV-25114

Revert 88a4be75a5 and
9d97f92feb, which had been
prematurely pushed by accident.
This commit is contained in:
Marko Mäkelä
2021-09-24 16:21:20 +03:00
parent cfe1a258e8
commit f59f5c4a10
18 changed files with 229 additions and 765 deletions

View File

@@ -1804,11 +1804,11 @@ void THD::awake(killed_state state_to_set)
the Vio might be disassociated concurrently.
*/
void THD::disconnect_mutexed()
void THD::disconnect()
{
Vio *vio= NULL;
mysql_mutex_assert_owner(&LOCK_thd_data);
mysql_mutex_lock(&LOCK_thd_data);
set_killed(KILL_CONNECTION);
@@ -1826,6 +1826,8 @@ void THD::disconnect_mutexed()
if (net.vio != vio)
vio_close(net.vio);
net.thd= 0; // Don't collect statistics
mysql_mutex_unlock(&LOCK_thd_data);
}
@@ -1877,18 +1879,16 @@ bool THD::notify_shared_lock(MDL_context_owner *ctx_in_use,
thread can see those instances (e.g. see partitioning code).
*/
if (!thd_table->needs_reopen())
{
signalled|= mysql_lock_abort_for_thread(this, thd_table);
if (WSREP(this) && wsrep_thd_is_BF(this, FALSE))
{
WSREP_DEBUG("remove_table_from_cache: %llu",
(unsigned long long) this->real_id);
wsrep_abort_thd((void *)this, (void *)in_use, FALSE);
}
}
}
#ifdef WITH_WSREP
if (WSREP(this) && wsrep_thd_is_BF(this, false))
{
WSREP_DEBUG("notify_shared_lock: BF thread %llu query %s"
" victim %llu query %s",
this->real_id, wsrep_thd_query(this),
in_use->real_id, wsrep_thd_query(in_use));
wsrep_abort_thd((void *)this, (void *)in_use, false);
}
#endif /* WITH_WSREP */
}
mysql_mutex_unlock(&in_use->LOCK_thd_data);
}