MySQL 9.1.0
Source Code Documentation
|
A service to store an opaque pointer in MYSQL_THD. More...
#include <mysql_thd_store_service.h>
Public Attributes | |
mysql_service_status_t(* | register_slot )(const char *name, free_resource_fn free_fn, mysql_thd_store_slot *slot) |
Register a slot to store data specific to a component. More... | |
mysql_service_status_t(* | unregister_slot )(mysql_thd_store_slot slot) |
Unregister a slot. More... | |
mysql_service_status_t(* | set )(THD *thd, mysql_thd_store_slot slot, void *object) |
Set/Reset an opaque pointer in thd store. More... | |
void *(* | get )(THD *thd, mysql_thd_store_slot slot) |
Get handle to an already stored object. More... | |
A service to store an opaque pointer in MYSQL_THD.
void *(* s_mysql_mysql_thd_store::get) (THD *thd, mysql_thd_store_slot slot) |
Get handle to an already stored object.
[in] | thd | Session handle. If NULL, current session will be used. |
[in] | slot | Key used to identify the object handle |
mysql_service_status_t(* s_mysql_mysql_thd_store::register_slot) (const char *name, free_resource_fn free_fn, mysql_thd_store_slot *slot) |
Register a slot to store data specific to a component.
The free_resource callback is used to free the stored pointer before thd is destroyed
[in] | name | Implementation name |
[in] | free_fn | Callback to free resource stored in the slot |
[out] | slot | Key used to identify the object handle |
false | Success |
true | Error. This typically means all slots are full |
mysql_service_status_t(* s_mysql_mysql_thd_store::set) (THD *thd, mysql_thd_store_slot slot, void *object) |
Set/Reset an opaque pointer in thd store.
[in] | thd | Session handle. If NULL, current session will be used. |
[in] | slot | Key used to identify the object handle |
[in] | object | Handle of the object being stored. If NULL, it will be considered removal. |
false | Success |
true | Error |
mysql_service_status_t(* s_mysql_mysql_thd_store::unregister_slot) (mysql_thd_store_slot slot) |
Unregister a slot.
[in,out] | slot | Key allocated to component |
false | Success |
true | Error |