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

MWL#121-125 DS-MRR improvements

- Address Monty's review feedback, part 5
This commit is contained in:
Sergey Petrunya
2010-12-02 14:10:52 +03:00
parent f2abf5f6b1
commit 44be131cd3
10 changed files with 206 additions and 164 deletions

View File

@ -3597,6 +3597,16 @@ int JOIN_TAB_SCAN_MRR::next()
}
static
void bka_range_seq_key_info(void *init_params, uint *length,
key_part_map *map)
{
TABLE_REF *ref= &(((JOIN_CACHE*)init_params)->join_tab->ref);
*length= ref->key_length;
*map= (key_part_map(1) << ref->key_parts) - 1;
}
/*
Initialize retrieval of range sequence for BKA join algorithm
@ -3876,7 +3886,8 @@ int JOIN_CACHE_BKA::init()
int res;
bool check_only_first_match= join_tab->check_only_first_match();
RANGE_SEQ_IF rs_funcs= { bka_range_seq_init,
RANGE_SEQ_IF rs_funcs= { bka_range_seq_key_info,
bka_range_seq_init,
bka_range_seq_next,
check_only_first_match ?
bka_range_seq_skip_record : 0,
@ -4265,7 +4276,8 @@ int JOIN_CACHE_BKAH::init()
no_association= test(mrr_mode & HA_MRR_NO_ASSOCIATION);
RANGE_SEQ_IF rs_funcs= { bkah_range_seq_init,
RANGE_SEQ_IF rs_funcs= { bka_range_seq_key_info,
bkah_range_seq_init,
bkah_range_seq_next,
check_only_first_match && !no_association ?
bkah_range_seq_skip_record : 0,