key_def: do not lookup collation when decoding parts
We can't use key_def_decode_parts() when recovering vylog if key_def has a collation, because vylog is recovered before the snapshot, i.e. when collation objects haven't been created yet, while key_def_decode_parts() tries to look up the collation by id. As a result, we can't enable collations for vinyl indexes. To fix this, let's rework the decoding procedure so that it works with struct key_part_def instead of key_part. The only difference between the two structures is that the former references the collation by id while the latter by pointer. Needed for #2822
Showing
- src/box/alter.cc 17 additions, 6 deletionssrc/box/alter.cc
- src/box/key_def.cc 100 additions, 81 deletionssrc/box/key_def.cc
- src/box/key_def.h 41 additions, 7 deletionssrc/box/key_def.h
- src/box/vinyl.c 2 additions, 1 deletionsrc/box/vinyl.c
- src/box/vy_log.c 56 additions, 40 deletionssrc/box/vy_log.c
- src/box/vy_log.h 5 additions, 0 deletionssrc/box/vy_log.h
Loading
Please register or sign in to comment