MCPcopy
hub / github.com/pingcap/tidb / IsTempIndexKey

Function IsTempIndexKey

pkg/tablecodec/tablecodec.go:1304–1309  ·  view source on GitHub ↗

IsTempIndexKey checks whether the input key is for a temp index.

(indexKey []byte)

Source from the content-addressed store, hash-verified

1302
1303// IsTempIndexKey checks whether the input key is for a temp index.
1304func IsTempIndexKey(indexKey []byte) (isTemp bool) {
1305 indexIDKey := indexKey[prefixLen : prefixLen+8]
1306 indexID := codec.DecodeCmpUintToInt(binary.BigEndian.Uint64(indexIDKey))
1307 tempIndexID := int64(TempIndexPrefix) | indexID
1308 return tempIndexID == indexID
1309}
1310
1311// TempIndexValueFlag is the flag of temporary index value.
1312type TempIndexValueFlag byte

Callers 6

KeyNeedToLockFunction · 0.92
FetchDuplicatedHandleFunction · 0.92
batchCheckAndInsertMethod · 0.92
evalStringMethod · 0.92
IsUntouchedIndexKValueFunction · 0.85

Calls 1

DecodeCmpUintToIntFunction · 0.92

Tested by

no test coverage detected