sql: add OP_SetDiag opcode in VDBE
To separate the error setting and execution halting, a new opcode OP_SetDiag was created. The only functionality of the opcode is the execution of diag_set(). It is important to note that OP_SetDiag does not set is_aborted to true, so we can continue working with other opcodes, if necessary. This function allows us to perform cleanup in some special cases, for example, when creating a constraint failed because of the creation of two or more constraints with the same name in the same CREATE TABLE statement. Since now diag_set() is executed in OP_SetDiag, this functionality has been removed from OP_Halt. Needed for #4183
Showing
- src/box/sql/build.c 5 additions, 4 deletionssrc/box/sql/build.c
- src/box/sql/expr.c 4 additions, 2 deletionssrc/box/sql/expr.c
- src/box/sql/fk_constraint.c 2 additions, 1 deletionsrc/box/sql/fk_constraint.c
- src/box/sql/insert.c 6 additions, 5 deletionssrc/box/sql/insert.c
- src/box/sql/select.c 9 additions, 5 deletionssrc/box/sql/select.c
- src/box/sql/vdbe.c 20 additions, 11 deletionssrc/box/sql/vdbe.c
Loading
Please register or sign in to comment