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 E914C26494 for ; Tue, 19 Jun 2018 11:24:01 -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 jizFvyM8H74k for ; Tue, 19 Jun 2018 11:24:01 -0400 (EDT) Received: from smtp38.i.mail.ru (smtp38.i.mail.ru [94.100.177.98]) (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 A52462648B for ; Tue, 19 Jun 2018 11:24:01 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v3 10/10] sql: VDBE tests for trigger existence References: <2dc4c354dc72123c3447831a6ac48038eaf95f48.1528997527.git.kshcherbatov@tarantool.org> <05ff2cb5-d224-7b04-5aa8-d7d57b7c0031@tarantool.org> <04bda6c6-247c-0ad4-b78d-701d1d34c974@tarantool.org> <79bd10d4-579b-92b3-e1ed-755d33febb8b@tarantool.org> <4ed9ea53-a3b1-a633-9174-f7db97f3e40c@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Tue, 19 Jun 2018 18:23:57 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed 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: Kirill Shcherbatov , tarantool-patches@freelists.org Thanks for the fixes! > diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c > index c1df880..9f7f50d 100644 > --- a/src/box/sql/vdbe.c > +++ b/src/box/sql/vdbe.c > @@ -2999,8 +3003,10 @@ case OP_CheckViewReferences: { > struct space *space = space_by_id(space_id); > assert(space != NULL); > if (space->def->view_ref_count > 0) { > - sqlite3VdbeError(p,"Can't drop table %s: other views depend " > - "on this space", space->def->name); > + box_error_set(__FILE__, __LINE__, ER_DROP_SPACE, > + tnt_errcode_desc(ER_DROP_SPACE), > + space->def->name, > + "other views depend on this space"); As I told you verbally, here you can use directly diag_set since you know the concrete error code and parameters. So please, apply this diff: @@ -3003,10 +3003,8 @@ case OP_CheckViewReferences: { struct space *space = space_by_id(space_id); assert(space != NULL); if (space->def->view_ref_count > 0) { - box_error_set(__FILE__, __LINE__, ER_DROP_SPACE, - tnt_errcode_desc(ER_DROP_SPACE), - space->def->name, - "other views depend on this space"); + diag_set(ClientError, ER_DROP_SPACE, space->def->name, + "other views depend on this space"); rc = SQL_TARANTOOL_ERROR; goto abort_due_to_error; } > rc = SQL_TARANTOOL_ERROR; > goto abort_due_to_error; > }