[tarantool-patches] Re: [PATCH 10/10] sql: move autoincrement field number to server

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Mon Aug 13 23:24:25 MSK 2018


Are you sure it is the only way to pass autoinc fieldno? And that it can
not be dropped and calculated from other fields without significant problems?

Now this flag looks very ugly inside _space tuples.

I think, autoinc is rather primary index option than the space, and that it
can be detected via checking

     pk->part_count == 1 and space->sequence != NULL

then pk->parts[0].fieldno is autoinc field. It is not?

On 12/08/2018 17:13, Nikita Pettik wrote:
> During INSERT SQL statement execution we may need to know field which
> stores INTEGER AUTOINCREMENT PRIMARY KEY. Since we are going to get rid
> of struct Table, lets move this member to space's opts.
> 
> Part of #3561
> ---
>   src/box/space_def.c     |  3 +++
>   src/box/space_def.h     |  5 +++++
>   src/box/sql.c           | 11 +++++++++--
>   src/box/sql/build.c     |  6 +++---
>   src/box/sql/insert.c    | 20 +++++++++++++-------
>   src/box/sql/sqliteInt.h |  2 --
>   6 files changed, 33 insertions(+), 14 deletions(-)
> 




More information about the Tarantool-patches mailing list