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 77A9F26CBC for ; Thu, 21 Feb 2019 14:01:26 -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 XJ_dwoqK_-vo for ; Thu, 21 Feb 2019 14:01:26 -0500 (EST) 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 turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 16A3026C0F for ; Thu, 21 Feb 2019 14:01:26 -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 five syntax errors From: "n.pettik" In-Reply-To: Date: Thu, 21 Feb 2019 22:01:22 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <2B41863C-0BA8-4D93-A296-9F5523D59714@tarantool.org> 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 > On 21 Feb 2019, at 18:40, imeevma@tarantool.org wrote: >=20 > This patch reworks five syntax errors. Why only five? There are 10 errors at all, so lets finish this part adding all syntax errors. > These SQL errors were > converted into Tarantool errors. >=20 > Part of #3965 > --- > https://github.com/tarantool/tarantool/issues/3965 > = https://github.com/tarantool/tarantool/tree/imeevma/gh-3965-use-diag_set-t= o-describe-error >=20 > diff --git a/src/box/errcode.h b/src/box/errcode.h > index 1523b19..1807151 100644 > --- a/src/box/errcode.h > +++ b/src/box/errcode.h > @@ -230,6 +230,11 @@ struct errcode_record { > /*175 */_(ER_SQL_NO_SUCH_PRAGMA, "Pragma '%s' does not = exist") \ > /*176 */_(ER_SQL_CANT_RESOLVE_FIELD, "Can=E2=80=99t resolve = field '%s'") \ > /*177 */_(ER_INDEX_EXISTS_IN_SPACE, "Index '%s' already = exists in space '%s'") \ > + /*178 */_(ER_SQL_SYNTAX, "Syntax error in %s: = %s") \ > + /*179 */_(ER_SQL_STACK_OVERFLOW, "Failed to parse SQL = statement: parser stack limit reached") \ > + /*180 */_(ER_SQL_SELECT_WILDCARD, "Failed to expand '*' in = SELECT statement without FROM clause") \ > + /*181 */_(ER_SQL_STATEMENT_EMPTY, "Failed to execute an = empty SQL statement") \ I=E2=80=99ve already said that: why do we consider empty query as an = error? Don=E2=80=99t understand. The rest is ok as obvious.=