Skip to content

Assertion failure when trying to create a json-path index after deleting a multikey index over the same field #11291

@sergepetrenko

Description

@sergepetrenko

Reproduced on Tarantool Enterprise 3.4.0-entrypoint-77-g0922040, however, it's the CE part that's faulty.

Repro:

-- Step 1. Create a space.
box.cfg{}
box.schema.space.create('test')
box.space.test:create_index('pk', {
    parts = {
        {1, 'unsigned'},
    },
})

-- Step 2. Create a multikey index over field 3.
box.space.test:create_index('tk', {parts={{field=3, type='unsigned', path='[*]'}}})

-- Step 3. Insert some data into the space and check that multikey index is working.
box.space.test:insert{1, 10, {10, 100, 1000}, 1000}
box.space.test:insert{2, 20, {20, 200, 2000}, 2000}
box.space.test:insert{3, 30, {30, 300, 3000}, 3000}

box.space.test.index.tk:get{10}
box.space.test.index.tk:get{100}

-- Step 4. Drop the multikey index and then try to create a json path index over the same field.
box.space.test.index.tk:drop()
box.space.test:create_index('tk', {parts={{field=3, type='unsigned', path='[2]'}}})

Results of step 4:

Assertion failed: (!field->is_multikey_part || multikey_idx != MULTIKEY_NONE), function tuple_field_raw_by_path, file tuple.h, line 972.

Metadata

Metadata

Assignees

Labels

3.2Target is 3.2 and all newer release/master branches

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions