[Tarantool-patches] [PATCH v5 04/52] sql: remove NULL-termination in OP_ResultRow

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Thu Apr 15 01:23:07 MSK 2021


Thanks for the patch!

> diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c
> index 4c1cd582b..18806b93f 100644
> --- a/src/box/sql/vdbe.c
> +++ b/src/box/sql/vdbe.c
> @@ -1516,20 +1513,14 @@ case OP_ResultRow: {
>  	/* Invalidate all ephemeral cursor row caches */
>  	p->cacheCtr = (p->cacheCtr + 2)|1;
>  
> -	/* Make sure the results of the current row are \000 terminated
> -	 * and have an assigned type.  The results are de-ephemeralized as
> -	 * a side effect.
> -	 */
> -	pMem = p->pResultSet = &aMem[pOp->p1];
> -	for(i=0; i<pOp->p2; i++) {
> +	p->pResultSet = &aMem[pOp->p1];
> +#ifdef SQL_DEBUG
> +	struct Mem *pMem = p->pResultSet;
> +	for(int i = 0; i < pOp->p2; i++) {

Please, add a whitespace after 'for'.


More information about the Tarantool-patches mailing list