space: add method to fetch next rowid
Ephemeral space are extensively used in SQL to store intermediate results of query processing. To keep things simple, they feature only one unique index (primary) which covers all fields. However, ephemeral space can be used to store non-unique entries. In this case, one additional field added to the end if stored data: [field1, ... fieldn, rowid] Note that it can't be added to the beginning of tuple since data in ephemeral space may be kept as sorted. Previously, to generate proper rowid index_max() was used. However, it is obviously wrong way to do it. Hence, lets add simple integer counter to memtx space (ephemeral spaces are valid only for memtx engine) and introduce method in vtab to fetch next rowid value. Needed for #3297
Showing
- src/box/blackhole.c 1 addition, 0 deletionssrc/box/blackhole.c
- src/box/memtx_space.c 11 additions, 0 deletionssrc/box/memtx_space.c
- src/box/memtx_space.h 7 additions, 0 deletionssrc/box/memtx_space.h
- src/box/space.c 9 additions, 0 deletionssrc/box/space.c
- src/box/space.h 3 additions, 0 deletionssrc/box/space.h
- src/box/sysview.c 1 addition, 0 deletionssrc/box/sysview.c
- src/box/vinyl.c 1 addition, 0 deletionssrc/box/vinyl.c
Loading
Please register or sign in to comment