1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge branch '10.6' into 10.7

This commit is contained in:
Oleksandr Byelkin
2022-10-04 07:41:35 +02:00
344 changed files with 13374 additions and 5521 deletions

View File

@ -899,15 +899,14 @@ void ha_close_connection(THD* thd)
{
for (auto i= 0; i < MAX_HA; i++)
{
if (thd->ha_data[i].lock)
if (plugin_ref plugin= thd->ha_data[i].lock)
{
handlerton *hton= plugin_hton(thd->ha_data[i].lock);
thd->ha_data[i].lock= NULL;
handlerton *hton= plugin_hton(plugin);
if (hton->close_connection)
hton->close_connection(hton, thd);
/* make sure SE didn't reset ha_data in close_connection() */
DBUG_ASSERT(thd->ha_data[i].lock);
/* make sure ha_data is reset and ha_data_lock is released */
thd_set_ha_data(thd, hton, 0);
plugin_unlock(NULL, plugin);
}
DBUG_ASSERT(!thd->ha_data[i].ha_ptr);
}