sql: rework sqlSrcListAppend to set diag
Refactored sqlSrcListAppend routine as sql_src_list_append and reworked it to use diag_set in case of memory allocation error. This change is necessary because the sql_src_list_append body has a sqlNameFromToken call that will be changed in subsequent patches. This patch refers to a series of preparatory patches that provide the use of Tarantool errors in the call tree that includes sqlNormalizeName, since this call can later return errors. This patch is not self-sufficient, its sqlNameFromToken call remained to be non-Tarantool (for now). It means, that if sqlNameFromToken fails in sql_src_list_append there is no diag message created. Part of #3931
Showing
- src/box/sql/build.c 17 additions, 53 deletionssrc/box/sql/build.c
- src/box/sql/delete.c 9 additions, 7 deletionssrc/box/sql/delete.c
- src/box/sql/fk_constraint.c 11 additions, 8 deletionssrc/box/sql/fk_constraint.c
- src/box/sql/parse.y 19 additions, 5 deletionssrc/box/sql/parse.y
- src/box/sql/select.c 4 additions, 4 deletionssrc/box/sql/select.c
- src/box/sql/sqlInt.h 15 additions, 1 deletionsrc/box/sql/sqlInt.h
- src/box/sql/trigger.c 6 additions, 5 deletionssrc/box/sql/trigger.c
Loading
Please register or sign in to comment