From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp60.i.mail.ru (smtp60.i.mail.ru [217.69.128.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 541DC445324 for ; Sun, 5 Jul 2020 20:04:36 +0300 (MSK) References: <1593757997-4145-1-git-send-email-alyapunov@tarantool.org> <1593757997-4145-6-git-send-email-alyapunov@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Sun, 5 Jul 2020 19:04:34 +0200 MIME-Version: 1.0 In-Reply-To: <1593757997-4145-6-git-send-email-alyapunov@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH 05/15] tx: save txn in txn_stmt List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aleksandr Lyapunov , tarantool-patches@dev.tarantool.org 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; >