[Tarantool-patches] [PATCH] box: don't allow referenced collation to be dropped
Nikita Pettik
korablev at tarantool.org
Tue Nov 12 16:24:37 MSK 2019
On 11 Nov 23:38, Vladislav Shpilevoy wrote:
>
> 3. Collations are referenced not only by indexes and spaces.
Oh, that's pretty sad. AFAIU there's no way to get list of all
existing key defs, so it seems that we have to use reference counters.
I'm going to rework patch and send v2.
> tarantool> key_def = require('key_def')
> ---
> ...
>
> tarantool> kd = key_def.new({{fieldno = 1, collation = 'unicode', type = 'string'}})
> ---
> ...
>
> tarantool> box.space._collation:delete(1)
> ---
> - [1, 'unicode', 1, 'ICU', '', {'strength': 'tertiary'}]
> ...
>
> tarantool> kd
> Assertion failed: (coll_id != NULL), function luaT_push_key_def, file /Users/gerold/Work/Repositories/tarantool/src/box/lua/key_def.c, line 67.
> Process 50999 stopped
> * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
> frame #0: 0x00007fff688be2c6 libsystem_kernel.dylib`__pthread_kill + 10
> libsystem_kernel.dylib`__pthread_kill:
> -> 0x7fff688be2c6 <+10>: jae 0x7fff688be2d0 ; <+20>
> 0x7fff688be2c8 <+12>: movq %rax, %rdi
> 0x7fff688be2cb <+15>: jmp 0x7fff688b8457 ; cerror_nocancel
> 0x7fff688be2d0 <+20>: retq
> Target 0: (tarantool) stopped.
More information about the Tarantool-patches
mailing list