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 4A1C12EA88 for ; Wed, 8 May 2019 07:29:21 -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 GcXyW7RoZK_s for ; Wed, 8 May 2019 07:29:21 -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 7342C2EA71 for ; Wed, 8 May 2019 07:29:20 -0400 (EDT) From: Roman Khabibov Subject: [tarantool-patches] [PATCH 0/2] sql: allow only for string-like args Date: Wed, 8 May 2019 14:29:14 +0300 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 This patchset disallows use of clause with non-string-like argumennts, that can be litherals, table columns, expressions with different operators or compound subquiries. During the work on this issue I found strange behaviour: node with explicit collation in the certain kind of query (more in the patch) was duplicated as left node. I think, that it is a bug, so I have fixed that. Roman Khabibov (2): sql: fix collation node duplication in AST sql: allow only for string-like args src/box/sql/expr.c | 16 +++++++++ src/box/sql/resolve.c | 2 +- test/sql-tap/collation.test.lua | 50 ++++++++++++++++++++++++++- test/sql-tap/distinct.test.lua | 8 ++--- test/sql-tap/e_select1.test.lua | 2 +- test/sql-tap/identifier_case.test.lua | 2 +- test/sql-tap/resolver01.test.lua | 12 +++---- test/sql-tap/select1.test.lua | 2 +- test/sql-tap/selectE.test.lua | 15 +++----- test/sql-tap/with1.test.lua | 2 +- 10 files changed, 85 insertions(+), 26 deletions(-) -- Issue: https://github.com/tarantool/tarantool/issues/3804 Branch: https://github.com/tarantool/tarantool/tree/romanhabibov/gh-3804-collate 2.20.1 (Apple Git-117)