Get rid of tuple_field_by_part_multikey
Always require multikey_idx to be passed to tuple_field_by_part. If the key definition isn't multikey, pass -1. Rationale: having separate functions for multikey and unikey indexes doesn't have any performance benefits (as all those functions are inline), but makes the code inconsistent with other functions (e.g. tuple_compare) which don't have a separate multikey variant. After all, passing -1 when the key definition is known to be unikey doesn't blow the code. While we are at it, let's also add a few assertions ensuring that the key definition isn't multikey to functions that don't support multikey yet.
Showing
- src/box/memtx_bitset.c 3 additions, 3 deletionssrc/box/memtx_bitset.c
- src/box/memtx_rtree.c 2 additions, 1 deletionsrc/box/memtx_rtree.c
- src/box/tuple.h 8 additions, 21 deletionssrc/box/tuple.h
- src/box/tuple_compare.cc 28 additions, 25 deletionssrc/box/tuple_compare.cc
- src/box/tuple_extract_key.cc 7 additions, 5 deletionssrc/box/tuple_extract_key.cc
- src/box/tuple_hash.cc 10 additions, 7 deletionssrc/box/tuple_hash.cc
Loading
Please register or sign in to comment