[tarantool-patches] [PATCH v1 1/1] box: fix func_index invalid return error message
Kirill Shcherbatov
kshcherbatov at tarantool.org
Tue Oct 8 12:01:46 MSK 2019
Functional index extractor code used to raise an invalid
error message when the user-defined extractor function
returns a scalar instead of a table.
Closes #4553
---
Branch: http://github.com/tarantool/tarantool/tree/kshch/gh-4553-func-index-bad-error-on-invalid-return
Issue: https://github.com/tarantool/tarantool/issues/4553
src/box/key_list.c | 2 +-
test/engine/func_index.result | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/box/key_list.c b/src/box/key_list.c
index e130d1c8c..3d736b55f 100644
--- a/src/box/key_list.c
+++ b/src/box/key_list.c
@@ -144,7 +144,7 @@ key_list_iterator_next(struct key_list_iterator *it, const char **value)
diag_set(ClientError, ER_FUNC_INDEX_FORMAT, it->index_def->name,
space ? space_name(space) : "",
tt_sprintf("supplied key type is invalid: expected %s",
- field_type_strs[MP_ARRAY]));
+ field_type_strs[FIELD_TYPE_ARRAY]));
return -1;
}
struct key_def *key_def = it->index_def->key_def;
diff --git a/test/engine/func_index.result b/test/engine/func_index.result
index bb4200f7a..84cb83022 100644
--- a/test/engine/func_index.result
+++ b/test/engine/func_index.result
@@ -139,7 +139,7 @@ idx = s:create_index('idx', {func = box.func.invalidreturn0.id, parts = {{1, 'un
s:insert({1})
| ---
| - error: 'Key format doesn''t match one defined in functional index ''idx'' of space
- | ''withdata'': supplied key type is invalid: expected boolean'
+ | ''withdata'': supplied key type is invalid: expected array'
| ...
idx:drop()
| ---
--
2.23.0
More information about the Tarantool-patches
mailing list