1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

DS-MRR support improvements (MWL#123, MWL#124, MWL#125)

- Lots of TODO comments
- add mrr_sort_keys flag to @@optimizer_switch
- [from Igor] SQL layer part passes HA_MRR_MATERIALIZED_KEYS flag
- Don't call rnd_pos() many times in a row if sorted rowid buffer
  has the same rowid value for multiple consequive (rowid, range_id) pairs.
This commit is contained in:
Sergey Petrunya
2010-07-17 18:03:50 +04:00
parent e1006e9e1f
commit e0999cdf7c
7 changed files with 181 additions and 48 deletions

View File

@ -114,6 +114,8 @@ private:
uchar *mrr_buf_last; /* When reading: end of used buffer space */
uchar *mrr_buf_end; /* End of the buffer */
uchar *mrr_buf_next_identical;
bool dsmrr_eof; /* TRUE <=> We have reached EOF when reading index tuples */
/* TRUE <=> need range association, buffer holds {rowid, range_id} pairs */
@ -143,8 +145,8 @@ private:
uint *buffer_size, COST_VECT *cost);
bool check_cpk_scan(uint keyno, uint mrr_flags);
static int key_tuple_cmp(void* arg, uchar* key1, uchar* key2);
int dsmrr_fill_buffer();
void dsmrr_fill_buffer_cpk();
int dsmrr_fill_rowid_buffer();
void dsmrr_fill_key_buffer();
int dsmrr_next_cpk(char **range_info);
};