From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org, Nikita Pettik <korablev@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH 1/7] sql: remove struct schema from struct Table
Date: Sun, 16 Sep 2018 21:32:30 +0200 [thread overview]
Message-ID: <feec1afb-376b-8af2-4ba3-9d57d6694219@tarantool.org> (raw)
In-Reply-To: <e28ee61afcfc2d23262da96978fee5a8f9656be8.1535064700.git.korablev@tarantool.org>
Patchset LGTM. I've not reviewed it again, but the fixes
look ok.
On 24/08/2018 00:55, Nikita Pettik wrote:
> Part of #3561
> ---
> src/box/sql/build.c | 7 ++-----
> src/box/sql/select.c | 2 +-
> src/box/sql/sqliteInt.h | 1 -
> 3 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/src/box/sql/build.c b/src/box/sql/build.c
> index dc00b5d8c..47fa7c305 100644
> --- a/src/box/sql/build.c
> +++ b/src/box/sql/build.c
> @@ -392,8 +392,6 @@ sqlite3PrimaryKeyIndex(Table * pTab)
> static Table *
> sql_table_new(Parse *parser, char *name)
> {
> - sqlite3 *db = parser->db;
> -
> struct Table *table = sql_ephemeral_table_new(parser, name);
> if (table == NULL)
> return NULL;
> @@ -401,7 +399,6 @@ sql_table_new(Parse *parser, char *name)
> strcpy(table->def->engine_name,
> sql_storage_engine_strs[current_session()->sql_default_engine]);
>
> - table->pSchema = db->pSchema;
> table->nTabRef = 1;
> return table;
> }
> @@ -1650,8 +1647,8 @@ sqlite3EndTable(Parse * pParse, /* Parse context */
> * Add the table to the in-memory representation
> * of the database.
> */
> - struct Table *pOld = sqlite3HashInsert(&p->pSchema->tblHash,
> - p->def->name, p);
> + struct Table *pOld = sqlite3HashInsert(&db->pSchema->tblHash,
> + p->def->name, p);
> if (pOld != NULL) {
> assert(p == pOld);
> sqlite3OomFault(db);
> diff --git a/src/box/sql/select.c b/src/box/sql/select.c
> index d22f4e0a9..12f55cedf 100644
> --- a/src/box/sql/select.c
> +++ b/src/box/sql/select.c
> @@ -1672,7 +1672,7 @@ columnTypeImpl(NameContext * pNC, Expr * pExpr
> columnType(&sNC, p, &zOrigTab,
> &zOrigCol);
> }
> - } else if (pTab->pSchema) {
> + } else {
> /* A real table */
> assert(!pS);
> assert(iCol >= 0 &&
> diff --git a/src/box/sql/sqliteInt.h b/src/box/sql/sqliteInt.h
> index d2ef85846..35d3f4cec 100644
> --- a/src/box/sql/sqliteInt.h
> +++ b/src/box/sql/sqliteInt.h
> @@ -1857,7 +1857,6 @@ struct Table {
> * can be fetched from space struct.
> */
> LogEst tuple_log_count;
> - Schema *pSchema; /* Schema that contains this table */
> Table *pNextZombie; /* Next on the Parse.pZombieTab list */
> /** Space definition with Tarantool metadata. */
> struct space_def *def;
>
next prev parent reply other threads:[~2018-09-16 19:32 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-23 22:55 [tarantool-patches] [PATCH 0/7] Finish SQL DD integration Nikita Pettik
[not found] ` <cover.1535064700.git.korablev@tarantool.org>
2018-08-23 22:55 ` [tarantool-patches] [PATCH 1/7] sql: remove struct schema from struct Table Nikita Pettik
2018-08-29 0:58 ` [tarantool-patches] " Vladislav Shpilevoy
2018-09-02 23:51 ` n.pettik
2018-09-16 19:32 ` Vladislav Shpilevoy [this message]
2018-09-19 10:58 ` n.pettik
2018-08-23 22:55 ` [tarantool-patches] [PATCH 2/7] sql: remove SQLite original struct Index Nikita Pettik
2018-08-29 0:58 ` [tarantool-patches] " Vladislav Shpilevoy
2018-09-02 23:51 ` n.pettik
2018-09-06 19:54 ` Vladislav Shpilevoy
2018-09-16 19:04 ` n.pettik
2018-08-23 22:55 ` [tarantool-patches] [PATCH 3/7] sql: remove struct Table from analyze routine Nikita Pettik
2018-08-29 0:58 ` [tarantool-patches] " Vladislav Shpilevoy
2018-09-02 23:52 ` n.pettik
2018-08-23 22:55 ` [tarantool-patches] [PATCH 4/7] sql: refactor ALTER RENAME code generation Nikita Pettik
2018-08-29 0:58 ` [tarantool-patches] " Vladislav Shpilevoy
2018-09-02 23:52 ` n.pettik
2018-08-23 22:55 ` [tarantool-patches] [PATCH 5/7] sql: remove lookups in Table hash Nikita Pettik
2018-08-29 0:58 ` [tarantool-patches] " Vladislav Shpilevoy
2018-09-02 23:52 ` n.pettik
2018-08-23 22:55 ` [tarantool-patches] [PATCH 6/7] sql: don't add system spaces to " Nikita Pettik
2018-08-29 0:58 ` [tarantool-patches] " Vladislav Shpilevoy
2018-09-02 23:52 ` n.pettik
2018-09-06 19:54 ` Vladislav Shpilevoy
2018-09-16 19:04 ` n.pettik
2018-08-23 22:55 ` [tarantool-patches] [PATCH 7/7] sql: finish DD integration Nikita Pettik
2018-08-29 0:58 ` [tarantool-patches] " Vladislav Shpilevoy
2018-09-20 14:45 ` Kirill Yukhin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=feec1afb-376b-8af2-4ba3-9d57d6694219@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=korablev@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='[tarantool-patches] Re: [PATCH 1/7] sql: remove struct schema from struct Table' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox