sql: remove unused operands from OP_IdxInsert/Replace
And rework sqlite3CompleteInsertion. Before the patch it * accepts actually unused pTab; * array of records to insert in different indexes, but inserts only one; * has sqlite code style. Code style fix is obvious. PTab is used only to check, that it is not a view and to check, that a first index is primary: 1) caller functions already guarantee the pTab is not a view; 2) regardless of a first index nature: primary or not - it is not used here. It is useless check. With the same success we can check this in each function, that uses struct Table. Array of records to insert makes no sense, since insertion is being done in a primary index only. It is enough to pass a register with a primary index tuple.
Showing
- src/box/sql/analyze.c 3 additions, 6 deletionssrc/box/sql/analyze.c
- src/box/sql/build.c 0 additions, 1 deletionsrc/box/sql/build.c
- src/box/sql/delete.c 1 addition, 1 deletionsrc/box/sql/delete.c
- src/box/sql/expr.c 2 additions, 3 deletionssrc/box/sql/expr.c
- src/box/sql/insert.c 12 additions, 77 deletionssrc/box/sql/insert.c
- src/box/sql/select.c 11 additions, 19 deletionssrc/box/sql/select.c
- src/box/sql/sqliteInt.h 13 additions, 3 deletionssrc/box/sql/sqliteInt.h
- src/box/sql/trigger.c 1 addition, 2 deletionssrc/box/sql/trigger.c
- src/box/sql/update.c 2 additions, 3 deletionssrc/box/sql/update.c
- src/box/sql/vdbe.c 7 additions, 25 deletionssrc/box/sql/vdbe.c
- src/box/sql/where.c 0 additions, 1 deletionsrc/box/sql/where.c
- src/box/sql/wherecode.c 2 additions, 7 deletionssrc/box/sql/wherecode.c
Loading
Please register or sign in to comment