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 4BC562BE72 for ; Wed, 24 Apr 2019 08:19:33 -0400 (EDT) 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 e8bi-8InuzuG for ; Wed, 24 Apr 2019 08:19:33 -0400 (EDT) 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 0671B2BD86 for ; Wed, 24 Apr 2019 08:19:32 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: [tarantool-patches] Re: [PATCH v1 2/3] sql: rework diag_set() in OP_Halt From: "n.pettik" In-Reply-To: <5d156e98-7b9c-09ec-b14f-3150a6e515c8@tarantool.org> Date: Wed, 24 Apr 2019 15:19:30 +0300 Content-Transfer-Encoding: 7bit Message-Id: <4E612CAF-555E-4D2E-A8AF-DC6378E8468A@tarantool.org> References: <79e3d0e51a64bf35cf5b505d2541996f60b02b8c.1555072183.git.imeevma@gmail.com> <28C698E1-979F-4148-942E-38DCAE4AE0DD@tarantool.org> <5d156e98-7b9c-09ec-b14f-3150a6e515c8@tarantool.org> 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 22 Apr 2019, at 11:24, Imeev Mergen wrote: > > > On 4/15/19 6:21 PM, n.pettik wrote: >> >>> On 12 Apr 2019, at 15:34, imeevma@tarantool.org wrote: >>> >>> Before this patch it was possible to have an error code with wrong >>> error description. This patch fixes it. >> Could you please supply this statement with an example(s)? > > Here it is: > > tarantool> box.execute("CREATE TABLE t(a INT PRIMARY KEY, b INT);") > --- > - row_count: 1 > ... > > tarantool> box.execute("INSERT INTO t VALUES (1,2), (3,4);") > --- > - row_count: 2 > ... > > tarantool> box.execute("SELECT b FROM t WHERE a = (SELECT a FROM t);") > --- > - error: 'SQL error: Expression subquery returned more than 1 row' > ... > > tarantool> box.error.last().code > --- > - 159 > ... > > > From the error message, we can say that this is an ER_SQL(160) > error. But this is wrong, as this is an ER_SQL_EXECUTE(159) error. I mean add this explanation to the commit message. Also, what is the difference between ER_SQL and ER_SQL_EXECUTE? Their descriptions look almost identical.