Commit 5c18ba6c authored by Sergey Vojtovich's avatar Sergey Vojtovich

Fixed Spider to follow THD ha_data protocol

Do not reset THD ha_data in spider_close_connection(), cleaner approach
is to let ha_close_connection() do it.

Part of MDEV-19515 - Improve connect speed
parent 762d2b96
......@@ -6576,7 +6576,7 @@ int spider_close_connection(
}
spider_rollback(spider_hton_ptr, thd, TRUE);
spider_free_trx(trx, TRUE);
spider_free_trx(trx, TRUE, false);
DBUG_RETURN(0);
}
......
......@@ -1557,7 +1557,8 @@ SPIDER_TRX *spider_get_trx(
int spider_free_trx(
SPIDER_TRX *trx,
bool need_lock
bool need_lock,
bool reset_ha_data
) {
DBUG_ENTER("spider_free_trx");
if (trx->thd)
......@@ -1575,6 +1576,7 @@ int spider_free_trx(
if (need_lock)
pthread_mutex_unlock(&spider_allocated_thds_mutex);
}
if (reset_ha_data)
thd_set_ha_data(trx->thd, spider_hton_ptr, NULL);
}
spider_free_trx_alloc(trx);
......
......@@ -80,7 +80,8 @@ SPIDER_TRX *spider_get_trx(
int spider_free_trx(
SPIDER_TRX *trx,
bool need_lock
bool need_lock,
bool reset_ha_data= true
);
int spider_check_and_set_trx_isolation(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment