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 520192873F for ; Tue, 5 Mar 2019 04:34:23 -0500 (EST) 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 Bss7gCCj7d1a for ; Tue, 5 Mar 2019 04:34:23 -0500 (EST) Received: from smtp33.i.mail.ru (smtp33.i.mail.ru [94.100.177.93]) (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 0DAB0282D2 for ; Tue, 5 Mar 2019 04:34:22 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: [tarantool-patches] Re: [PATCH v3 8/9] sql: rework three errors of "unsupported" type From: "n.pettik" In-Reply-To: Date: Tue, 5 Mar 2019 12:34:19 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: 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 Cc: Imeev Mergen > diff --git a/src/box/errcode.h b/src/box/errcode.h > index 06f7a63..f2ea27a 100644 > --- a/src/box/errcode.h > +++ b/src/box/errcode.h > @@ -246,6 +246,7 @@ struct errcode_record { > /*191 */_(ER_HEX_LITERAL_MAX, "Hex literal %s%s length = %d exceeds the supported limit (%d)") \ > /*192 */_(ER_INT_LITERAL_MAX, "Integer literal %s%s = exceeds the supported range %lld - %lld") \ > /*193 */_(ER_SQL_PARSER_LIMIT, "%s%.*s %d exceeds the = limit (%d)") \ > + /*194 */_(ER_SQL_ANALYZE_ARGUMENT, "ANALYZE statement = argument %s is not a base table") \ Why does this error deserve to be so special? To be honest, I would remove it at all and simply do nothing in case of view is analysed. Or make it raise not only for views, but in several other cases. For instance, what if we analyse space without format or indexes? Spoiler: it leads to assertion fault Assertion failed: (space->index_count !=3D 0), function = vdbe_emit_analyze_space, file = /Users/n.pettik/tarantool/src/box/sql/analyze.c, line 799. Abort trap: 6