[patches] [PATCH 2/3] sql: add type attribute to struct Column

n.pettik korablev at tarantool.org
Mon Feb 26 14:49:51 MSK 2018


>>>> diff --git a/src/box/sql/pragma.c b/src/box/sql/pragma.c
>>>> index 3eb3248c6..4aa3b2961 100644
>>>> --- a/src/box/sql/pragma.c
>>>> +++ b/src/box/sql/pragma.c
>>>> @@ -368,8 +368,8 @@ sqlite3Pragma(Parse * pParse, Token * pId,	/* First part of [schema.]id field */
>>>>  					       || pCol->pDflt->op == TK_SPAN);
>>>>  					sqlite3VdbeMultiLoad(v, 1, "issisi",
>>>>  							     i, pCol->zName,
>>>> -							     sqlite3ColumnType
>>>> -							     (pCol, ""),
>>>> +							     field_type_strs[sqlite3ColumnType
>>> too long line
>> 
>> Fixed.
>> 
>>> replace `if (pTab) {` with `if (!pTab)` above …
>> 
>> Why should I do this? I don't get it...
>> 
> I CAN NOT read the code because it requires some refactoring. In this case I suggest you to
> simply instead of `do smth in case pTab!=NULL` do `break if pTab==NULL`.

If I made this fix, it would result in huge redundant diff, which in its turn has nothing in common with this patch.
Moreover, SQL codebase contains a lot of code style violations. On team meeting few weeks ago,
we came to agreement to not fix codestyle issues in our patches (which already exist). But one day, we will dedicate
set of patches, which will clean all codebase at once. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20180226/fdfd9c79/attachment.html>


More information about the Tarantool-patches mailing list