summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster_binlog.h
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.(none)>2007-08-31 10:19:52 +0400
committerunknown <kostja@bodhi.(none)>2007-08-31 10:19:52 +0400
commitee040ef2b762d1a780a53bc347657484335b1a4c (patch)
tree14710401798f8ef572997a003e8792fb9353e947 /sql/ha_ndbcluster_binlog.h
parent9cedd882e7027afeca5ea190e41df96a752194c5 (diff)
downloadmariadb-git-ee040ef2b762d1a780a53bc347657484335b1a4c.tar.gz
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. include/mysql/plugin.h: Provide accessors to thd->ha_data for simple and robust code. sql/ha_ndbcluster_binlog.h: Use getters/setters of thd->ha_data, instead of direct access. sql/handler.cc: Use a getter of thd->ha_data instead of direct access. sql/log.cc: Use getters/setters of thd->ha_data, instead of direct access. sql/rpl_utility.h: Fix a compilation warning (declaration order must match initialization order in constructor). storage/federated/ha_federated.cc: Use interface accessors to thd->ha_data, instead of direct access.
Diffstat (limited to 'sql/ha_ndbcluster_binlog.h')
-rw-r--r--sql/ha_ndbcluster_binlog.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/ha_ndbcluster_binlog.h b/sql/ha_ndbcluster_binlog.h
index b5b8d0d9745..53852028f08 100644
--- a/sql/ha_ndbcluster_binlog.h
+++ b/sql/ha_ndbcluster_binlog.h
@@ -216,10 +216,12 @@ inline void free_share(NDB_SHARE **share, bool have_lock= FALSE)
inline
Thd_ndb *
-get_thd_ndb(THD *thd) { return (Thd_ndb *) thd->ha_data[ndbcluster_hton->slot]; }
+get_thd_ndb(THD *thd)
+{ return (Thd_ndb *) thd_get_ha_data(thd, ndbcluster_hton); }
inline
void
-set_thd_ndb(THD *thd, Thd_ndb *thd_ndb) { thd->ha_data[ndbcluster_hton->slot]= thd_ndb; }
+set_thd_ndb(THD *thd, Thd_ndb *thd_ndb)
+{ thd_set_ha_data(thd, ndbcluster_hton, thd_ndb); }
Ndb* check_ndb_in_thd(THD* thd);