[tarantool-patches] Re: [PATCH v2 1/1] sql: return last_insert_id via IPROTO

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Fri Aug 24 13:05:13 MSK 2018


Hi! Thanks for the fixes!

> commit 67d6dc1cc24a35786fab71222692672c4b01d4be
> Author: Mergen Imeev <imeevma at gmail.com>
> 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 */




More information about the Tarantool-patches mailing list