[tarantool-patches] Re: [PATCH 8/9] sql: make LIKE predicate return boolean result
n.pettik
korablev at tarantool.org
Thu Apr 18 20:55:41 MSK 2019
>> diff --git a/src/box/sql/func.c b/src/box/sql/func.c
>> index 860cd8920..baa739ba4 100644
>> --- a/src/box/sql/func.c
>> +++ b/src/box/sql/func.c
>> @@ -974,7 +974,7 @@ likeFunc(sql_context *context, int argc, sql_value **argv)
>> sql_result_error(context, err_msg, -1);
>> return;
>> }
>> - sql_result_int(context, res == MATCH);
>> + sql_result_boolean(context, res == MATCH);
>
> Probably we should either contract all the names,
> or do not contract any. Here the name was contracted: 'int',
> not 'integer'. Then it should be 'bool', not 'boolean'.
diff --git a/src/box/sql/func.c b/src/box/sql/func.c
index 268a4768a..238bd8e03 100644
--- a/src/box/sql/func.c
+++ b/src/box/sql/func.c
@@ -974,7 +974,7 @@ likeFunc(sql_context *context, int argc, sql_value **argv)
sql_result_error(context, err_msg, -1);
return;
}
- sql_result_boolean(context, res == MATCH);
+ sql_result_bool(context, res == MATCH);
}
/*
diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
index a74fa4b9e..7dbca2a63 100644
--- a/src/box/sql/sqlInt.h
+++ b/src/box/sql/sqlInt.h
@@ -499,7 +499,7 @@ void
sql_result_int(sql_context *, int);
void
-sql_result_boolean(sql_context *ctx, bool value);
+sql_result_bool(sql_context *ctx, bool value);
void
sql_result_int64(sql_context *, sql_int64);
diff --git a/src/box/sql/vdbeInt.h b/src/box/sql/vdbeInt.h
index 8e161c00c..7951ba91a 100644
--- a/src/box/sql/vdbeInt.h
+++ b/src/box/sql/vdbeInt.h
@@ -497,7 +497,7 @@ int sqlVdbeMemSetStr(Mem *, const char *, int, u8, void (*)(void *));
void sqlVdbeMemSetInt64(Mem *, i64);
void
-vdbe_mem_set_boolean(struct Mem *mem, bool value);
+vdbe_mem_set_bool(struct Mem *mem, bool value);
#ifdef SQL_OMIT_FLOATING_POINT
#define sqlVdbeMemSetDouble sqlVdbeMemSetInt64
diff --git a/src/box/sql/vdbeapi.c b/src/box/sql/vdbeapi.c
index 18f7587c3..e4dad3584 100644
--- a/src/box/sql/vdbeapi.c
+++ b/src/box/sql/vdbeapi.c
@@ -387,9 +387,9 @@ sql_result_int(sql_context * pCtx, int iVal)
}
void
-sql_result_boolean(sql_context *ctx, bool value)
+sql_result_bool(sql_context *ctx, bool value)
{
- vdbe_mem_set_boolean(ctx->pOut, value);
+ vdbe_mem_set_bool(ctx->pOut, value);
}
void
diff --git a/src/box/sql/vdbemem.c b/src/box/sql/vdbemem.c
index 1590a3550..69aea5ef5 100644
--- a/src/box/sql/vdbemem.c
+++ b/src/box/sql/vdbemem.c
@@ -803,7 +803,7 @@ sqlVdbeMemSetInt64(Mem * pMem, i64 val)
}
void
-vdbe_mem_set_boolean(struct Mem *mem, bool value)
+vdbe_mem_set_bool(struct Mem *mem, bool value)
{
More information about the Tarantool-patches
mailing list