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 9A1092734D for ; Fri, 15 Feb 2019 08:12:38 -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 xooBH6bHYUKI for ; Fri, 15 Feb 2019 08:12:38 -0500 (EST) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 5544921E94 for ; Fri, 15 Feb 2019 08:12:36 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: [tarantool-patches] Re: [PATCH v1 1/1] sql: rework "no such object" and "object exists" errors From: "n.pettik" In-Reply-To: <20190215125007.GB14894@chai> Date: Fri, 15 Feb 2019 16:12:33 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <1E5729AC-76AC-43BD-B7AD-871440316C17@tarantool.org> References: <168FF7F0-A4AA-42DD-AF9A-FA95098ADBBA@tarantool.org> <20190215125007.GB14894@chai> 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 , Konstantin Osipov > On 15 Feb 2019, at 15:50, Konstantin Osipov = wrote: >=20 > * n.pettik [19/02/15 15:46]: >>> + /*148 */_(ER_NO_SUCH_INDEX_NAME, "No index '%s' is = defined in space '%s'") \ >>=20 >> I=E2=80=99d better say =E2=80=99No index with name =E2=80=A6=E2=80=99. >> But it is to be discussed. >=20 > It's a copycat of the INDEX_ID message. Yep, I've noticed this, but anyway. Without no difference between error messages user would wonder why in some cases name appears, and in other - id. IMHO. >>> /** >>> + * Increment error counter if error suppression isn't set. >>> + * >>> + * @param parse_context Current parsing context. >>> + */ >>> +void >>> +sql_parser_error(struct Parse *parse_context); >>=20 >> I suggest to incapsulate call of diag set inside this >> function. To achieve this, lets make function take >> variadic params. It would allow us to reduce size >> of refactored code, at least. >=20 > Nikita, I agree in general but given this entire function is > temporary, I think it's good enough. It is going to exist until we remove parse->nErr and parse->rc - long enough, I guess.=