Skip to content
Snippets Groups Projects
Commit 620b89f4 authored by Alexandr Lyapunov's avatar Alexandr Lyapunov
Browse files

fixed gh-1549 : BITSET index with inappropriate types crashes in debug build

parent 133405ff
No related branches found
No related tags found
No related merge requests found
......@@ -818,6 +818,11 @@ MemtxEngine::keydefCheck(struct space *space, struct key_def *key_def)
"ARRAY field type is not supported");
}
break;
case NUMBER:
tnt_raise(ClientError, ER_MODIFY_INDEX,
key_def->name,
space_name(space),
"NUMBER field type is not supported");
default:
assert(false);
break;
......
......@@ -1862,3 +1862,21 @@ space:drop()
space = nil
---
...
-- gh-1549: BITSET index with inappropriate types crashes in debug build
space = box.schema.space.create('test')
---
...
_ = space:create_index('primary', { type = 'hash', parts = {1, 'num'}, unique = true })
---
...
_ = space:create_index('bitset', { type = 'bitset', parts = {2, 'number'}, unique = false })
---
- error: 'Can''t create or modify index ''bitset'' in space ''test'': NUMBER field
type is not supported'
...
space:drop()
---
...
space = nil
---
...
......@@ -107,3 +107,11 @@ _ = space:create_index('bitset', { type = 'bitset', parts = {2, 'num'}, unique =
space.index.bitset:select({1}, { iterator = 'OVERLAPS'})
space:drop()
space = nil
-- gh-1549: BITSET index with inappropriate types crashes in debug build
space = box.schema.space.create('test')
_ = space:create_index('primary', { type = 'hash', parts = {1, 'num'}, unique = true })
_ = space:create_index('bitset', { type = 'bitset', parts = {2, 'number'}, unique = false })
space:drop()
space = nil
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