Skip to content
Snippets Groups Projects
Commit 9f77b4a4 authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Vladimir Davydov
Browse files

Store space names in database read view

We need to know space names to export a database read view to Lua.

Needed for https://github.com/tarantool/tarantool-ee/issues/139

NO_DOC=internal
NO_TEST=ee
NO_CHANGELOG=internal
parent 3733ff25
No related branches found
No related tags found
No related merge requests found
......@@ -64,9 +64,11 @@ space_read_view_new(struct space *space, const struct read_view_opts *opts)
(space->index_id_max + 1);
struct grp_alloc all = grp_alloc_initializer();
grp_alloc_reserve_data(&all, sizeof(*space_rv));
grp_alloc_reserve_str0(&all, space_name(space));
grp_alloc_reserve_data(&all, index_map_size);
grp_alloc_use(&all, xmalloc(grp_alloc_size(&all)));
space_rv = grp_alloc_create_data(&all, sizeof(*space_rv));
space_rv->name = grp_alloc_create_str0(&all, space_name(space));
space_rv->index_map = grp_alloc_create_data(&all, index_map_size);
assert(grp_alloc_size(&all) == 0);
......
......@@ -25,6 +25,8 @@ struct space_read_view {
struct rlist link;
/** Space id. */
uint32_t id;
/** Space name. */
char *name;
/** Replication group id. See space_opts::group_id. */
uint32_t group_id;
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment