mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
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
This commit is contained in:
parent
11538b81bf
commit
0f0635ec0f
2 changed files with 159 additions and 38 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue