MCPcopy Create free account
hub / github.com/MariaDB/server / is_subkey

Function is_subkey

sql/sql_select.cc:27347–27355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27345*/
27346
27347inline bool
27348is_subkey(KEY_PART_INFO *key_part, KEY_PART_INFO *ref_key_part,
27349 KEY_PART_INFO *ref_key_part_end)
27350{
27351 for (; ref_key_part < ref_key_part_end; key_part++, ref_key_part++)
27352 if (!key_part->field->eq(ref_key_part->field))
27353 return 0;
27354 return 1;
27355}
27356
27357/**
27358 Test if we can use one of the 'usable_keys' instead of 'ref' key

Callers 1

test_if_subkeyFunction · 0.85

Calls 1

eqMethod · 0.45

Tested by 1

test_if_subkeyFunction · 0.68