util

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 16, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompleteDeleteRange

func CompleteDeleteRange(ctx sessionctx.Context, dr DelRangeTask) error

CompleteDeleteRange moves a record from gc_delete_range table to gc_delete_range_done table. NOTE: This function WILL NOT start and run in a new transaction internally.

func UpdateDeleteRange

func UpdateDeleteRange(ctx sessionctx.Context, dr DelRangeTask, newStartKey, oldStartKey kv.Key) error

UpdateDeleteRange is only for emulator.

Types

type DelRangeTask

type DelRangeTask struct {
	JobID, ElementID int64
	StartKey, EndKey []byte
}

DelRangeTask is for run delete-range command in gc_worker.

func LoadDeleteRanges

func LoadDeleteRanges(ctx sessionctx.Context, safePoint uint64) (ranges []DelRangeTask, _ error)

LoadDeleteRanges loads delete range tasks from gc_delete_range table.

func (DelRangeTask) Range

func (t DelRangeTask) Range() ([]byte, []byte)

Range returns the range [start, end) to delete.

type Event

type Event struct {
	Tp         model.ActionType
	TableInfo  *model.TableInfo
	ColumnInfo *model.ColumnInfo
	IndexInfo  *model.IndexInfo
}

Event is an event that a ddl operation happened.

func (*Event) String

func (e *Event) String() string

String implements fmt.Stringer interface.

Jump to

Keyboard shortcuts

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