admin

package
v0.0.0-...-503c688 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TblCntGreater means that the number of table rows is more than the number of index rows.
	TblCntGreater byte = 1
	// IdxCntGreater means that the number of index rows is more than the number of table rows.
	IdxCntGreater byte = 2
)

Count greater Types

Variables

View Source
var (
	// ErrAdminCheckTable returns when the table records is inconsistent with the index values.
	ErrAdminCheckTable = dbterror.ClassAdmin.NewStd(errno.ErrAdminCheckTable)
)

Functions

func CheckIndicesCount

func CheckIndicesCount(ctx sessionctx.Context, dbName, tableName string, indices []string) (byte, int, error)

CheckIndicesCount compares indices count with table count. It returns the count greater type, the index offset and an error. It returns nil if the count from the index is equal to the count from the table columns, otherwise it returns an error and the corresponding index's offset.

func CheckRecordAndIndex

func CheckRecordAndIndex(ctx context.Context, sessCtx sessionctx.Context, txn kv.Transaction, t table.Table, idx table.Index) error

CheckRecordAndIndex is exported for testing.

Types

type RecordData

type RecordData struct {
	Handle kv.Handle
	Values []types.Datum
}

RecordData is the record data composed of a handle and values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL