[tarantool-patches] Re: [PATCH 1/2] sql: rename instr to position & add collation usage
i.koptelov
ivan.koptelov at tarantool.org
Wed Mar 20 15:59:23 MSK 2019
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.
More information about the Tarantool-patches
mailing list