Skip to content
Snippets Groups Projects
Commit e639ec4b authored by Vladimir Davydov's avatar Vladimir Davydov
Browse files

tuple_format_iterator: don't set multikey_idx for multikey array itself

Currently, we set multikey_idx to multikey_frame->idx for the field
corresponding to the multikey_frame itself. This is wrong, because
this field doesn't have any indirection in the field map - we simply
store offset to the multikey array there. It works by a happy
coincidence - the frame has index -1 and we treat -1 as no-multikey
case, see MULTIKEY_NONE. Should we change MULTIKEY_NONE to e.g. -2
or INT_MAX, we would get a crash because of it. So let's move the
code setting multikey_idx before initializing multikey_frame in
tuple_format_iterator_next().
parent 361e218b
No related branches found
No related tags found
No related merge requests found
Loading
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