[tarantool-patches] Re: [PATCH 6/7] sql: don't add system spaces to Table hash

n.pettik korablev at tarantool.org
Mon Sep 3 02:52:23 MSK 2018


> Thanks for the patch! See my review fixes on the branch and
> below:
> 
> commit 882627479793ae3958cec7274cc3e353395aea40
> Author: Vladislav Shpilevoy <v.shpilevoy at tarantool.org>
> Date:   Tue Aug 28 21:28:49 2018 -0300
> 
>    Review fixes
> 
> diff --git a/src/box/sql/prepare.c b/src/box/sql/prepare.c
> index a59e70dd0..0dfdf251f 100644
> --- a/src/box/sql/prepare.c
> +++ b/src/box/sql/prepare.c
> @@ -133,26 +133,14 @@ sql_init_callback(struct init_data *init, const char *name,
> extern int
> sqlite3InitDatabase(sqlite3 * db)
> {
> -	int rc;
> -	struct init_data init;
> -
> 	assert(db->pSchema != NULL);
> -
> -	memset(&init, 0, sizeof(init));
> -	init.db = db;
> -	/* Read the schema information out of the schema tables
> -	 */
> 	assert(db->init.busy);
> -	{
> -		rc = init.rc;
> -		if (rc == SQLITE_OK)
> -			sql_analysis_load(db);
> -	}
> +	sql_analysis_load(db);
> 	if (db->mallocFailed) {
> -		rc = SQLITE_NOMEM_BKPT;
> 		sqlite3ResetAllSchemasOfConnection(db);
> +		return SQLITE_NOMEM_BKPT;
> 	}
> -	return rc;
> +	return SQLITE_OK;
> }

I disregard this diff since in the next patch (sql: finish DD integration) I completely
remove this function at all.

>  diff --git a/src/box/sql/tarantoolInt.h b/src/box/sql/tarantoolInt.h
> index 9334de52d..8622cd19f 100644
> --- a/src/box/sql/tarantoolInt.h
> +++ b/src/box/sql/tarantoolInt.h
> @@ -10,10 +10,6 @@
>  struct fkey_def;
> -/* Insert or replace operation types - necessary for vdbe */
> -#define TARANTOOL_INDEX_INSERT 1
> -#define TARANTOOL_INDEX_REPLACE 2
> -
> /* Misc */
> const char *tarantoolErrorMessage();

This diff I am going to apply (nevertheless Idk how it relates).





More information about the Tarantool-patches mailing list