From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp14.mail.ru (smtp14.mail.ru [94.100.181.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 1E3B741C5DC for ; Thu, 2 Jul 2020 22:06:49 +0300 (MSK) Date: Thu, 2 Jul 2020 19:06:48 +0000 From: Nikita Pettik Message-ID: <20200702190648.GA8774@tarantool.org> References: <20200611151853.24398-1-roman.habibov@tarantool.org> <20200611151853.24398-3-roman.habibov@tarantool.org> <82c74ce7-ffed-e0f0-9eac-f84962055032@tarantool.org> <8fcad2b8-96a5-bdda-8941-3dfa4b153b33@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH v3 2/2] sql: print span more properly List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Roman Khabibov Cc: tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy On 02 Jul 18:55, Roman Khabibov wrote: > Hi! Thanks for the review. > Nikita, could you, please, see it? > > > On Jun 24, 2020, at 02:12, Vladislav Shpilevoy wrote: > > > > Thanks for the patch! > > > > This commit LGTM and can be pushed out of order. You can send it to > > Nikita in a separate branch in a new thread, I think. If you want it > > in earlier than this branch. Yes. Better start a new thread and bump patch version. > commit 623e0ebb8ac53dd1a0c17f45315b15b720cf71ba > Author: Roman Khabibov > Date: Wed Jun 10 15:03:45 2020 +0300 > > sql: print span more properly > > There were several cases where instead of the correct column > span, the column name was printed. Fix this bug. > > Follow up #4407 > > diff --git a/src/box/sql/select.c b/src/box/sql/select.c > index 7a56136..2955753 100644 > --- a/src/box/sql/select.c > +++ b/src/box/sql/select.c > @@ -1849,7 +1849,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 25bac6d..dc1e911 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 >