1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Never access thd->ha_data directly, use getters/setters from the plugin

API instead.
This is a pre-requisite of the fix for Bug 12713, which changes the
data type of thd->ha_data from void * to struct Ha_data.
This commit is contained in:
kostja@bodhi.(none)
2007-08-31 10:19:52 +04:00
parent 5b10ba2ce2
commit 8d1af60da0
6 changed files with 59 additions and 34 deletions

View File

@ -785,5 +785,28 @@ void mysql_query_cache_invalidate4(MYSQL_THD thd,
}
#endif
#ifdef __cplusplus
/**
Provide a handler data getter to simplify coding
*/
inline
void *
thd_get_ha_data(const MYSQL_THD thd, const struct handlerton *hton)
{
return *thd_ha_data(thd, hton);
}
/**
Provide a handler data setter to simplify coding
*/
inline
void
thd_set_ha_data(const MYSQL_THD thd, const struct handlerton *hton,
const void *ha_data)
{
*thd_ha_data(thd, hton)= (void*) ha_data;
}
#endif
#endif