sql: introduce opcodes to operate on system spaces
Since it is impossible to use space pointers during execution of DDL (after any DDL schema may change and pointers fetched at compile time can become expired), special opcodes to operate on system spaces have been introduced: OP_SInsert and OP_SDelete. They take space id as an argument and make space lookup each time before insertion or deletion. However, sometimes it is still required to iterate through space (e.g. to satisfy WHERE clause) during DDL. As far as now cursors rely on pointers to space, it is required to convert space id to space pointer during VDBE execution. Hence, another opcode is added: OP_SIDtoPtr. Finally, existing opcodes, which are invoked only during DDL, have been also refactored. Part of #3252
Showing
- src/box/sql.c 32 additions, 41 deletionssrc/box/sql.c
- src/box/sql/build.c 5 additions, 14 deletionssrc/box/sql/build.c
- src/box/sql/opcodes.c 24 additions, 21 deletionssrc/box/sql/opcodes.c
- src/box/sql/opcodes.h 27 additions, 24 deletionssrc/box/sql/opcodes.h
- src/box/sql/tarantoolInt.h 15 additions, 9 deletionssrc/box/sql/tarantoolInt.h
- src/box/sql/vdbe.c 93 additions, 29 deletionssrc/box/sql/vdbe.c
Loading
Please register or sign in to comment