From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 397F027FB3 for ; Mon, 20 Aug 2018 04:50:04 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jWch9CVjXMVo for ; Mon, 20 Aug 2018 04:50:04 -0400 (EDT) Received: from smtp18.mail.ru (smtp18.mail.ru [94.100.176.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id EF0C522F08 for ; Mon, 20 Aug 2018 04:50:03 -0400 (EDT) From: Georgy Kirichenko Subject: [tarantool-patches] [PATCH 1/6] Specify types for internal tables Date: Mon, 20 Aug 2018 11:49:54 +0300 Message-Id: <7c39f36589bc4541193e2c22a14502245e0a6e95.1534754600.git.georgy@tarantool.org> In-Reply-To: References: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: Georgy Kirichenko Annotate internal sql schema tables with column data types --- src/box/sql.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/box/sql.c b/src/box/sql.c index ae12cae36..66bc3c6db 100644 --- a/src/box/sql.c +++ b/src/box/sql.c @@ -1102,7 +1102,7 @@ void tarantoolSqlite3LoadSchema(struct init_data *init) init, TARANTOOL_SYS_SCHEMA_NAME, BOX_SCHEMA_ID, 0, "CREATE TABLE \""TARANTOOL_SYS_SCHEMA_NAME - "\" (\"key\" TEXT PRIMARY KEY, \"value\")" + "\" (\"key\" TEXT PRIMARY KEY, \"value\" TEXT)" ); sql_init_callback( @@ -1110,7 +1110,7 @@ void tarantoolSqlite3LoadSchema(struct init_data *init) BOX_SPACE_ID, 0, "CREATE TABLE \""TARANTOOL_SYS_SPACE_NAME "\" (\"id\" INT PRIMARY KEY, \"owner\" INT, \"name\" TEXT, " - "\"engine\" TEXT, \"field_count\" INT, \"opts\", \"format\")" + "\"engine\" TEXT, \"field_count\" INT, \"opts\" BLOB, \"format\" BLOB)" ); sql_init_callback( @@ -1118,14 +1118,14 @@ void tarantoolSqlite3LoadSchema(struct init_data *init) BOX_INDEX_ID, 0, "CREATE TABLE \""TARANTOOL_SYS_INDEX_NAME"\" " "(\"id\" INT, \"iid\" INT, \"name\" TEXT, \"type\" TEXT," - "\"opts\", \"parts\", PRIMARY KEY (\"id\", \"iid\"))" + "\"opts\" BLOB, \"parts\" BLOB, PRIMARY KEY (\"id\", \"iid\"))" ); sql_init_callback( init, TARANTOOL_SYS_TRIGGER_NAME, BOX_TRIGGER_ID, 0, "CREATE TABLE \""TARANTOOL_SYS_TRIGGER_NAME"\" (" - "\"name\" TEXT PRIMARY KEY, \"space_id\" INT, \"opts\")" + "\"name\" TEXT PRIMARY KEY, \"space_id\" INT, \"opts\" BLOB)" ); sql_init_callback( @@ -1150,7 +1150,7 @@ void tarantoolSqlite3LoadSchema(struct init_data *init) "CREATE TABLE \""TARANTOOL_SYS_SQL_STAT1_NAME "\"(\"tbl\" text," "\"idx\" text," - "\"stat\" not null," + "\"stat\" blob not null," "PRIMARY KEY(\"tbl\", \"idx\"))"); sql_init_callback(init, TARANTOOL_SYS_SQL_STAT4_NAME, @@ -1161,7 +1161,7 @@ void tarantoolSqlite3LoadSchema(struct init_data *init) "\"neq\" text," "\"nlt\" text," "\"ndlt\" text," - "\"sample\"," + "\"sample\" blob," "PRIMARY KEY(\"tbl\", \"idx\", \"sample\"))"); sql_init_callback(init, TARANTOOL_SYS_FK_CONSTRAINT_NAME, @@ -1169,7 +1169,8 @@ void tarantoolSqlite3LoadSchema(struct init_data *init) "CREATE TABLE \""TARANTOOL_SYS_FK_CONSTRAINT_NAME "\"(\"name\" TEXT, \"parent_id\" INT, \"child_id\" INT," "\"deferred\" INT, \"match\" TEXT, \"on_delete\" TEXT," - "\"on_update\" TEXT, \"child_cols\", \"parent_cols\"," + "\"on_update\" TEXT, \"child_cols\" TEXT, " + "\"parent_cols\" TEXT," "PRIMARY KEY(\"name\", \"child_id\"))"); /* Read _space */ -- 2.18.0