Tarantool development patches archive
 help / color / mirror / Atom feed
From: "i.koptelov" <ivan.koptelov@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH] sql: set explicit default collation's strength
Date: Wed, 27 Mar 2019 18:01:17 +0300	[thread overview]
Message-ID: <D56E770D-BE6A-487A-900A-7634C3F4FB80@tarantool.org> (raw)
In-Reply-To: <e05aafbc-41b4-0d05-a554-0a409b7767a7@tarantool.org>



> On 27 Mar 2019, at 17:26, Vladislav Shpilevoy <v.shpilevoy@tarantool.org> wrote:
> 
> 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)
> 
Ok, done. Tests are not broken, bootstrap.snap is regenerated.

  reply	other threads:[~2019-03-27 15:01 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     ` [tarantool-patches] " Vladislav Shpilevoy
2019-03-27 15:01       ` i.koptelov [this message]
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=D56E770D-BE6A-487A-900A-7634C3F4FB80@tarantool.org \
    --to=ivan.koptelov@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=v.shpilevoy@tarantool.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