From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 A4060469719 for ; Fri, 21 Feb 2020 18:29:36 +0300 (MSK) Date: Fri, 21 Feb 2020 18:29:34 +0300 From: Nikita Pettik Message-ID: <20200221152934.GD51816@tarantool.org> References: <79a6254a868ee44517921a0c89af29d44dd2c4b8.1581972845.git.v.shpilevoy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <79a6254a868ee44517921a0c89af29d44dd2c4b8.1581972845.git.v.shpilevoy@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 2/3] box: forbid to update/replace _space_sequence List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org On 17 Feb 21:57, Vladislav Shpilevoy wrote: > diff --git a/src/box/alter.cc b/src/box/alter.cc > index 64af71c61..50121c79c 100644 > --- a/src/box/alter.cc > +++ b/src/box/alter.cc > @@ -4713,9 +4713,13 @@ on_replace_dd_space_sequence(struct trigger * /* trigger */, void *event) > return -1; > } LGTM Nit: as always I'd only add brief comment like: /* UPDATE operation is considered to meaningless for _space_sequence since ... */ > + if ((stmt->new_tuple != NULL) == (stmt->old_tuple != NULL)) { > + diag_set(ClientError, ER_UNSUPPORTED, > + "space \"_space_sequence\"", "update"); > + return -1; > + } > + > enum priv_type priv_type = stmt->new_tuple ? PRIV_C : PRIV_D; > - if (stmt->new_tuple && stmt->old_tuple) > - priv_type = PRIV_A; > > /* Check we have the correct access type on the sequence. * */ > if (is_generated || !stmt->new_tuple) {