summaryrefslogtreecommitdiff
path: root/storage/federated
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 /storage/federated
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 'storage/federated')
-rw-r--r--storage/federated/ha_federated.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc
index ded0ce88484..edcd1127dbd 100644
--- a/storage/federated/ha_federated.cc
+++ b/storage/federated/ha_federated.cc
@@ -3169,7 +3169,7 @@ int ha_federated::external_lock(THD *thd, int lock_type)
#ifdef XXX_SUPERCEDED_BY_WL2952
if (lock_type != F_UNLCK)
{
- ha_federated *trx= (ha_federated *)thd->ha_data[ht->slot];
+ ha_federated *trx= (ha_federated *)thd_get_ha_data(thd, ht);
DBUG_PRINT("info",("federated not lock F_UNLCK"));
if (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))
@@ -3200,7 +3200,7 @@ int ha_federated::external_lock(THD *thd, int lock_type)
DBUG_PRINT("info", ("error setting autocommit FALSE: %d", error));
DBUG_RETURN(error);
}
- thd->ha_data[ht->slot]= this;
+ thd_set_ha_data(thd, ht, this);
trans_register_ha(thd, TRUE, ht);
/*
Send a lock table to the remote end.
@@ -3230,7 +3230,7 @@ int ha_federated::external_lock(THD *thd, int lock_type)
static int federated_commit(handlerton *hton, THD *thd, bool all)
{
int return_val= 0;
- ha_federated *trx= (ha_federated *)thd->ha_data[hton->slot];
+ ha_federated *trx= (ha_federated *) thd_get_ha_data(thd, hton);
DBUG_ENTER("federated_commit");
if (all)
@@ -3245,7 +3245,7 @@ static int federated_commit(handlerton *hton, THD *thd, bool all)
if (error && !return_val)
return_val= error;
}
- thd->ha_data[hton->slot]= NULL;
+ thd_set_ha_data(thd, hton, NULL);
}
DBUG_PRINT("info", ("error val: %d", return_val));
@@ -3256,7 +3256,7 @@ static int federated_commit(handlerton *hton, THD *thd, bool all)
static int federated_rollback(handlerton *hton, THD *thd, bool all)
{
int return_val= 0;
- ha_federated *trx= (ha_federated *)thd->ha_data[hton->slot];
+ ha_federated *trx= (ha_federated *)thd_get_ha_data(thd, hton);
DBUG_ENTER("federated_rollback");
if (all)
@@ -3271,7 +3271,7 @@ static int federated_rollback(handlerton *hton, THD *thd, bool all)
if (error && !return_val)
return_val= error;
}
- thd->ha_data[hton->slot]= NULL;
+ thd_set_ha_data(thd, hton, NULL);
}
DBUG_PRINT("info", ("error val: %d", return_val));