From: Roman Khabibov <roman.habibov@tarantool.org>
To: tarantool-patches@dev.tarantool.org
Cc: v.shpilevoy@tarantool.org
Subject: [Tarantool-patches] [PATCH v3 2/2] sql: print span more properly
Date: Thu, 11 Jun 2020 18:18:53 +0300 [thread overview]
Message-ID: <20200611151853.24398-3-roman.habibov@tarantool.org> (raw)
In-Reply-To: <20200611151853.24398-1-roman.habibov@tarantool.org>
There were several cases where instead of the correct column
span, the column name was printed. Fix this bug.
Follow up #3962
---
src/box/sql/select.c | 2 +-
test/sql/full_metadata.result | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/box/sql/select.c b/src/box/sql/select.c
index b06240ca4..0a0d9ba14 100644
--- a/src/box/sql/select.c
+++ b/src/box/sql/select.c
@@ -1848,7 +1848,7 @@ generate_column_metadata(struct Parse *pParse, struct SrcList *pTabList,
if (space->sequence != NULL &&
space->sequence_fieldno == (uint32_t) iCol)
vdbe_metadata_set_col_autoincrement(v, i);
- if (colname != NULL)
+ if (span != NULL)
vdbe_metadata_set_col_span(v, i, span);
}
} else {
diff --git a/test/sql/full_metadata.result b/test/sql/full_metadata.result
index 25bac6d86..dc1e91115 100644
--- a/test/sql/full_metadata.result
+++ b/test/sql/full_metadata.result
@@ -65,7 +65,7 @@ execute("SELECT 'aSd' COLLATE \"unicode_ci\";")
execute("SELECT c FROM t;")
| ---
| - metadata:
- | - span: C
+ | - span: c
| type: string
| is_nullable: true
| name: C
@@ -89,16 +89,16 @@ execute("SELECT c COLLATE \"unicode\" FROM t;")
execute("SELECT id, a, c FROM t;")
| ---
| - metadata:
- | - span: ID
+ | - span: id
| type: integer
| is_autoincrement: true
| name: ID
| is_nullable: false
| - type: integer
- | span: A
+ | span: a
| name: A
| is_nullable: false
- | - span: C
+ | - span: c
| type: string
| is_nullable: true
| name: C
--
2.21.0 (Apple Git-122)
next prev parent reply other threads:[~2020-06-11 15:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-11 15:18 [Tarantool-patches] [PATCH v3 0/2] Use-unify-pattern-for-column-names Roman Khabibov
2020-06-11 15:18 ` [Tarantool-patches] [PATCH v3 1/2] sql: use unify pattern for column names Roman Khabibov
2020-06-15 21:59 ` Vladislav Shpilevoy
2020-06-22 21:14 ` roman
2020-06-23 23:12 ` Vladislav Shpilevoy
2020-06-25 14:35 ` Roman Khabibov
2020-06-25 21:25 ` Vladislav Shpilevoy
2020-06-27 11:50 ` Roman Khabibov
2020-06-29 20:08 ` Vladislav Shpilevoy
2020-06-29 23:46 ` Roman Khabibov
2020-06-30 21:23 ` Vladislav Shpilevoy
2020-07-01 12:45 ` Roman Khabibov
2020-07-01 21:25 ` Vladislav Shpilevoy
2020-07-02 15:55 ` Roman Khabibov
2020-06-11 15:18 ` Roman Khabibov [this message]
2020-06-15 22:18 ` [Tarantool-patches] [PATCH v3 2/2] sql: print span more properly Vladislav Shpilevoy
2020-06-22 21:14 ` roman
2020-06-23 23:12 ` Vladislav Shpilevoy
2020-07-02 15:55 ` Roman Khabibov
2020-07-02 19:06 ` Nikita Pettik
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=20200611151853.24398-3-roman.habibov@tarantool.org \
--to=roman.habibov@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v3 2/2] sql: print span more properly' \
/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