[tarantool-patches] Re: [PATCH v2 6/7] sql: refactor sql_expr_create to set diag

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Thu Mar 7 20:34:28 MSK 2019



On 27/02/2019 14:13, Kirill Shcherbatov wrote:
> Refactored sql_expr_create routine to use diag_set in case
> of memory allocation error.

Probably it was said several times, but we use _new suffix
for constructors, creating an object on their own memory. If
you decided to rename sqlExprAlloc, then use sql_expr_new.

> This change is necessary because the sql_expr_create body has a
> sqlNameFromToken call that will be changed in subsequent patches.
> 
> Needed for #3931
> ---
>   src/box/sql/build.c         |  44 +++++--
>   src/box/sql/expr.c          | 249 +++++++++++++++---------------------
>   src/box/sql/fk_constraint.c | 185 +++++++++++++++++----------
>   src/box/sql/parse.y         |  35 +++--
>   src/box/sql/resolve.c       |  47 ++++---
>   src/box/sql/select.c        |  90 +++++++++----
>   src/box/sql/sqlInt.h        |  80 +++++++++++-
>   src/box/sql/wherecode.c     |   9 +-
>   src/box/sql/whereexpr.c     |  22 ++--
>   9 files changed, 462 insertions(+), 299 deletions(-)
> 




More information about the Tarantool-patches mailing list