[tarantool-patches] Re: [PATCH v1 1/2] sql: use schema API to get index info in analyze

Kirill Shcherbatov kshcherbatov at tarantool.org
Wed Jul 25 20:07:45 MSK 2018

> Previously, ANALYZE routine used to invoke box_space_id_by_name
> function, which in turn relies on sysview engine. On the other hand,
> ANALYZE processing is surrounded by transaction started in memtx
> (_sql_stat1 and _sql_stat4 are system spaces stored in memtx).
> Thus, multi-engine transaction error may  occur. To avoid such
> situation lets use internal schema_find_id() function.
Thank, I've used your explanation.

> Typo: length.
> If nothing is found.
> Index AST? I guess “pointer to index otherwise”.
+ * @param len length of @name string.
+ * @retval NULL if nothing is found.
+ * @retval not NULL pointer to index otherwise.

> Overall it is sad that we can't use schema_find_id for this purpose.
> Mb it is worth to refactor this function so that it will take not id but
> already encoded key to be found? It is only suggestion tho,
> it can be contradictory way..
We have already discussed that this is ok. Tnx.

More information about the Tarantool-patches mailing list