From: Nikita Pettik <korablev@tarantool.org> To: tarantool-patches@freelists.org Cc: v.shpilevoy@tarantool.org, Nikita Pettik <korablev@tarantool.org> Subject: [tarantool-patches] [PATCH 0/3] Change collation compatibility rules according to ANSI SQL Date: Thu, 25 Oct 2018 14:00:06 +0300 [thread overview] Message-ID: <cover.1540460716.git.korablev@tarantool.org> (raw) Branch: https://github.com/tarantool/tarantool/tree/np/gh-3185-ban-comparison-with-different-collations Issue: https://github.com/tarantool/tarantool/issues/3185 First two patches are auxiliary and self-explanatory. The third patch adds rules to collation compatibility in order to restrict usage of different collations within one comparison. Originally, SQLite uses doubtful approach: if collations of LHS and RHS can not be used together, then collation of LHS is chosen. Such behaviour quite misleading and results in the fact that swap of LHS and RHS values may change result of operation. We've decided to add restrictions on collations of LHS and RHS to disallow messing different collations as it is stated in ANSI SQL. Nikita Pettik (3): sql: do not add explicit <COLLATE "BINARY"> clause Add surrogate ID for BINARY collation sql: change collation compatibility rules src/box/errcode.h | 1 + src/box/key_def.c | 2 +- src/box/key_def.h | 17 ++++++ src/box/lua/space.cc | 2 +- src/box/sql/callback.c | 6 +- src/box/sql/expr.c | 70 +++++++++++++++++------ src/box/sql/fkey.c | 2 - src/box/sql/select.c | 115 ++++++++++++++++++++------------------ src/box/sql/sqliteInt.h | 28 +++++++++- src/box/sql/where.c | 13 ++--- src/box/sql/whereexpr.c | 38 ++++++------- src/box/tuple_format.c | 2 +- test/box/misc.result | 1 + test/sql-tap/e_select1.test.lua | 12 ++-- test/sql-tap/in4.test.lua | 2 +- test/sql-tap/join.test.lua | 2 +- test/sql-tap/tkt3493.test.lua | 4 +- test/sql-tap/transitive1.test.lua | 4 +- test/sql-tap/with1.test.lua | 2 +- test/sql/collation.result | 79 ++++++++++++++++++++++++++ test/sql/collation.test.lua | 30 ++++++++++ 21 files changed, 313 insertions(+), 119 deletions(-) -- 2.15.1
next reply other threads:[~2018-10-25 11:00 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-10-25 11:00 Nikita Pettik [this message] 2018-10-25 11:00 ` [tarantool-patches] [PATCH 1/3] sql: do not add explicit <COLLATE "BINARY"> clause Nikita Pettik 2018-10-25 11:00 ` [tarantool-patches] [PATCH 2/3] Add surrogate ID for BINARY collation Nikita Pettik 2018-10-31 12:34 ` [tarantool-patches] " Vladislav Shpilevoy 2018-10-31 15:47 ` n.pettik 2018-11-01 11:37 ` Konstantin Osipov 2018-11-01 12:22 ` Vladislav Shpilevoy 2018-11-01 12:58 ` Konstantin Osipov 2018-11-01 13:08 ` n.pettik 2018-11-01 15:39 ` Konstantin Osipov [not found] ` <95CB17D5-E3ED-4B05-A289-983E2FD0DE37@gmail.com> 2018-11-01 17:45 ` n.pettik 2018-11-01 20:00 ` Konstantin Osipov 2018-11-01 20:06 ` Konstantin Osipov 2018-11-01 20:20 ` n.pettik 2018-10-25 11:00 ` [tarantool-patches] [PATCH 3/3] sql: change collation compatibility rules Nikita Pettik 2018-10-31 12:34 ` [tarantool-patches] " Vladislav Shpilevoy 2018-11-12 23:46 ` n.pettik
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=cover.1540460716.git.korablev@tarantool.org \ --to=korablev@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [tarantool-patches] [PATCH 0/3] Change collation compatibility rules according to ANSI SQL' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox