[PATCH v2 3/3] box: remove _sql_stat1 and _sql_stat4 system tables

Vladimir Davydov vdavydov.dev at gmail.com
Wed Apr 3 20:19:00 MSK 2019


On Wed, Apr 03, 2019 at 07:58:38PM +0300, imeevma at tarantool.org wrote:
> >> diff --git a/src/box/sql.c b/src/box/sql.c
> >> index 4fac020..7beeee1 100644
> >> --- a/src/box/sql.c
> >> +++ b/src/box/sql.c
> >> @@ -87,7 +87,7 @@ sql_load_schema()
> >>  	 * statistics (_sql_stat1 and _sql_stat4). Thus, we can
> >>  	 * skip statistics loading.
> >>  	 */
> >> -	struct space *stat = space_by_id(BOX_SQL_STAT1_ID);
> >> +	struct space *stat = space_by_name("_sql_stat1");
> >
> > I don't understand this change: even though you removed the tables you
> > still expect them to be accessible by name here and in a few other
> > places. At any rate, the comment above needs to be refreshed.
> >
> I did this to free BOX_SQL_STAT1_ID and BOX_SQL_STAT4_ID so I
> could remove them. These functions are currently unused. Moved
> this fix to a different commit.

Okay. Still, I don't understand how this is supposed to work at all:
the tables have been removed, but the code using them is still there -
it just refers to them by name instead of id now.



More information about the Tarantool-patches mailing list