[Tarantool-patches] [PATCH v4 07/53] sql: disable unused code in sql/vdbemem.c
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Tue Mar 30 01:58:41 MSK 2021
Thanks for the patch!
I didn't even know we have vdbemem.c. It should be deleted someday
when we have mem.h/mem.c instead.
> diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
> index dd8163f5e..b4293d961 100644
> --- a/src/box/sql/sqlInt.h
> +++ b/src/box/sql/sqlInt.h
> @@ -4151,31 +4151,54 @@ sql_expr_new_column(struct sql *db, struct SrcList *src_list, int src_idx,
>
> int sqlExprCheckIN(Parse *, Expr *);
>
> -int sqlStat4ProbeSetValue(Parse *, struct index_def *, UnpackedRecord **, Expr *, int,
> - int, int *);
> -int sqlStat4ValueFromExpr(Parse *, Expr *, enum field_type type,
> - sql_value **);
> -void sqlStat4ProbeFree(UnpackedRecord *);
> +/* TODO: Enable this function when stat-tables will be revived. */
> +static inline int
> +sqlStat4ProbeSetValue(struct Parse *parse, struct index_def *def,
> + struct UnpackedRecord **rec, struct Expr *expr, int n,
> + int i, int *out)
You can also make it take '...' instead of all of these arguments individually.
The same for the other functions.
> +{
> + (void)parse;
> + (void)def;
> + (void)rec;
> + (void)expr;
> + (void)n;
> + (void)i;
> + (void)out;
> + unreachable();
> + return 0;
> +}
More information about the Tarantool-patches
mailing list