MCPcopy Index your code
hub / github.com/pingcap/tidb / getIndexVersion

Function getIndexVersion

pkg/tablecodec/tablecodec.go:967–976  ·  view source on GitHub ↗
(value []byte)

Source from the content-addressed store, hash-verified

965}
966
967func getIndexVersion(value []byte) int {
968 if len(value) <= MaxOldEncodeValueLen {
969 return 0
970 }
971 tailLen := int(value[0])
972 if (tailLen == 0 || tailLen == 1) && value[1] == IndexVersionFlag {
973 return int(value[2])
974 }
975 return 0
976}
977
978// DecodeIndexKVEx looks like DecodeIndexKV, the difference is that it tries to reduce allocations.
979func DecodeIndexKVEx(key, value []byte, colsLen int, hdStatus HandleStatus, columns []rowcodec.ColInfo, buf []byte, preAlloc [][]byte) ([][]byte, error) {

Callers 4

DecodeIndexKVExFunction · 0.85
DecodeIndexKVFunction · 0.85
SplitIndexValueFunction · 0.85
IndexKVIsUniqueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected