box: initialize index_def::cmp_def in index_def constructor
We're going to need a key def of secondary key augmented with key parts from the primary key in memtx engine as well. Initialize it when creating struct index_def. This patch reverts f42e1c15, i.e. the fix for gh-2386 (box_index_key_def() as part of module API). Exporting this function to C API was premature. Luckily it is not used anywhere except 1.8. For 1.8 this patch introduces a faster function, space_index_key_def(), which takes a pointer to space rather than space id.
Showing
- src/box/alter.cc 1 addition, 1 deletionsrc/box/alter.cc
- src/box/index.cc 0 additions, 13 deletionssrc/box/index.cc
- src/box/index.h 0 additions, 15 deletionssrc/box/index.h
- src/box/key_def.cc 15 additions, 8 deletionssrc/box/key_def.cc
- src/box/key_def.h 14 additions, 2 deletionssrc/box/key_def.h
- src/box/schema.cc 1 addition, 1 deletionsrc/box/schema.cc
- src/box/space.cc 8 additions, 0 deletionssrc/box/space.cc
- src/box/space.h 7 additions, 0 deletionssrc/box/space.h
- src/box/vy_index.c 5 additions, 10 deletionssrc/box/vy_index.c
- test/app-tap/module_api.c 0 additions, 40 deletionstest/app-tap/module_api.c
- test/app-tap/module_api.test.lua 1 addition, 1 deletiontest/app-tap/module_api.test.lua
Loading
Please register or sign in to comment