From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 2DC7727023 for ; Wed, 25 Jul 2018 13:07:47 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nwkWJzulI1LI for ; Wed, 25 Jul 2018 13:07:47 -0400 (EDT) Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id DF2B126F4C for ; Wed, 25 Jul 2018 13:07:46 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v1 1/2] sql: use schema API to get index info in analyze References: <5899c7db-b1c0-d099-989e-dcb41b801cdd@tarantool.org> <2966C909-20F8-4682-A915-E922E3A0FC1A@tarantool.org> From: Kirill Shcherbatov Message-ID: Date: Wed, 25 Jul 2018 20:07:45 +0300 MIME-Version: 1.0 In-Reply-To: <2966C909-20F8-4682-A915-E922E3A0FC1A@tarantool.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org, Nikita Pettik > 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.