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 9716A2A62A for ; Fri, 24 Aug 2018 06:05:16 -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 8J_DfVdh2g9e for ; Fri, 24 Aug 2018 06:05:16 -0400 (EDT) Received: from smtp55.i.mail.ru (smtp55.i.mail.ru [217.69.128.35]) (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 5348E2A629 for ; Fri, 24 Aug 2018 06:05:16 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v2 1/1] sql: return last_insert_id via IPROTO References: <8f24acf7f3f1583077ba1e40ba55a849ff8864a1.1533292030.git.imeevma@gmail.com> From: Vladislav Shpilevoy Message-ID: <69e57601-c71f-e403-c3cc-42a1a9225f22@tarantool.org> Date: Fri, 24 Aug 2018 13:05:13 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 8bit 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: Imeev Mergen , tarantool-patches@freelists.org Hi! Thanks for the fixes! > commit 67d6dc1cc24a35786fab71222692672c4b01d4be > Author: Mergen Imeev > Date:   Tue Jul 31 16:43:38 2018 +0300 > >     sql: return last_insert_id via IPROTO > >     After this patch client will get last_insert_id >     as additional metadata when he executes some >     statements. > >     Part of #2618 > > diff --git a/src/box/sql/vdbeInt.h b/src/box/sql/vdbeInt.h > index ce97f49..d768eee 100644 > --- a/src/box/sql/vdbeInt.h > +++ b/src/box/sql/vdbeInt.h > @@ -400,6 +400,11 @@ struct Vdbe { >      VdbeFrame *pDelFrame;    /* List of frame objects to free on VM reset */ >      int nFrame;        /* Number of frames in pFrame list */ >      u32 expmask;        /* Binding to these vars invalidates VM */ > +    /* > +     * True if field last_insert_id of current session was set > +     * in current statement. > +     */ > +    bool is_last_insert_id_set; As I asked, this flag had to be moved to the flags section of struct Vdbe, next to isPrepareV2, runOnlyOnce etc and occupy 1 bit. I did it for you this time in a separate commit on the branch. Please, look and squash. And send the whole patchset under v3 to Nikita P. >      SubProgram *pProgram;    /* Linked list of all sub-programs used by VM */ >      AuxData *pAuxData;    /* Linked list of auxdata allocations */ >      /* Anonymous savepoint for aborts only */