From: Mergen Imeev <imeevma@tarantool.org>
To: Nikita Pettik <korablev@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v2 2/9] sql: remove PRAGMA "short_column_names"
Date: Tue, 31 Dec 2019 07:15:09 +0300 [thread overview]
Message-ID: <20191231041508.GB29460@tarantool.org> (raw)
In-Reply-To: <20191230231218.GA98764@tarantool.org>
Thank you for review! Applied the diff.
On Tue, Dec 31, 2019 at 01:12:18AM +0200, Nikita Pettik wrote:
> On 30 Dec 19:43, imeevma@tarantool.org wrote:
> > @@ -1828,11 +1825,12 @@ generate_column_metadata(struct Parse *pParse, struct SrcList *pTabList,
> > struct space_def *space_def = space->def;
> > assert(iCol >= 0 && iCol < (int)space_def->field_count);
> > zCol = space_def->fields[iCol].name;
> > - const char *name = colname;
> > - if (name == NULL) {
> > - if (!shortNames && !fullNames) {
> > - name = span;
> > - } else if (fullNames) {
> > + const char *name = NULL;
> > + if (pEList->a[i].zName != NULL) {
> > + name = pEList->a[i].zName;
> > + } else {
> > + int flags = pParse->sql_flags;
> > + if ((flags & SQL_FullColNames) != 0) {
> > name = tt_sprintf("%s.%s",
> > space_def->name,
>
> Please, apply this refactoring:
>
> diff --git a/src/box/sql/select.c b/src/box/sql/select.c
> index 0fc86e550..65e41f219 100644
> --- a/src/box/sql/select.c
> +++ b/src/box/sql/select.c
> @@ -1825,10 +1825,8 @@ generate_column_metadata(struct Parse *pParse, struct SrcList *pTabList,
> struct space_def *space_def = space->def;
> assert(iCol >= 0 && iCol < (int)space_def->field_count);
> zCol = space_def->fields[iCol].name;
> - const char *name = NULL;
> - if (pEList->a[i].zName != NULL) {
> - name = pEList->a[i].zName;
> - } else {
> + const char *name = colname;
> + if (name == NULL) {
>
next prev parent reply other threads:[~2019-12-31 4:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-30 16:43 [Tarantool-patches] [PATCH v2 0/9] sql: Remove control pragmas imeevma
2019-12-30 16:43 ` [Tarantool-patches] [PATCH v2 1/9] sql: remove PRAGMA "count_changes" imeevma
2019-12-30 16:43 ` [Tarantool-patches] [PATCH v2 2/9] sql: remove PRAGMA "short_column_names" imeevma
2019-12-30 23:12 ` Nikita Pettik
2019-12-31 4:15 ` Mergen Imeev [this message]
2019-12-30 16:43 ` [Tarantool-patches] [PATCH v2 3/9] sql: remove PRAGMA "sql_compound_select_limit" imeevma
2019-12-30 23:11 ` Nikita Pettik
2019-12-31 4:14 ` Mergen Imeev
2019-12-30 16:43 ` [Tarantool-patches] [PATCH v2 4/9] sql: remove PRAGMA "vdbe_addoptrace" imeevma
2019-12-30 16:43 ` [Tarantool-patches] [PATCH v2 5/9] box: introduce 'service' engine imeevma
2019-12-30 16:43 ` [Tarantool-patches] [PATCH v2 6/9] box: introduce _session_settings system space imeevma
2019-12-30 16:43 ` [Tarantool-patches] [PATCH v2 7/9] box: add SQL settings to _session_settings imeevma
2019-12-30 16:43 ` [Tarantool-patches] [PATCH v2 8/9] sql: remove control pragmas imeevma
2019-12-30 16:43 ` [Tarantool-patches] [PATCH v2 9/9] sql: refactor PRAGMA-related code imeevma
2019-12-30 23:31 ` [Tarantool-patches] [PATCH v2 0/9] sql: Remove control pragmas Nikita Pettik
2019-12-31 4:16 ` Mergen Imeev
2019-12-31 8:01 ` Kirill Yukhin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191231041508.GB29460@tarantool.org \
--to=imeevma@tarantool.org \
--cc=korablev@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v2 2/9] sql: remove PRAGMA "short_column_names"' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox