Skip to content
Snippets Groups Projects
Commit 3ffefe3b authored by Ilya Verbin's avatar Ilya Verbin Committed by Vladimir Davydov
Browse files

box: fix field_type1_contains_type2(FIELD_TYPE_DOUBLE, ...)

commit 51af059c ("box: compare and hash msgpack value of double key
field as double") changed `field_mp_type[FIELD_TYPE_DOUBLE]', but the
corresponding column of `field_type_compatibility[]' wasn't updated.

Now a field of type DOUBLE can store MP_UINT and MP_INT, i.e. it can
store any value from fields of type UNSIGNED, NUMBER, INTEGER.
In fact, FIELD_TYPE_DOUBLE is now an alias for FIELD_TYPE_NUMBER.

It's hard to create a test, because e.g. during CheckSpaceFormat even if
field_type1_contains_type2() erroneously returns false, then each tuple is
correctly validated anyway. So this patch actually fixes performance issue.

NO_TEST=see above
NO_DOC=minor fix
NO_CHANGELOG=minor fix
parent 87627322
No related branches found
No related tags found
Loading
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