diff options
Diffstat (limited to 'sql/ha_ndbcluster.h')
-rw-r--r-- | sql/ha_ndbcluster.h | 51 |
1 files changed, 20 insertions, 31 deletions
diff --git a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h index c6c233c013c..f6c712620c1 100644 --- a/sql/ha_ndbcluster.h +++ b/sql/ha_ndbcluster.h @@ -118,15 +118,14 @@ class ha_ndbcluster: public handler int reset(); int external_lock(THD *thd, int lock_type); int start_stmt(THD *thd); - const char * table_type() const { return("ndbcluster");} + const char * table_type() const; const char ** bas_ext() const; - ulong table_flags(void) const { return m_table_flags; } + ulong table_flags(void) const; ulong index_flags(uint idx, uint part, bool all_parts) const; - uint max_supported_record_length() const { return NDB_MAX_TUPLE_SIZE; }; - uint max_supported_keys() const { return MAX_KEY; } - uint max_supported_key_parts() const - { return NDB_MAX_NO_OF_ATTRIBUTES_IN_KEY; }; - uint max_supported_key_length() const { return NDB_MAX_KEY_SIZE;}; + uint max_supported_record_length() const; + uint max_supported_keys() const; + uint max_supported_key_parts() const; + uint max_supported_key_length() const; int rename_table(const char *from, const char *to); int delete_table(const char *name); @@ -135,28 +134,9 @@ class ha_ndbcluster: public handler THR_LOCK_DATA **to, enum thr_lock_type lock_type); - bool low_byte_first() const - { -#ifdef WORDS_BIGENDIAN - return FALSE; -#else - return TRUE; -#endif - } - bool has_transactions() { return TRUE; } - - const char* index_type(uint key_number) { - switch (get_index_type(key_number)) { - case ORDERED_INDEX: - case UNIQUE_ORDERED_INDEX: - case PRIMARY_KEY_ORDERED_INDEX: - return "BTREE"; - case UNIQUE_INDEX: - case PRIMARY_KEY_INDEX: - default: - return "HASH"; - } - } + bool low_byte_first() const; + bool has_transactions(); + const char* index_type(uint key_number); double scan_time(); ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key); @@ -165,7 +145,7 @@ class ha_ndbcluster: public handler static Thd_ndb* seize_thd_ndb(); static void release_thd_ndb(Thd_ndb* thd_ndb); - uint8 table_cache_type() { return HA_CACHE_TBL_NOCACHE; } + uint8 table_cache_type(); private: int alter_table_name(const char *from, const char *to); @@ -180,7 +160,8 @@ class ha_ndbcluster: public handler void release_metadata(); NDB_INDEX_TYPE get_index_type(uint idx_no) const; NDB_INDEX_TYPE get_index_type_from_table(uint index_no) const; - + int check_index_fields_not_null(uint index_no); + int pk_read(const byte *key, uint key_len, byte *buf); int complemented_pk_read(const byte *old_data, byte *new_data); int peek_row(); @@ -258,6 +239,12 @@ class ha_ndbcluster: public handler char *m_blobs_buffer; uint32 m_blobs_buffer_size; uint m_dupkey; + // set from thread variables at external lock + bool m_ha_not_exact_count; + bool m_force_send; + ha_rows m_autoincrement_prefetch; + bool m_transaction_on; + bool m_use_local_query_cache; void set_rec_per_key(); void records_update(); @@ -267,6 +254,8 @@ class ha_ndbcluster: public handler void no_uncommitted_rows_reset(THD *); friend int execute_no_commit(ha_ndbcluster*, NdbConnection*); + friend int execute_commit(ha_ndbcluster*, NdbConnection*); + friend int execute_no_commit_ie(ha_ndbcluster*, NdbConnection*); }; bool ndbcluster_init(void); |