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 733B52F73D for ; Fri, 2 Nov 2018 09:26:52 -0400 (EDT) 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 FCJAAUcCirod for ; Fri, 2 Nov 2018 09:26:52 -0400 (EDT) Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 D71D12F735 for ; Fri, 2 Nov 2018 09:26:51 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) Subject: [tarantool-patches] Re: [PATCH 4/6] sql: enforce implicit type conversions From: "n.pettik" In-Reply-To: <6aef2220-8320-0fbf-d051-100bf7d95f17@tarantool.org> Date: Fri, 2 Nov 2018 16:26:49 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <3ba8b43c-c6d5-ff34-1fd2-c302eae1a760@tarantool.org> <98FC4C78-08BF-4B69-8F79-9562F1285432@tarantool.org> <999eb301-5c83-f1d8-491d-87c52ab5815f@tarantool.org> <4BC8591A-1071-4D26-B18F-F0893E95C7EA@tarantool.org> <6aef2220-8320-0fbf-d051-100bf7d95f17@tarantool.org> 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 Cc: Vladislav Shpilevoy > On 2 Nov 2018, at 14:15, Vladislav Shpilevoy = wrote: >=20 > Hi! Thanks for the patch! See a couple of style micro > fixes on the branch and below: >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >=20 > diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c > index 3111c76e6..ab07e7c1c 100644 > --- a/src/box/sql/vdbe.c > +++ b/src/box/sql/vdbe.c > @@ -330,7 +330,7 @@ static int > mem_apply_affinity(struct Mem *record, enum affinity_type affinity) > { > if ((record->flags & MEM_Null) !=3D 0) > - return SQLITE_OK; > + return 0; > switch (affinity) { > case AFFINITY_INTEGER: > if ((record->flags & MEM_Int) =3D=3D MEM_Int) > diff --git a/src/box/sql/vdbemem.c b/src/box/sql/vdbemem.c > index ad9b33b99..22beba8be 100644 > --- a/src/box/sql/vdbemem.c > +++ b/src/box/sql/vdbemem.c > @@ -631,7 +631,7 @@ sqlite3VdbeMemCast(Mem * pMem, u8 aff) > case AFFINITY_INTEGER: > if ((pMem->flags & MEM_Blob) !=3D 0) { > if (sql_atoi64(pMem->z, (int64_t *) &pMem->u.i, > - pMem->n) !=3D 0) > + pMem->n) !=3D 0) > return -1; > MemSetTypeFlag(pMem, MEM_Int); > return 0; >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >=20 > Otherwise the patchset LGTM =F0=9F=8E=89 I=E2=80=99ve applied them. Anyway, it was a real struggle=E2=80=A6 Thanks a lot for participating in it.