util

package
v2.1.0-rc.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 23, 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 DeleteDoneRecord

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

DeleteDoneRecord removes a record from gc_delete_range_done table.

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 LoadDoneDeleteRanges

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

LoadDoneDeleteRanges loads deleted ranges from gc_delete_range_done 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