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 25C502E244 for ; Mon, 3 Jun 2019 17:15:34 -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 xN4hMdikDAPK for ; Mon, 3 Jun 2019 17:15:34 -0400 (EDT) Received: from smtp46.i.mail.ru (smtp46.i.mail.ru [94.100.177.106]) (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 D9A3D2DF7A for ; Mon, 3 Jun 2019 17:15:33 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v5 5/6] box: run check constraint tests on space alter References: <404d8f6200796b0cf2ef5eccc8c8e67bd593ab07.1558605591.git.kshcherbatov@tarantool.org> <3639eb0f-2105-29e2-69b1-42e91facf299@tarantool.org> From: Vladislav Shpilevoy Message-ID: <3ead7c9f-ea16-fc4a-c097-fed7764b2380@tarantool.org> Date: Mon, 3 Jun 2019 23:15:31 +0200 MIME-Version: 1.0 In-Reply-To: <3639eb0f-2105-29e2-69b1-42e91facf299@tarantool.org> 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: tarantool-patches@freelists.org, Kirill Shcherbatov Thanks for the fixes! See review fixes on the branch, and at the end of the email. They are quite obvious. ================================================================== diff --git a/src/box/alter.cc b/src/box/alter.cc index 666ec3e6f..b0f8a8c9b 100644 --- a/src/box/alter.cc +++ b/src/box/alter.cc @@ -4356,7 +4356,8 @@ on_replace_dd_ck_constraint(struct trigger * /* trigger*/, void *event) diag_raise(); ck_def_guard.is_active = false; auto ck_guard = make_scoped_guard([=] { - ck_constraint_delete(new_ck_constraint); }); + ck_constraint_delete(new_ck_constraint); + }); const char *name = new_ck_constraint->def->name; struct ck_constraint *old_ck_constraint = space_ck_constraint_by_name(space, name, strlen(name)); diff --git a/src/box/ck_constraint.c b/src/box/ck_constraint.c index 2adbb3742..543c8b388 100644 --- a/src/box/ck_constraint.c +++ b/src/box/ck_constraint.c @@ -101,7 +101,7 @@ ck_constraint_resolve_field_names(struct Expr *expr, * an error description. * @param expr Ck constraint expression AST built for a given * @a ck_constraint_def, see for (sql_expr_compile and - * ck_constraint_resolve_space_def) implementation. + * ck_constraint_resolve_space_def) implementation. * @param space_def The space definition of the space this check * constraint is constructed for. * @retval not NULL sql_stmt program pointer on success.