Skip to content
Snippets Groups Projects
Commit 2425fde7 authored by Nikita Pettik's avatar Nikita Pettik Committed by Kirill Yukhin
Browse files

sql: fix recovery of VIEW space

During creation of VIEW space, string containing its definition (i.e.
"SELECT ...") is parsed to fetch names of referenced spaces. By those
names real struct space objects are found using schema_find_id().
This function processes lookup in _space using its secondary index.
On the other hand, secondary indexes of _space are unavailable during
this stage of recovery, so this lookup fails and whole recovery process
aborts.

It is worth mentioning that now we can fetch space directly from
in-memory cache using its name (originally, when view reference counter
was introduced, we couldn't do this due to absence of name-cache). So,
to fix this issue, let's use space_by_name() instead of schema_find_id()

Closes #3814
parent de6fb197
No related branches found
No related tags found
No related merge requests found
Loading
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