[PATCH v5 08/12] box: introduce JSON indexes

Vladimir Davydov vdavydov.dev at gmail.com
Tue Nov 20 19:52:28 MSK 2018


On Mon, Oct 29, 2018 at 09:56:40AM +0300, Kirill Shcherbatov wrote:
> @@ -305,6 +411,7 @@ tuple_format_alloc(struct key_def * const *keys, uint16_t key_count,
>  		format->dict = dict;
>  		tuple_dictionary_ref(dict);
>  	}
> +	format->allocation_size = allocation_size;
>  	format->refs = 0;
>  	format->id = FORMAT_ID_NIL;
>  	format->index_field_count = index_field_count;
> @@ -412,6 +519,77 @@ tuple_format1_can_store_format2_tuples(struct tuple_format *format1,
>  	return true;
>  }

You didn't patch this function, but you probably had to.
Here's something for you to fix:

box.cfg{}
s = box.schema.space.create('test')
i = s:create_index('pk', {parts = {{1, 'integer', path = '[1]'}}})
s:insert{{-1}}
i:alter{parts = {{1, 'string', path = '[1]'}}} -- success
s:insert{{'a'}} -- crash



More information about the Tarantool-patches mailing list