[tarantool-patches] Re: [PATCH] sql: rework VIEW internals

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Thu Jun 7 23:06:58 MSK 2018


Thanks for the fixes! See 1 comment below and a commit with my
fixes on the branch right after your. Most likely, my fixes are
not passing tests, so please, finish them. I fixed Select * leak on
exception during trigger_new_xc, and error message. + some style
fixes.


> diff --git a/src/box/sql/build.c b/src/box/sql/build.c
> index 28e4d7a4d..53bb53ab8 100644
> --- a/src/box/sql/build.c
> +++ b/src/box/sql/build.c
> @@ -2009,230 +2007,99 @@ sqlite3EndTable(Parse * pParse,	/* Parse context */
>  int
> -sql_view_column_names(struct Parse *parse, struct Table *table)
> +sql_view_assign_cursors(struct Parse *parse, const char *view_stmt)
>  {
> +	assert(view_stmt != NULL);
> +	struct sqlite3 *db = parse->db;
> +	struct Select *select = sql_view_compile(db, view_stmt);
>  	if (select == NULL)
>  		return -1;
> -	int n = parse->nTab;
>  	sqlite3SrcListAssignCursors(parse, select->pSrc);

Where do you free the struct Select?

> +	return 0;
>  }





More information about the Tarantool-patches mailing list