From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp17.mail.ru (smtp17.mail.ru [94.100.176.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 39D264696C3 for ; Wed, 15 Apr 2020 14:47:44 +0300 (MSK) From: imeevma@tarantool.org Date: Wed, 15 Apr 2020 14:47:37 +0300 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v1 0/2] sql: fix comparison in IN operator List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: v.shpilevoy@tarantool.org, tsafin@tarantool.org, tarantool-patches@dev.tarantool.org Prior to this patch-set, comparisons in the IN statement were performed using SCALAR rules in most cases. This patch-set changes this behavior for the case when the left value is not a vector whose length is greater than one. Now the left value is searched among the right values ​​only if they are comparable. If there is a value that is not comparable with the left value, the operation throws an error. https://github.com/tarantool/tarantool/issues/4692 https://github.com/tarantool/tarantool/tree/imeevma/gh-4692-specify-field-types-in-IN-statement #ChangeLog - The IN operator now always throws an error if there is a value on the right that is not comparable with the left value (gh-4256). Mergen Imeev (2): sql: fix comparison in IN with list of values sql: fix comparison in IN with subselect src/box/sql/expr.c | 43 ++++++++++- .../gh-4692-comparison-in-IN-operator.test.lua | 54 +++++++++++++ test/sql-tap/in3.test.lua | 2 +- test/sql-tap/in4.test.lua | 4 +- test/sql-tap/subquery.test.lua | 8 +- test/sql-tap/tkt-80e031a00f.test.lua | 8 +- test/sql/boolean.result | 88 +++++++--------------- 7 files changed, 132 insertions(+), 75 deletions(-) create mode 100755 test/sql-tap/gh-4692-comparison-in-IN-operator.test.lua -- 2.7.4