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 ¶
Click to show internal directories.
Click to hide internal directories.