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 639BD22886 for ; Mon, 2 Jul 2018 10:42:23 -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 o8-8S1oNZcPf for ; Mon, 2 Jul 2018 10:42:23 -0400 (EDT) Received: from smtp58.i.mail.ru (smtp58.i.mail.ru [217.69.128.38]) (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 BEE4422884 for ; Mon, 2 Jul 2018 10:42:22 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v2 1/1] sql: disallow returning many rows from subselect References: <7815ec2cb5cfb0d837478cff88fe4ba95503e8d7.1530113937.git.kshcherbatov@tarantool.org> <80d9fc88-3030-764b-55f2-86d6e5e33f03@tarantool.org> <411BF67B-D49B-468C-80EF-AF31D520F0DF@tarantool.org> <7ba69010-2e21-9e4f-d923-4061ddecf4cf@tarantool.org> <1ea436b1-2471-2b8a-8223-c12095308994@tarantool.org> From: Vladislav Shpilevoy Message-ID: <93dc0283-244c-8ea6-46bc-10e616be1810@tarantool.org> Date: Mon, 2 Jul 2018 17:42:17 +0300 MIME-Version: 1.0 In-Reply-To: <1ea436b1-2471-2b8a-8223-c12095308994@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Kirill Shcherbatov , tarantool-patches@freelists.org Thanks for the fixes! >> 3. I do not see where do you set an appropriate error code (p5). >> 4. Same. > @@ -2145,6 +2145,7 @@ computeLimitRegisters(Parse * pParse, Select * p, int iBreak) > sqlite3VdbeAddOp4(v, OP_Halt, > SQL_TARANTOOL_ERROR, > 0, 0, error, P4_STATIC); > + sqlite3VdbeChangeP5(v, ER_SQL_EXECUTE); > sqlite3VdbeResolveLabel(v, no_err); > sqlite3ReleaseTempReg(pParse, r1); > > @@ -5452,6 +5453,7 @@ vdbe_code_raise_on_multiple_rows(struct Parse *parser, int limit_reg, int end_ma > sqlite3VdbeAddOp4(v, OP_Halt, SQL_TARANTOOL_ERROR, > ON_CONFLICT_ACTION_FAIL, 0, > error, P4_STATIC); > + sqlite3VdbeChangeP5(v, SQL_TARANTOOL_ERROR); SQL_TARANTOOL_ERROR is not error code. See errcode.h. The previous hunk is correct.