[tarantool-patches] [PATCH 0/2] sql: allow <COLLATE> only for string-like args

Roman Khabibov roman.habibov at tarantool.org
Wed May 8 14:29:14 MSK 2019


This patchset disallows use of <COLLATE> 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 <COLLATE> 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)





More information about the Tarantool-patches mailing list