diff options
author | unknown <magnus@neptunus.(none)> | 2004-04-30 12:25:31 +0200 |
---|---|---|
committer | unknown <magnus@neptunus.(none)> | 2004-04-30 12:25:31 +0200 |
commit | 0f0635ec0f833b547a3602656d6330e5d1f7cc2a (patch) | |
tree | e7774d1b3d2fbfd1f0e8313fa483db1cf731ef25 /sql/ha_ndbcluster.h | |
parent | 11538b81bfc94aff5051f85bdb9e9ea3d1ded6d6 (diff) | |
download | mariadb-git-0f0635ec0f833b547a3602656d6330e5d1f7cc2a.tar.gz |
Add extra ordered index in when UNIQUE and PRIMARY KEY are specified.
Extra ordered indexes are created primarily
to support partial key scan/read and range scans of hash indexes.
I.e. the ordered index are used instead of the hash indexes for
these queries.
sql/ha_ndbcluster.cc:
Add creation and use of extra ordered indexes on pk and unique indexes.
sql/ha_ndbcluster.h:
Added new functions for creating extra ordered indexes
Diffstat (limited to 'sql/ha_ndbcluster.h')
-rw-r--r-- | sql/ha_ndbcluster.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h index ed66d07d79b..13466be9eb2 100644 --- a/sql/ha_ndbcluster.h +++ b/sql/ha_ndbcluster.h @@ -135,11 +135,14 @@ class ha_ndbcluster: public handler private: int alter_table_name(const char *from, const char *to); int drop_table(); - int create_index(const char *name, KEY *key_info); + int create_index(const char *name, KEY *key_info, bool unique); + int create_ordered_index(const char *name, KEY *key_info); + int create_unique_index(const char *name, KEY *key_info); int initialize_autoincrement(const void* table); int get_metadata(const char* path); void release_metadata(); const char* get_index_name(uint idx_no) const; + const char* get_unique_index_name(uint idx_no) const; NDB_INDEX_TYPE get_index_type(uint idx_no) const; NDB_INDEX_TYPE get_index_type_from_table(uint index_no) const; @@ -193,6 +196,7 @@ class ha_ndbcluster: public handler THR_LOCK_DATA m_lock; NDB_SHARE *m_share; NDB_INDEX_TYPE m_indextype[MAX_KEY]; + const char* m_unique_index_name[MAX_KEY]; NdbRecAttr *m_value[NDB_MAX_ATTRIBUTES_IN_TABLE]; bool m_use_write; }; |