mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Adiue thd_ha_data(), you've broke many hearts
Part of MDEV-19515 - Improve connect speed
This commit is contained in:
@ -645,7 +645,6 @@ int thd_in_lock_tables(const MYSQL_THD thd);
|
|||||||
int thd_tablespace_op(const MYSQL_THD thd);
|
int thd_tablespace_op(const MYSQL_THD thd);
|
||||||
long long thd_test_options(const MYSQL_THD thd, long long test_options);
|
long long thd_test_options(const MYSQL_THD thd, long long test_options);
|
||||||
int thd_sql_command(const MYSQL_THD thd);
|
int thd_sql_command(const MYSQL_THD thd);
|
||||||
void **thd_ha_data(const MYSQL_THD thd, const struct handlerton *hton);
|
|
||||||
void thd_storage_lock_wait(MYSQL_THD thd, long long value);
|
void thd_storage_lock_wait(MYSQL_THD thd, long long value);
|
||||||
int thd_tx_isolation(const MYSQL_THD thd);
|
int thd_tx_isolation(const MYSQL_THD thd);
|
||||||
int thd_tx_is_read_only(const MYSQL_THD thd);
|
int thd_tx_is_read_only(const MYSQL_THD thd);
|
||||||
|
@ -559,7 +559,6 @@ int thd_in_lock_tables(const void* thd);
|
|||||||
int thd_tablespace_op(const void* thd);
|
int thd_tablespace_op(const void* thd);
|
||||||
long long thd_test_options(const void* thd, long long test_options);
|
long long thd_test_options(const void* thd, long long test_options);
|
||||||
int thd_sql_command(const void* thd);
|
int thd_sql_command(const void* thd);
|
||||||
void **thd_ha_data(const void* thd, const struct handlerton *hton);
|
|
||||||
void thd_storage_lock_wait(void* thd, long long value);
|
void thd_storage_lock_wait(void* thd, long long value);
|
||||||
int thd_tx_isolation(const void* thd);
|
int thd_tx_isolation(const void* thd);
|
||||||
int thd_tx_is_read_only(const void* thd);
|
int thd_tx_is_read_only(const void* thd);
|
||||||
|
@ -559,7 +559,6 @@ int thd_in_lock_tables(const void* thd);
|
|||||||
int thd_tablespace_op(const void* thd);
|
int thd_tablespace_op(const void* thd);
|
||||||
long long thd_test_options(const void* thd, long long test_options);
|
long long thd_test_options(const void* thd, long long test_options);
|
||||||
int thd_sql_command(const void* thd);
|
int thd_sql_command(const void* thd);
|
||||||
void **thd_ha_data(const void* thd, const struct handlerton *hton);
|
|
||||||
void thd_storage_lock_wait(void* thd, long long value);
|
void thd_storage_lock_wait(void* thd, long long value);
|
||||||
int thd_tx_isolation(const void* thd);
|
int thd_tx_isolation(const void* thd);
|
||||||
int thd_tx_is_read_only(const void* thd);
|
int thd_tx_is_read_only(const void* thd);
|
||||||
|
@ -559,7 +559,6 @@ int thd_in_lock_tables(const void* thd);
|
|||||||
int thd_tablespace_op(const void* thd);
|
int thd_tablespace_op(const void* thd);
|
||||||
long long thd_test_options(const void* thd, long long test_options);
|
long long thd_test_options(const void* thd, long long test_options);
|
||||||
int thd_sql_command(const void* thd);
|
int thd_sql_command(const void* thd);
|
||||||
void **thd_ha_data(const void* thd, const struct handlerton *hton);
|
|
||||||
void thd_storage_lock_wait(void* thd, long long value);
|
void thd_storage_lock_wait(void* thd, long long value);
|
||||||
int thd_tx_isolation(const void* thd);
|
int thd_tx_isolation(const void* thd);
|
||||||
int thd_tx_is_read_only(const void* thd);
|
int thd_tx_is_read_only(const void* thd);
|
||||||
|
@ -513,7 +513,6 @@ int thd_in_lock_tables(const void* thd);
|
|||||||
int thd_tablespace_op(const void* thd);
|
int thd_tablespace_op(const void* thd);
|
||||||
long long thd_test_options(const void* thd, long long test_options);
|
long long thd_test_options(const void* thd, long long test_options);
|
||||||
int thd_sql_command(const void* thd);
|
int thd_sql_command(const void* thd);
|
||||||
void **thd_ha_data(const void* thd, const struct handlerton *hton);
|
|
||||||
void thd_storage_lock_wait(void* thd, long long value);
|
void thd_storage_lock_wait(void* thd, long long value);
|
||||||
int thd_tx_isolation(const void* thd);
|
int thd_tx_isolation(const void* thd);
|
||||||
int thd_tx_is_read_only(const void* thd);
|
int thd_tx_is_read_only(const void* thd);
|
||||||
|
@ -559,7 +559,6 @@ int thd_in_lock_tables(const void* thd);
|
|||||||
int thd_tablespace_op(const void* thd);
|
int thd_tablespace_op(const void* thd);
|
||||||
long long thd_test_options(const void* thd, long long test_options);
|
long long thd_test_options(const void* thd, long long test_options);
|
||||||
int thd_sql_command(const void* thd);
|
int thd_sql_command(const void* thd);
|
||||||
void **thd_ha_data(const void* thd, const struct handlerton *hton);
|
|
||||||
void thd_storage_lock_wait(void* thd, long long value);
|
void thd_storage_lock_wait(void* thd, long long value);
|
||||||
int thd_tx_isolation(const void* thd);
|
int thd_tx_isolation(const void* thd);
|
||||||
int thd_tx_is_read_only(const void* thd);
|
int thd_tx_is_read_only(const void* thd);
|
||||||
|
@ -419,12 +419,6 @@ void thd_exit_cond(MYSQL_THD thd, const PSI_stage_info *stage,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C"
|
|
||||||
void **thd_ha_data(const THD *thd, const struct handlerton *hton)
|
|
||||||
{
|
|
||||||
return (void **) &thd->ha_data[hton->slot].ha_ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
void thd_storage_lock_wait(THD *thd, long long value)
|
void thd_storage_lock_wait(THD *thd, long long value)
|
||||||
{
|
{
|
||||||
@ -437,7 +431,7 @@ void thd_storage_lock_wait(THD *thd, long long value)
|
|||||||
extern "C"
|
extern "C"
|
||||||
void *thd_get_ha_data(const THD *thd, const struct handlerton *hton)
|
void *thd_get_ha_data(const THD *thd, const struct handlerton *hton)
|
||||||
{
|
{
|
||||||
return *thd_ha_data(thd, hton);
|
return thd->ha_data[hton->slot].ha_ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -450,6 +444,7 @@ void thd_set_ha_data(THD *thd, const struct handlerton *hton,
|
|||||||
const void *ha_data)
|
const void *ha_data)
|
||||||
{
|
{
|
||||||
plugin_ref *lock= &thd->ha_data[hton->slot].lock;
|
plugin_ref *lock= &thd->ha_data[hton->slot].lock;
|
||||||
|
thd->ha_data[hton->slot].ha_ptr= const_cast<void*>(ha_data);
|
||||||
if (ha_data && !*lock)
|
if (ha_data && !*lock)
|
||||||
*lock= ha_lock_engine(NULL, (handlerton*) hton);
|
*lock= ha_lock_engine(NULL, (handlerton*) hton);
|
||||||
else if (!ha_data && *lock)
|
else if (!ha_data && *lock)
|
||||||
@ -457,7 +452,6 @@ void thd_set_ha_data(THD *thd, const struct handlerton *hton,
|
|||||||
plugin_unlock(NULL, *lock);
|
plugin_unlock(NULL, *lock);
|
||||||
*lock= NULL;
|
*lock= NULL;
|
||||||
}
|
}
|
||||||
*thd_ha_data(thd, hton)= (void*) ha_data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user