summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster.h
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2006-04-19 18:29:25 +0200
committerunknown <tomas@poseidon.ndb.mysql.com>2006-04-19 18:29:25 +0200
commit8f2c82b3839797985e14809c96b9895424db6c2d (patch)
tree67e7a16acd00ea77cc8d67b4f9c9ded85b2b0360 /sql/ha_ndbcluster.h
parentdb37c0d615c1aecdd04a2520ee8a6bb73442026b (diff)
downloadmariadb-git-8f2c82b3839797985e14809c96b9895424db6c2d.tar.gz
removed use of local data in local cache in preparation for removing local cache usage all together
Diffstat (limited to 'sql/ha_ndbcluster.h')
-rw-r--r--sql/ha_ndbcluster.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h
index 776ca02fb76..0128c5b1a09 100644
--- a/sql/ha_ndbcluster.h
+++ b/sql/ha_ndbcluster.h
@@ -523,11 +523,26 @@ enum THD_NDB_OPTIONS
TNO_NO_LOG_SCHEMA_OP= 1 << 0
};
+struct Ndb_local_table_statistics {
+ int no_uncommitted_rows_count;
+ ulong last_count;
+ ha_rows records;
+};
+
+typedef struct st_thd_ndb_share {
+ const void *key;
+ struct Ndb_local_table_statistics stat;
+} THD_NDB_SHARE;
+
class Thd_ndb
{
public:
Thd_ndb();
~Thd_ndb();
+
+ void init_open_tables();
+ THD_NDB_SHARE *get_open_table(THD *thd, const void *key);
+
Ndb *ndb;
ulong count;
uint lock_count;
@@ -536,6 +551,7 @@ class Thd_ndb
int error;
uint32 options;
List<NDB_SHARE> changed_tables;
+ HASH open_tables;
};
class ha_ndbcluster: public handler
@@ -819,7 +835,7 @@ private:
NdbScanOperation *m_active_cursor;
const NdbDictionary::Table *m_table;
int m_table_version;
- void *m_table_info;
+ struct Ndb_local_table_statistics *m_table_info;
char m_dbname[FN_HEADLEN];
//char m_schemaname[FN_HEADLEN];
char m_tabname[FN_HEADLEN];
@@ -827,6 +843,7 @@ private:
THR_LOCK_DATA m_lock;
NDB_SHARE *m_share;
NDB_INDEX_DATA m_index[MAX_KEY];
+ THD_NDB_SHARE *m_thd_ndb_share;
// NdbRecAttr has no reference to blob
NdbValue m_value[NDB_MAX_ATTRIBUTES_IN_TABLE];
byte m_ref[NDB_HIDDEN_PRIMARY_KEY_LENGTH];