[tarantool-patches] Re: [PATCH] sql: set explicit default collation's strength

i.koptelov ivan.koptelov at tarantool.org
Wed Mar 27 18:01:17 MSK 2019



> On 27 Mar 2019, at 17:26, Vladislav Shpilevoy <v.shpilevoy at 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.



More information about the Tarantool-patches mailing list