From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id AD1B028BE6 for ; Thu, 7 Mar 2019 12:34:30 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gJCCy05sjicc for ; Thu, 7 Mar 2019 12:34:30 -0500 (EST) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 3C5B128BEA for ; Thu, 7 Mar 2019 12:34:30 -0500 (EST) Subject: [tarantool-patches] Re: [PATCH v2 6/7] sql: refactor sql_expr_create to set diag References: <645e4a4d0e2ddeaf747fe8a11affb52cb3157df3.1551265819.git.kshcherbatov@tarantool.org> From: Vladislav Shpilevoy Message-ID: <30714d52-a753-0d00-b28d-d05a1fd2a623@tarantool.org> Date: Thu, 7 Mar 2019 20:34:28 +0300 MIME-Version: 1.0 In-Reply-To: <645e4a4d0e2ddeaf747fe8a11affb52cb3157df3.1551265819.git.kshcherbatov@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org, Kirill Shcherbatov 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(-) >