From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <tarantool-patches-bounce@freelists.org>
Received: from localhost (localhost [127.0.0.1])
	by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id D2FB1214F5
	for <tarantool-patches@freelists.org>; Wed, 18 Jul 2018 12:51:46 -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 scIcZ_UmMLWG for <tarantool-patches@freelists.org>;
	Wed, 18 Jul 2018 12:51:46 -0400 (EDT)
Received: from smtp16.mail.ru (smtp16.mail.ru [94.100.176.153])
	(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 8F1B621469
	for <tarantool-patches@freelists.org>; Wed, 18 Jul 2018 12:51:46 -0400 (EDT)
Date: Wed, 18 Jul 2018 19:51:49 +0300
From: Alexander Turenko <alexander.turenko@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH] sql: assertion fail on nested
 select
Message-ID: <20180718165149.kf5l67vvad3t3ysw@tkn_work_nb>
References: <1530533500-9666-1-git-send-email-hollow653@gmail.com>
 <20180717135933.cc2g7rlbb2xl4kgo@tkn_work_nb>
 <CAEi+_aqjev=MJqutrvud4OwO+Qe3EYcQ6FWKtvUS-K894bx1pA@mail.gmail.com>
 <CAEi+_apJnLTqOp+k3U7jEYUuJR1CJgDDZ4mFWMCvB6LQBvfFzg@mail.gmail.com>
 <07E4F387-E976-432B-A80B-E01B40BCF126@corp.mail.ru>
 <CAEi+_aoR1Bq_V0=G0ediVrUk8Vcusjn4P+XwUWaYdGC-vHpMkQ@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CAEi+_aoR1Bq_V0=G0ediVrUk8Vcusjn4P+XwUWaYdGC-vHpMkQ@mail.gmail.com>
Sender: tarantool-patches-bounce@freelists.org
Errors-to: tarantool-patches-bounce@freelists.org
Reply-To: tarantool-patches@freelists.org
List-help: <mailto:ecartis@freelists.org?Subject=help>
List-unsubscribe: <tarantool-patches-request@freelists.org?Subject=unsubscribe>
List-software: Ecartis version 1.0.0
List-Id: tarantool-patches <tarantool-patches.freelists.org>
List-subscribe: <tarantool-patches-request@freelists.org?Subject=subscribe>
List-owner: <mailto:>
List-post: <mailto:tarantool-patches@freelists.org>
List-archive: <http://www.freelists.org/archives/tarantool-patches>
To: Nikita Pettik <n.pettik@corp.mail.ru>
Cc: Nikita Tatunov <hollow653@gmail.com>, tarantool-patches@freelists.org

The patch LGTM. Nikita P., what do you think?

WBR, Alexander Turenko.

On Wed, Jul 18, 2018 at 06:37:00PM +0300, Nikita Tatunov wrote:
>    I woudln't consider it as an actual 'fix' though.
> 
>    ср, 18 июл. 2018 г. в 18:17, [1]n.pettik@corp.mail.ru
>    <[2]n.pettik@corp.mail.ru>:
> 
>    I tried to test that problem on this sqlite3 version with
>    -DSQLITE_DEBUG and assertion fails there.
>    Since flattening only makes another compound select-stmt with ORDER BY
>    clause I guess error was
>    occuring on flattened version of it. Moreover in latter versions of
>    sqlite3 this assert was deleted and the
>    restriction check wasn't fixed. So I assume sqlite3 developers just
>    don't know about it or don't aim on
>    fixing it as the error anyways occurs but on flattened subquery.
> 
>    Here is original fix of this assertion fail (JFYI):
>    [3]https://www.sqlite.org/src/info/823779d31eb09cda
> 
> References
> 
>    1. mailto:n.pettik@corp.mail.ru
>    2. mailto:n.pettik@corp.mail.ru
>    3. https://www.sqlite.org/src/info/823779d31eb09cda