MCPcopy Create free account
hub / github.com/MariaDB/server / thd_set_ha_data

Function thd_set_ha_data

sql/sql_class.cc:470–484  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468*/
469extern "C"
470void thd_set_ha_data(THD *thd, const struct transaction_participant *hton,
471 const void *ha_data)
472{
473 plugin_ref *lock= &thd->ha_data[hton->slot].lock;
474 mysql_mutex_lock(&thd->LOCK_thd_data);
475 thd->ha_data[hton->slot].ha_ptr= const_cast<void*>(ha_data);
476 mysql_mutex_unlock(&thd->LOCK_thd_data);
477 if (ha_data && !*lock)
478 *lock= ha_lock_engine(NULL, (handlerton*) hton);
479 else if (!ha_data && *lock)
480 {
481 plugin_unlock(NULL, *lock);
482 *lock= NULL;
483 }
484}
485
486
487/**

Callers 15

ha_close_connectionFunction · 0.85
binlog_setup_trx_dataMethod · 0.85
online_alter.ccFile · 0.85
online_alter_prepareFunction · 0.85
do_rollbackMethod · 0.85
do_commitMethod · 0.85
get_from_thdMethod · 0.85
openMethod · 0.85
GetTlsMethod · 0.85
federated_commitFunction · 0.85
federated_rollbackFunction · 0.85

Calls 2

ha_lock_engineFunction · 0.85
plugin_unlockFunction · 0.85

Tested by

no test coverage detected