[tarantool-patches] Re: [PATCH v1] sql: change of PRAGMA INDEX_INFO syntax

Alexander Turenko alexander.turenko at tarantool.org
Sun Jun 17 23:06:30 MSK 2018


Hi Ivan!

See my comments below.

WBR, Alexander Turenko.

On Tue, Jun 12, 2018 at 12:32:20PM +0300, Ivan Ilyin wrote:
> This change removes 'pragma index_xinfo' syntax. 'pragma index_info'
> now works as 'pragma index_xinfo' and also displays type of columns in
> index.
> 
> Fixes #3194
> ---

Don't forget to include branch name in the message to
tarantool-patches at .

TARGET=test job fails in CI for your branch: see [1]. It fails before
sql-tap suite and the fail does not related to your changes. But it is
your responsibility to check whether the fail is flaky (restarting this
job should make it green) and bring it into focus of your mentor if the
fail is persistent.

[1]: https://travis-ci.org/tarantool/tarantool/jobs/391176317

> diff --git a/src/box/sql/pragma.c b/src/box/sql/pragma.c
> index 9dab5a7..ec0dff3 100644
> --- a/src/box/sql/pragma.c
> +++ b/src/box/sql/pragma.c
> <...>
> +						const char *c_n;
> +						uint32_t id;
> +						struct coll *coll =
> +							sql_index_collation(pIdx, i, &id);
> +						if (coll != NULL)
> +							c_n = coll_by_id(id)->name;
> +						else
> +							c_n = "BINARY";
> +						enum sort_order sort_order;
> +						sort_order = sql_index_column_sort_order(pIdx,
> +											 i);
> +						enum field_type type = pIdx->pTable->
> +											def->fields[cnum].type;
> +						sqlite3VdbeMultiLoad(v, 1, "iisisis", i,
> +											cnum, cnum < 0 ? 0 :
> +											pIdx->pTable->def->
> +											fields[cnum].name,
> +											sort_order, c_n, i < mx,
> +											field_type_strs[type]);

Tab width is 8 symbols, please fix indent.




More information about the Tarantool-patches mailing list