[tarantool-patches] Re: [PATCH v2 1/1] box: update collation strength option.

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sat Oct 13 15:17:55 MSK 2018


Hi!

>      Replace couldn't be used in space box.space._collation:
>      tarantool> 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) then
>               >             local new_collation =
>      _collation:get{collation.id}:totable()
>               >             new_collation[6].strength = 'identical'
>               >             _collation:replace(new_collation)
>               >         end
>               >     end
>               > end
>      ---
>      ...
>      tarantool> update_collation_strength_field()
>      ---
>      - error: collation does not support alter
>      ...

I just found that it is not normal. Triggers on system
spaces are turned off before upgrade. But for _collation
space they are not. Please, turn off the triggers and use
replace. See function set_system_triggers in upgrade.lua.

>  >>+        end
>  >>        +    end
>  >>        +end
>  >>        +
>  >>        +local function upgrade_to_2_1_1()
>  >>        +    update_collation_strength_field()
>  >>        +end
>  >>        +
>  >>        +
> 




More information about the Tarantool-patches mailing list