From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: imeevma@tarantool.org, tarantool-patches@freelists.org Subject: [tarantool-patches] Re: [PATCH v1 1/1] lua: strength in the _collation space Date: Thu, 6 Sep 2018 23:03:44 +0300 [thread overview] Message-ID: <3d457119-b75b-2a80-5d17-ec014090e584@tarantool.org> (raw) In-Reply-To: <ca389fe0db3d29db4852bf69f37d065f9a78ae63.1536258486.git.imeevma@gmail.com> Hi! Thanks for the patch! On 06/09/2018 21:29, imeevma@tarantool.org wrote: > This patch sets "primary" strength as default for collations. > > Closes #3573 > --- > Branch: https://github.com/tarantool/tarantool/tree/imeevma/gh-3573-show-collation-strength > Issue: https://github.com/tarantool/tarantool/issues/3573 > > src/box/bootstrap.snap | Bin 1888 -> 1883 bytes > src/box/lua/schema.lua | 5 ++++- > src/box/lua/upgrade.lua | 2 +- > 3 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/src/box/lua/upgrade.lua b/src/box/lua/upgrade.lua > index d9c2ae4..e09318b 100644 > --- a/src/box/lua/upgrade.lua > +++ b/src/box/lua/upgrade.lua > @@ -396,7 +396,7 @@ local function create_collation_space() > box.space._index:insert{_collation.id, 1, 'name', 'tree', {unique = true}, {{1, 'string'}}} > > log.info("create predefined collations") > - box.space._collation:replace{1, "unicode", ADMIN, "ICU", "", setmap{}} > + box.space._collation:replace{1, "unicode", ADMIN, "ICU", "", {strength='primary'}} Unfortunately, you can not change the past. This code does update to 1.7.6 which is already released long ago and we already have clients on this version. So their unicode collation already has no strength. Why are you trying to change it? Anyway a user is able to do raw insertion right into _collation space omitting high level API that you fixed in the previous hunk. C code should be ready to the fact that a new collation may have no any specified strength. Also, what about Vinyl users who are using collations? Does this update of strength change order of sorting of disk data? > box.space._collation:replace{2, "unicode_ci", ADMIN, "ICU", "", {strength='primary'}} > > local _priv = box.space[box.schema.PRIV_ID] >
prev parent reply other threads:[~2018-09-06 20:03 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-09-06 18:29 [tarantool-patches] " imeevma 2018-09-06 20:03 ` Vladislav Shpilevoy [this message]
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=3d457119-b75b-2a80-5d17-ec014090e584@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=imeevma@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH v1 1/1] lua: strength in the _collation space' \ /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