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
Loading
Please register or sign in to comment