Tarantool development patches archive
 help / color / mirror / Atom feed
From: Nikita Pettik <korablev@tarantool.org>
To: tarantool-patches@freelists.org
Cc: v.shpilevoy@tarantool.org, Nikita Pettik <korablev@tarantool.org>
Subject: [tarantool-patches] [PATCH 1/7] sql: remove struct schema from struct Table
Date: Fri, 24 Aug 2018 01:55:47 +0300	[thread overview]
Message-ID: <e28ee61afcfc2d23262da96978fee5a8f9656be8.1535064700.git.korablev@tarantool.org> (raw)
In-Reply-To: <cover.1535063199.git.korablev@tarantool.org>
In-Reply-To: <cover.1535064700.git.korablev@tarantool.org>

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;
-- 
2.15.1

  parent reply	other threads:[~2018-08-23 22:56 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   ` Nikita Pettik [this message]
2018-08-29  0:58     ` [tarantool-patches] Re: [PATCH 1/7] sql: remove struct schema from struct Table Vladislav Shpilevoy
2018-09-02 23:51       ` n.pettik
2018-09-16 19:32     ` Vladislav Shpilevoy
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=e28ee61afcfc2d23262da96978fee5a8f9656be8.1535064700.git.korablev@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [tarantool-patches] [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