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 6485A26853 for ; Mon, 22 Apr 2019 04:24:45 -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 Ty80wUkxJArx for ; Mon, 22 Apr 2019 04:24:45 -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 253E325C4B for ; Mon, 22 Apr 2019 04:24:45 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v1 2/3] sql: rework diag_set() in OP_Halt References: <79e3d0e51a64bf35cf5b505d2541996f60b02b8c.1555072183.git.imeevma@gmail.com> <28C698E1-979F-4148-942E-38DCAE4AE0DD@tarantool.org> From: Imeev Mergen Message-ID: <5d156e98-7b9c-09ec-b14f-3150a6e515c8@tarantool.org> Date: Mon, 22 Apr 2019 11:24:42 +0300 MIME-Version: 1.0 In-Reply-To: <28C698E1-979F-4148-942E-38DCAE4AE0DD@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US 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: "n.pettik" , tarantool-patches@freelists.org 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.