[tarantool-patches] Re: [PATCH 1/2] schema: add "_vcollation" sysview

Konstantin Osipov kostja at tarantool.org
Thu May 16 15:43:29 MSK 2019


* Roman Khabibov <roman.habibov at tarantool.org> [19/05/16 14:27]:
> +    -- System space format usually is in order "id, owner, name...".
> +    -- The fields "name", "owner" are swapped in "_collation" format,
> +    -- due to the field "owner" was added after the "_collation" creation.
> +    box.space._index:delete{276, 1}
> +    log.info("update index name on _collation")
> +    box.space._index:insert{_collation.id, 2, 'name', 'tree', {unique = true}, {{1, 'string'}}}

use :replace, not delete + insert
> +    log.info("update index owner on _collation")
> +    box.space._index:insert{_collation.id, 1, 'owner', 'tree', {unique = false}, {{2, 'unsigned'}}}

Not update, but create.

create index 'owner' on space '_collation'

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32




More information about the Tarantool-patches mailing list