From: Nikita Pettik <korablev@tarantool.org> To: Roman Khabibov <roman.habibov@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH] sql: fix number and boolean sorting rules Date: Mon, 27 Apr 2020 15:31:20 +0000 [thread overview] Message-ID: <20200427153120.GF30870@tarantool.org> (raw) In-Reply-To: <20200427013428.GB28450@tarantool.org> On 27 Apr 01:34, Nikita Pettik wrote: > On 24 Apr 16:03, Roman Khabibov wrote: > > Hi! Thanks for the review. > > > > > On Apr 21, 2020, at 02:57, Nikita Pettik <korablev@tarantool.org> wrote: > > > > > > On 20 Apr 23:28, Roman Khabibov wrote: > > Pushed to master and 2.3 with fixes attached below. Changelogs are > not updated due to the lack of drafts on github. Branch has been dropped. Pushed to 2.4 as well. Updated changelogs (I failed to find it in mailing list so wrote it myself). > diff --git a/src/box/sql/vdbeaux.c b/src/box/sql/vdbeaux.c > index 310cec3ed..71f694b20 100644 > --- a/src/box/sql/vdbeaux.c > +++ b/src/box/sql/vdbeaux.c > @@ -3053,8 +3053,9 @@ sqlVdbeCompareMsgpack(const char **key1, > } else if ((pKey2->flags & MEM_Real) != 0) { > rc = double_compare_uint64(pKey2->u.r, > mem1.u.u, -1); > - } else if ((pKey2->flags & MEM_Null) != 0 || > - (pKey2->flags & MEM_Bool) != 0) { > + } else if ((pKey2->flags & MEM_Null) != 0) { > + rc = 1; > + } else if ((pKey2->flags & MEM_Bool) != 0) { > rc = 1; > } else { > rc = -1; > @@ -3074,8 +3075,9 @@ sqlVdbeCompareMsgpack(const char **key1, > } else if (pKey2->flags & MEM_Real) { > rc = double_compare_uint64(-pKey2->u.r, > -mem1.u.i, 1); > - } else if ((pKey2->flags & MEM_Null) != 0 || > - (pKey2->flags & MEM_Bool) != 0) { > + } else if ((pKey2->flags & MEM_Null) != 0) { > + rc = 1; > + } else if ((pKey2->flags & MEM_Bool) != 0) { > rc = 1; > } else { > rc = -1; > @@ -3101,9 +3103,12 @@ sqlVdbeCompareMsgpack(const char **key1, > } else if (mem1.u.r > pKey2->u.r) { > rc = +1; > } > + } else if ((pKey2->flags & MEM_Null) != 0) { > + rc = 1; > + } else if ((pKey2->flags & MEM_Bool) != 0) { > + rc = 1; > } else { > - rc = (pKey2->flags & MEM_Null) != 0 || > - (pKey2->flags & MEM_Bool) != 0 ? 1 : -1; > + rc = -1; > } > break; >
prev parent reply other threads:[~2020-04-27 15:31 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-13 4:11 Roman Khabibov 2020-04-15 19:41 ` Mergen Imeev 2020-04-16 0:34 ` Roman Khabibov 2020-04-16 8:17 ` Mergen Imeev 2020-04-17 0:48 ` Roman Khabibov 2020-04-17 6:35 ` Mergen Imeev 2020-04-17 7:27 ` Timur Safin 2020-04-17 11:25 ` Roman Khabibov 2020-04-17 11:51 ` Timur Safin 2020-04-18 2:46 ` Roman Khabibov 2020-04-18 9:18 ` Timur Safin 2020-04-20 0:12 ` Roman Khabibov 2020-04-20 1:05 ` Nikita Pettik 2020-04-20 20:28 ` Roman Khabibov 2020-04-20 23:57 ` Nikita Pettik 2020-04-24 13:03 ` Roman Khabibov 2020-04-27 1:34 ` Nikita Pettik 2020-04-27 15:31 ` Nikita Pettik [this message]
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=20200427153120.GF30870@tarantool.org \ --to=korablev@tarantool.org \ --cc=roman.habibov@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH] sql: fix number and boolean sorting rules' \ /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