[PATCH v2 2/3] sql: remove space_by_id() from analyze.c

Vladimir Davydov vdavydov.dev at gmail.com
Thu Apr 4 19:03:49 MSK 2019


On Wed, Apr 03, 2019 at 07:58:34PM +0300, imeevma at 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.



More information about the Tarantool-patches mailing list