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 2AE0F23D72 for ; Tue, 3 Jul 2018 04:06:35 -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 enu3OfwnELwc for ; Tue, 3 Jul 2018 04:06:35 -0400 (EDT) Received: from smtp37.i.mail.ru (smtp37.i.mail.ru [94.100.177.97]) (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 D56BB23303 for ; Tue, 3 Jul 2018 04:06:34 -0400 (EDT) Date: Tue, 3 Jul 2018 11:06:30 +0300 From: Kirill Yukhin Subject: [tarantool-patches] Re: [PATCH v1 1/1] sql: disallow returning many rows from subselect Message-ID: <20180703080630.wmzzchios3j7u7pm@tarantool.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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: v.shpilevoy@tarantool.org, Kirill Shcherbatov Hello, On 18 июн 14:55, Kirill Shcherbatov wrote: > Branch: http://github.com/tarantool/tarantool/tree/kshch/gh-2366-whith-select-subquery > Issue: https://github.com/tarantool/tarantool/issues/2366 > > To follow ANSI SQL standard we should dissallow returning > multiple rows from subselects. To achieve this goal we have > introduced some special Select SF_SingleRow flag that indicates > the case of subselect having no client-defined LIMIT 1 to patch > system implicit LIMIT 1 to be LIMIT 2 and generate some extra > bytecode to HALT execution on reaching this restrict. > The place of patching LIMIT expression iValue is a very special: > this showld be done after simplifying epression tree(as this > restrict could become useless), but before generating related > bytecode. I've checked in the patch into 2.0 branch. -- Regards, Kirill Yukhin