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

Function DecodeTempIndexValue

pkg/tablecodec/tablecodec.go:1465–1479  ·  view source on GitHub ↗

DecodeTempIndexValue decodes the temp index value.

(value []byte)

Source from the content-addressed store, hash-verified

1463
1464// DecodeTempIndexValue decodes the temp index value.
1465func DecodeTempIndexValue(value []byte) (TempIndexValue, error) {
1466 var (
1467 values []*TempIndexValueElem
1468 err error
1469 )
1470 for len(value) > 0 {
1471 v := &TempIndexValueElem{}
1472 value, err = v.DecodeOne(value)
1473 if err != nil {
1474 return nil, err
1475 }
1476 values = append(values, v)
1477 }
1478 return values, nil
1479}
1480
1481// DecodeOne decodes one temp index value element.
1482func (v *TempIndexValueElem) DecodeOne(b []byte) (remain []byte, err error) {

Callers 7

KeyNeedToLockFunction · 0.92
createMethod · 0.92
checkHandleConsistencyFunction · 0.92
checkIndexKeysFunction · 0.92
fetchTempIndexValsMethod · 0.92
TestTempIndexValueCodecFunction · 0.85

Calls 1

DecodeOneMethod · 0.95

Tested by 1

TestTempIndexValueCodecFunction · 0.68