From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: "i.koptelov" <ivan.koptelov@tarantool.org>, tarantool-patches@freelists.org Subject: [tarantool-patches] Re: [PATCH] sql: set explicit default collation's strength Date: Wed, 27 Mar 2019 17:26:07 +0300 [thread overview] Message-ID: <e05aafbc-41b4-0d05-a554-0a409b7767a7@tarantool.org> (raw) In-Reply-To: <17D31B00-F24C-48C8-BE9D-CA4D32D35484@tarantool.org> Please, apply the diff below. Be careful because I haven't tested it. Fix it, if tests fail, and do not forget to regenerate boostrap.snap. diff --git a/src/box/lua/upgrade.lua b/src/box/lua/upgrade.lua index a23d0af64..37ab76177 100644 --- a/src/box/lua/upgrade.lua +++ b/src/box/lua/upgrade.lua @@ -638,10 +638,9 @@ end local function update_collation_strength_field() local _collation = box.space[box.schema.COLLATION_ID] - for _, collation in ipairs(_collation:select()) do - if collation.opts.strength == nil and collation.name ~= 'none' and - collation.name ~= 'binary' then - local new_collation = _collation:get{collation.id}:totable() + for _, collation in _collation:pairs() do + if collation.type == 'ICU' and collation.opts.strength == nil then + local new_collation = collation:totable() new_collation[6].strength = 'tertiary' _collation:delete{collation.id} _collation:insert(new_collation)
next prev parent reply other threads:[~2019-03-27 14:26 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-03-26 20:34 [tarantool-patches] " Ivan Koptelov 2019-03-27 9:53 ` [tarantool-patches] " i.koptelov 2019-03-27 11:59 ` Vladislav Shpilevoy 2019-03-27 14:08 ` [tarantool-patches] " i.koptelov 2019-03-27 14:26 ` Vladislav Shpilevoy [this message] 2019-03-27 15:01 ` [tarantool-patches] " i.koptelov 2019-03-27 19:32 ` Vladislav Shpilevoy 2019-03-27 19:32 ` Vladislav Shpilevoy 2019-03-28 6:55 ` i.koptelov 2019-03-28 11:45 ` Vladislav Shpilevoy 2019-03-28 12:02 ` Kirill Yukhin
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=e05aafbc-41b4-0d05-a554-0a409b7767a7@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=ivan.koptelov@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH] sql: set explicit default collation'\''s strength' \ /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