addindextestutil

package
v1.1.0-beta.0...-70f5218 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TestNonUnique test type of create none unique index.
	TestNonUnique testType = iota
	// TestUnique test type of create unique index.
	TestUnique
	// TestPK test type of create Primary key.
	TestPK
	// TestGenIndex test type of create generated col index.
	TestGenIndex
	// TestMultiCols test type of multi columns in one index.
	TestMultiCols
)

Variables

This section is empty.

Functions

func AddIndexGenCol

func AddIndexGenCol(ctx *SuiteContext, tableID int, tableName string, colID int) (err error)

AddIndexGenCol test add index with gen col.

func AddIndexMultiCols

func AddIndexMultiCols(ctx *SuiteContext, tableID int, tableName string, indexID int, colID1 int, colID2 int) (err error)

AddIndexMultiCols test add index with 2 columns.

func AddIndexNonUnique

func AddIndexNonUnique(ctx *SuiteContext, tableID int, tableName string, indexID int) (err error)

AddIndexNonUnique test add index with non-unique key.

func AddIndexPK

func AddIndexPK(ctx *SuiteContext, tableID int, tableName string, colID int) (err error)

AddIndexPK test add index with pk.

func AddIndexUnique

func AddIndexUnique(ctx *SuiteContext, tableID int, tableName string, indexID int) (err error)

AddIndexUnique test add index with unique key.

func InitCompCtxParams

func InitCompCtxParams(ctx *SuiteContext)

InitCompCtxParams inits params for compatibility tests.

func TestOneColFrame

func TestOneColFrame(ctx *SuiteContext, colIDs [][]int, f func(*SuiteContext, int, string, int) error)

TestOneColFrame test 1 col frame.

func TestOneIndexFrame

func TestOneIndexFrame(ctx *SuiteContext, colID int, f func(*SuiteContext, int, string, int) error)

TestOneIndexFrame test 1 index frame.

func TestTwoColsFrame

func TestTwoColsFrame(ctx *SuiteContext, iIDs [][]int, jIDs [][]int, f func(*SuiteContext, int, string, int, int, int) error)

TestTwoColsFrame test 2 columns frame.

Types

type CompatibilityContext

type CompatibilityContext struct {
	IsMultiSchemaChange bool
	IsConcurrentDDL     bool
	IsPiTR              bool
	// contains filtered or unexported fields
}

CompatibilityContext is context of compatibility test.

func (*CompatibilityContext) Start

func (cCtx *CompatibilityContext) Start(ctx *SuiteContext)

Start start the compatibility tests.

func (*CompatibilityContext) Stop

func (cCtx *CompatibilityContext) Stop(ctx *SuiteContext) error

Stop stop the compatibility tests.

type SuiteContext

type SuiteContext struct {
	CompCtx *CompatibilityContext
	// contains filtered or unexported fields
}

SuiteContext wraps test context for add index.

func InitCompCtx

func InitCompCtx(t *testing.T) *SuiteContext

InitCompCtx inits SuiteContext for compatibility tests.

func InitConcurrentDDLTest

func InitConcurrentDDLTest(t *testing.T, colIIDs [][]int, colJIDs [][]int, tType testType) *SuiteContext

InitConcurrentDDLTest inits params for compatibility tests with concurrent ddl.

func InitTest

func InitTest(t *testing.T) *SuiteContext

InitTest inits SuiteContext for test.

func InitTestFailpoint

func InitTestFailpoint(t *testing.T) *SuiteContext

InitTestFailpoint inits SuiteContext for failpoint tests.

Jump to

Keyboard shortcuts

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