I have pushed some fixes and refactoring on branch.
Please, look at them and squash, if you are agree with them.
In case you disagree or have doubts - reply to this letter with
your comments.
If they are OK to you, patch LGTM.
(Btw, you forgot to squash your last fixes with whole patch.)
I don’t understand: why do you need at all this cmp_def?SQL has memtx/vinyl under it, where cmp_def is used, isn't it?
In SQL it is extremely unlikely to be useful.
As far as I understand, there is some mechanism, which creates
struct index with struct index_def inside memtx (for example, for
memtx_tree_create()) based on what we passed inside in
createIndex() in sql/build.c
Is it right? I am confused.
If it is right, then we can simplify code in build by always
using key_def for cmp_def ?