Tarantool development patches archive
 help / color / mirror / Atom feed
From: Mergen Imeev via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 1/1] sql: introduce UUID field type
Date: Thu, 27 May 2021 19:40:55 +0300	[thread overview]
Message-ID: <20210527164055.GA324813@tarantool.org> (raw)
In-Reply-To: <67f98969-53b2-52ab-3042-ecb9aef304e1@tarantool.org>

Hi! Thank you for the review! My answer and diff below. Also, I plan to send you
this patch one more time as part of patch-set, that contains this patch and
patch that introduces SQL built-in function uuid().

On Tue, May 25, 2021 at 11:50:45PM +0200, Vladislav Shpilevoy wrote:
> Nice fixes!
> 
> > diff --git a/src/box/sql/mem.c b/src/box/sql/mem.c
> > index a518fd0c6..9a6689d7d 100644
> > --- a/src/box/sql/mem.c
> > +++ b/src/box/sql/mem.c
> > @@ -81,6 +91,8 @@ mem_str(const struct Mem *mem)
> >  	case MEM_TYPE_MAP:
> >  	case MEM_TYPE_ARRAY:
> >  		return mp_str(mem->z);
> > +	case MEM_TYPE_UUID:
> > +		return tt_sprintf("%s", tt_uuid_str(&mem->u.uuid));
> 
> You don't need tt_sprintf() either. You need to simply
> return tt_uuid_str().
Thanks, fixed.


Diff:

diff --git a/src/box/sql/mem.c b/src/box/sql/mem.c
index 9a6689d7d..2ad104e1b 100644
--- a/src/box/sql/mem.c
+++ b/src/box/sql/mem.c
@@ -92,7 +92,7 @@ mem_str(const struct Mem *mem)
 	case MEM_TYPE_ARRAY:
 		return mp_str(mem->z);
 	case MEM_TYPE_UUID:
-		return tt_sprintf("%s", tt_uuid_str(&mem->u.uuid));
+		return tt_uuid_str(&mem->u.uuid);
 	case MEM_TYPE_BOOL:
 		return mem->u.b ? "TRUE" : "FALSE";
 	default:

  reply	other threads:[~2021-05-27 16:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20  9:44 Mergen Imeev via Tarantool-patches
2021-05-21  7:16 ` Mergen Imeev via Tarantool-patches
2021-05-22 16:04 ` Vladislav Shpilevoy via Tarantool-patches
2021-05-25 14:13   ` Mergen Imeev via Tarantool-patches
2021-05-25 21:50     ` Vladislav Shpilevoy via Tarantool-patches
2021-05-27 16:40       ` Mergen Imeev via Tarantool-patches [this message]
2021-05-25 22:58     ` Timur Safin via Tarantool-patches
2021-05-27 15:33       ` Mergen Imeev via Tarantool-patches

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=20210527164055.GA324813@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imeevma@tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 1/1] sql: introduce UUID field type' \
    /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