[Tarantool-patches] [PATCH 05/15] tx: save txn in txn_stmt
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Sun Jul 5 20:04:34 MSK 2020
Thanks for the patch!
Why?
On 03/07/2020 08:33, Aleksandr Lyapunov wrote:
> ---
> src/box/txn.c | 1 +
> src/box/txn.h | 2 ++
> 2 files changed, 3 insertions(+)
>
> diff --git a/src/box/txn.c b/src/box/txn.c
> index 1235201..71e732c 100644
> --- a/src/box/txn.c
> +++ b/src/box/txn.c
> @@ -100,6 +100,7 @@ txn_stmt_new(struct region *region)
> }
>
> /* Initialize members explicitly to save time on memset() */
> + stmt->txn = in_txn();
> stmt->space = NULL;
> stmt->old_tuple = NULL;
> stmt->new_tuple = NULL;
> diff --git a/src/box/txn.h b/src/box/txn.h
> index 3f6d79d..5b264f0 100644
> --- a/src/box/txn.h
> +++ b/src/box/txn.h
> @@ -85,6 +85,8 @@ struct txn_stmt {
>
> /** A linked list of all statements. */
> struct stailq_entry next;
> + /** Owner of that statement. */
> + struct txn *txn;
> /** Undo info. */
> struct space *space;
> struct tuple *old_tuple;
>
More information about the Tarantool-patches
mailing list