[Tarantool-patches] [PATCH v4 2/6] sql: refactor create_table_def and parse

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Thu Sep 17 18:16:52 MSK 2020


> diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
> index 5913d7614..7057c20b6 100644
> --- a/src/box/sql/sqlInt.h
> +++ b/src/box/sql/sqlInt.h
> @@ -2257,6 +2257,18 @@ struct Parse {
>  	 * sqlEndTable() function).
>  	 */
>  	struct create_table_def create_table_def;
> +	/*
> +	 * FK and CK constraints appeared in a <CREATE TABLE>.
> +	 */
> +	struct create_fkeys_def fkeys_def;
> +	struct create_checks_def checks_def;
> +	/*
> +	 * True, if column within a <CREATE TABLE> statement to be
> +	 * created has <AUTOINCREMENT>.
> +	 */
> +	bool has_autoinc;> +	/* Id of field with <AUTOINCREMENT>. */
> +	uint32_t autoinc_fieldno;

Can we remove the fields completely and use space->sequence_fieldno?

>  	bool initiateTTrans;	/* Initiate Tarantool transaction */
>  	/** If set - do not emit byte code at all, just parse.  */
>  	bool parse_only;
> 


More information about the Tarantool-patches mailing list