Skip to content
Snippets Groups Projects
Commit ac02d985 authored by Kirill Shcherbatov's avatar Kirill Shcherbatov Committed by Kirill Yukhin
Browse files

box: fix func_index invalid return error message

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

(cherry picked from commit 260a3b3a)
parent 0ee8cbd6
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -148,7 +148,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()
| ---
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment