From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 4 Apr 2019 20:41:43 +0300 From: Vladimir Davydov Subject: Re: [PATCH v2 2/3] sql: remove space_by_id() from analyze.c Message-ID: <20190404174143.fe2uhk4zhhi2wyvt@esperanza> References: <4948c5af9c00a5e99e796236e79a2fb1fcce570c.1554310018.git.imeevma@gmail.com> <20190404160349.in3vt4f4kla57eze@esperanza> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190404160349.in3vt4f4kla57eze@esperanza> To: imeevma@tarantool.org Cc: tarantool-patches@freelists.org List-ID: On Thu, Apr 04, 2019 at 07:03:49PM +0300, Vladimir Davydov wrote: > On Wed, Apr 03, 2019 at 07:58:34PM +0300, imeevma@tarantool.org wrote: > > diff --git a/src/box/sql/build.c b/src/box/sql/build.c > > index c475b34..a06ba3e 100644 > > --- a/src/box/sql/build.c > > +++ b/src/box/sql/build.c > > @@ -1384,23 +1384,6 @@ vdbe_emit_stat_space_clear(struct Parse *parse, const char *stat_table_name, > > } > > > > /** > > - * Remove entries from the _sql_stat1 and _sql_stat4 > > - * system spaces after a DROP INDEX or DROP TABLE command. > > - * > > - * @param parse The parsing context. > > - * @param table_name The table to be dropped or > > - * the table that contains index to be dropped. > > - * @param idx_name Index to be dropped. > > - */ > > -static void > > -sql_clear_stat_spaces(struct Parse *parse, const char *table_name, > > - const char *idx_name) > > -{ > > - vdbe_emit_stat_space_clear(parse, "_sql_stat4", idx_name, table_name); > > - vdbe_emit_stat_space_clear(parse, "_sql_stat1", idx_name, table_name); > > -} > > I would leave this function and instead comment its body so that we > don't forget to resurrect this code when we reimplement stat tables. > Other than that, looks good to me. On the second thought, it doesn't make much sense to leave this function as we'll have to rewrite it anyway when we reintroduce stat tables. And it's pretty obvious that we should clear stat entries on space/index drop so there's no need in this placeholder. That said, the patch is okay to commit as is IMO.