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 A4EC3287E1 for ; Mon, 13 Aug 2018 16:24:29 -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 HxLrP61EQW2Q for ; Mon, 13 Aug 2018 16:24:29 -0400 (EDT) Received: from smtp5.mail.ru (smtp5.mail.ru [94.100.179.24]) (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 D939F287D7 for ; Mon, 13 Aug 2018 16:24:28 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH 10/10] sql: move autoincrement field number to server References: <893c37395b2536af932aac033f6c54718720b63f.1534001739.git.korablev@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Mon, 13 Aug 2018 23:24:25 +0300 MIME-Version: 1.0 In-Reply-To: <893c37395b2536af932aac033f6c54718720b63f.1534001739.git.korablev@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: Nikita Pettik , tarantool-patches@freelists.org 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(-) >