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 2065A265B0 for ; Mon, 19 Aug 2019 16:44:17 -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 9VKKAX5FRbwz for ; Mon, 19 Aug 2019 16:44:17 -0400 (EDT) Received: from smtp41.i.mail.ru (smtp41.i.mail.ru [94.100.177.101]) (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 12E8E247C2 for ; Mon, 19 Aug 2019 16:44:15 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH 2/3] txn: merge struct sql_txn into struct txn References: <7d398281ec92e03c1d6f5f1bf93970debcfcc684.1565190104.git.korablev@tarantool.org> <97A342BD-97BD-451F-A54B-A9CF18D352A3@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Mon, 19 Aug 2019 22:47:09 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 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: "n.pettik" , tarantool-patches@freelists.org Hi! Thanks for the fixes! Mine is in a separate commit on the branch (after "txn: merge struct sql_txn into struct txn"), and below. Please, squash if you are ok with that. Talking of savepoint duplicate names - it is a bug existing in 2.2.1 too. I think, we should backport the fix. Or not. Up to Kirill. =============================================================== commit e955f4ad3ad4114a15f35594153ed66f3c23d661 Author: Vladislav Shpilevoy Date: Mon Aug 19 22:39:15 2019 +0200 Review fix diff --git a/src/box/txn.c b/src/box/txn.c index bd024a73c..1002c2136 100644 --- a/src/box/txn.c +++ b/src/box/txn.c @@ -805,7 +805,7 @@ box_txn_rollback_to_savepoint(box_txn_savepoint_t *svp) } txn_rollback_to_svp(txn, svp->stmt); /* Discard from list all newer savepoints. */ - struct rlist discard = { }; + RLIST_HEAD(discard); rlist_cut_before(&discard, &txn->savepoints, &svp->link); txn->fk_deferred_count = svp->fk_deferred_count; return 0; @@ -825,7 +825,7 @@ txn_savepoint_release(struct txn_savepoint *svp) * Discard current savepoint alongside with all * created after it savepoints. */ - struct rlist discard = { }; + RLIST_HEAD(discard); rlist_cut_before(&discard, &txn->savepoints, rlist_next(&svp->link)); }