From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 3 Apr 2019 20:58:17 +0300 From: Vladimir Davydov Subject: Re: [PATCH v2 3/3] box: remove _sql_stat1 and _sql_stat4 system tables Message-ID: <20190403175817.wqtkovz54gkgcri5@esperanza> References: <8907dd9a025b0cafe9858289e4e3e2d64618f12b.1554310018.git.imeevma@gmail.com> <20190403171900.tbkhlf5h5ebvs36f@esperanza> <1554313125.704285481@f536.i.mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1554313125.704285481@f536.i.mail.ru> To: =?utf-8?B?0JzQtdGA0LPQtdC9INCY0LzQtdC10LI=?= Cc: tarantool-patches@freelists.org List-ID: On Wed, Apr 03, 2019 at 08:38:45PM +0300, Мерген Имеев wrote: > > > > >Среда, 3 апреля 2019, 20:19 +03:00 от Vladimir Davydov : > > > >On Wed, Apr 03, 2019 at 07:58:38PM +0300, imeevma@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. > Currently I do not know how to change these functions in another > way, since there are no spaces to use instead of _sql_stat1 and > _sql_stat4. I will rework these functions later when a new concept > of SQL statistics appears. That is, these functions aren't supposed to run, right? If so, it's okay to fix it as you did, I guess.