[Tarantool-patches] [PATCH 2/3] box: forbid to update/replace _space_sequence

Nikita Pettik korablev at tarantool.org
Fri Feb 21 18:29:34 MSK 2020


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) {


More information about the Tarantool-patches mailing list