[tarantool-patches] Re: [PATCH 4/6] sql: enforce implicit type conversions
n.pettik
korablev at tarantool.org
Fri Nov 2 16:26:49 MSK 2018
> On 2 Nov 2018, at 14:15, Vladislav Shpilevoy <v.shpilevoy at tarantool.org> wrote:
>
> Hi! Thanks for the patch! See a couple of style micro
> fixes on the branch and below:
>
> =====================================================
>
> 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) != 0)
> - return SQLITE_OK;
> + return 0;
> switch (affinity) {
> case AFFINITY_INTEGER:
> if ((record->flags & MEM_Int) == 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) != 0) {
> if (sql_atoi64(pMem->z, (int64_t *) &pMem->u.i,
> - pMem->n) != 0)
> + pMem->n) != 0)
> return -1;
> MemSetTypeFlag(pMem, MEM_Int);
> return 0;
>
> =====================================================
>
> Otherwise the patchset LGTM 🎉
I’ve applied them. Anyway, it was a real struggle…
Thanks a lot for participating in it.
More information about the Tarantool-patches
mailing list