Tarantool development patches archive
 help / color / mirror / Atom feed
From: "i.koptelov" <ivan.koptelov@tarantool.org>
To: tarantool-patches@freelists.org
Cc: "n.pettik" <korablev@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH 1/2] sql: rename instr to position & add collation usage
Date: Wed, 20 Mar 2019 15:59:23 +0300	[thread overview]
Message-ID: <A487E501-342D-4D72-B651-AA3D6F60A648@tarantool.org> (raw)
In-Reply-To: <2f6396ca10b94874467361e482555b225d5256de.1553078164.git.ivan.koptelov@tarantool.org>

Sorry, I have missed one case. (already squashed):
---
 src/box/sql/expr.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/box/sql/expr.c b/src/box/sql/expr.c
index 53926e3f2..8c1889d8a 100644
--- a/src/box/sql/expr.c
+++ b/src/box/sql/expr.c
@@ -4102,8 +4102,16 @@ sqlExprCodeTarget(Parse * pParse, Expr * pExpr, int target)
 			 * is done using ANSI rules from
 			 * collations_check_compatibility().
 			 */
+			if (nFarg == 1) {
+				bool unused;
+				uint32_t id;
+				if (sql_expr_coll(pParse,
+						  pFarg->a[0].pExpr, &unused,
+						  &id, &coll) != 0)
+					return 0;
+			}
 			if ((pDef->funcFlags & SQL_FUNC_NEEDCOLL) != 0 &&
-			     coll == NULL) {
+			     coll == NULL && nFarg > 1) {
 				struct coll *unused = NULL;
 				uint32_t curr_id = COLL_NONE;
 				bool is_curr_forced = false;
-- 
2.20.

  reply	other threads:[~2019-03-20 12:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20 11:11 [tarantool-patches] [PATCH 0/2] sql: add better coll. determination & position func Ivan Koptelov
2019-03-20 11:11 ` [tarantool-patches] [PATCH 1/2] sql: add better collation determination in functions Ivan Koptelov
2019-03-25 19:26   ` [tarantool-patches] " n.pettik
2019-03-27 13:38     ` i.koptelov
2019-03-28 12:50       ` n.pettik
2019-03-28 14:08         ` i.koptelov
2019-03-29  9:57           ` n.pettik
2019-03-20 11:11 ` [tarantool-patches] [PATCH 2/2] sql: rename instr to position & add collation usage Ivan Koptelov
2019-03-20 12:59   ` i.koptelov [this message]
2019-03-26 12:32   ` [tarantool-patches] " n.pettik
2019-03-27 13:39     ` i.koptelov
2019-03-28 12:57       ` n.pettik
2019-04-01 14:15 ` [tarantool-patches] Re: [PATCH 0/2] sql: add better coll. determination & position func 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=A487E501-342D-4D72-B651-AA3D6F60A648@tarantool.org \
    --to=ivan.koptelov@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH 1/2] sql: rename instr to position & add collation usage' \
    /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