From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 28 Jun 2019 19:15:26 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] Re: [PATCH v1 1/1] sql: rework SQL errors of type "expected column count" Message-ID: <20190628161526.dystben65fqeruji@esperanza> References: <461ca6b5a31331d36ef7d23872613f0b1c0de9d0.1558176783.git.imeevma@gmail.com> <70E77545-041F-418E-828C-335A449EF4A6@tarantool.org> <20190525111234.GB9859@tarantool.org> <4C0F73A6-4BD5-4D29-891A-57B47374B463@tarantool.org> <20190611084025.GA27968@tarantool.org> <20190625141905.GA29925@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190625141905.GA29925@tarantool.org> To: Mergen Imeev Cc: "n.pettik" , tarantool-patches@freelists.org List-ID: On Tue, Jun 25, 2019 at 05:19:05PM +0300, Mergen Imeev wrote: > From 98589eacdc8caf5a9db366d782338d5c3e551357 Mon Sep 17 00:00:00 2001 > Date: Sat, 18 May 2019 13:15:58 +0300 > Subject: [PATCH] sql: allow to use vectors as left value of IN operator > > In SQL, it is allowed to use vector expressions, that is, an > operation that uses vectors as operands. For instance, vector > comparison: > SELECT (1,2,3) < (1,2,4); > > Accidentally, routines handling IN operator contained a bug: in > cases where we used a vector as the left value in the IN operator, > we received an assertion in debug build or a segmentation fault in > release. This was due to some legacy code in which it was assumed > that the left value of the IN operator can have only one column in > case it is a vector. Let's fix this by allowing vectors of the > other sizes as the left value of the IN operator and providing > check which verifies that both sides of IN operator have the same > dimension. > > Closes #4204 Pushed to master. I failed to backport this to 2.1 - sql-tap/sql-errors test doesn't pass. Please either backport the patch by yourself or let me know which commits should be cherry-picked beside this one.