[tarantool-patches] Re: [PATCH v6 2/4] sql: remove SQL fields from Table and Column

n.pettik korablev at tarantool.org
Fri May 18 20:24:13 MSK 2018


> @@ -146,6 +146,12 @@ sql_expr_free(struct sqlite3 *db, struct Expr *expr, bool extern_alloc);
> 
> /**
>  * Create and initialize a new ephemeral SQL Table object.
> + * All memory allocation operations except Table object itself
> + * are performed in the region.
> + *
> + * The 'ephemeral' means that this memory is temporal,
> + * so the table should be rebuild with sql_table_def_rebuild for further use.

Fit comments in 66 chars. Moreover, I see that you accidentally included
changes concerning this comment to the next patch.
Lets return it back to this one.

> + *
>  * @param parser SQL Parser object.
>  * @param name Table to create name.
>  * @retval NULL on memory allocation error, Parser state changed.
> @@ -156,6 +162,11 @@ sql_ephemeral_table_new(struct Parse *parser, const char *name);
> 
> /**
>  * Create and initialize a new ephemeral space_def object.
> + * All memory allocation operations are performed on the region.
> + *
> + * The 'ephemeral' means that this memory is temporal,
> + * so the table should be rebuild with sql_table_def_rebuild for further use.

Lets don’t repeat the same comment twice. You may refer to it, if you want.

>> I would mention in commit message about the fact that
>> now almost within parsing context is allocated on region,
>> and at the end of parsing region is truncated. Or, at least,
>> in comments to sql_parser_destroy()/sql_parser_create()
> @@ -4157,6 +4157,8 @@ table_column_nullable_action(struct Table *tab, uint32_t column);
> 
> /**
>  * Initialize a new parser object.
> + * A number of service allocations are performed on the region, which is also

Fit comment in 66 chars.





More information about the Tarantool-patches mailing list