From: Georgy Kirichenko <georgy@tarantool.org> To: tarantool-patches@freelists.org Cc: Georgy Kirichenko <georgy@tarantool.org> Subject: [tarantool-patches] [PATCH 1/6] Specify types for internal tables Date: Mon, 20 Aug 2018 11:49:54 +0300 [thread overview] Message-ID: <7c39f36589bc4541193e2c22a14502245e0a6e95.1534754600.git.georgy@tarantool.org> (raw) In-Reply-To: <cover.1534754600.git.georgy@tarantool.org> 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
next prev parent reply other threads:[~2018-08-20 8:50 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-08-20 8:49 [tarantool-patches] [PATCH 0/6] SQL types Georgy Kirichenko 2018-08-20 8:49 ` Georgy Kirichenko [this message] 2018-08-20 8:49 ` [tarantool-patches] [PATCH 2/6] Split on_conflict_action and affinity Georgy Kirichenko 2018-08-20 8:49 ` [tarantool-patches] [PATCH 3/6] Annotate a sql function with affinity Georgy Kirichenko 2018-08-20 8:49 ` [tarantool-patches] [PATCH 4/6] Enforce space format for sql columns Georgy Kirichenko 2018-08-20 8:49 ` [tarantool-patches] [PATCH 5/6] Enforce internal data type conversions Georgy Kirichenko 2018-08-20 8:49 ` [tarantool-patches] [PATCH 6/6] Evaluate an affinity for all producing expressions Georgy Kirichenko
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=7c39f36589bc4541193e2c22a14502245e0a6e95.1534754600.git.georgy@tarantool.org \ --to=georgy@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [tarantool-patches] [PATCH 1/6] Specify types for internal tables' \ /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