Documentation ¶
Index ¶
- Constants
- func AddIndexGenCol(ctx *SuiteContext, tableID int, tableName string, colID int) (err error)
- func AddIndexMultiCols(ctx *SuiteContext, tableID int, tableName string, indexID int, colID1 int, ...) (err error)
- func AddIndexNonUnique(ctx *SuiteContext, tableID int, tableName string, indexID int) (err error)
- func AddIndexPK(ctx *SuiteContext, tableID int, tableName string, colID int) (err error)
- func AddIndexUnique(ctx *SuiteContext, tableID int, tableName string, indexID int) (err error)
- func InitCompCtxParams(ctx *SuiteContext)
- func TestOneColFrame(ctx *SuiteContext, colIDs [][]int, ...)
- func TestOneIndexFrame(ctx *SuiteContext, colID int, f func(*SuiteContext, int, string, int) error)
- func TestTwoColsFrame(ctx *SuiteContext, iIDs [][]int, jIDs [][]int, ...)
- type CompatibilityContext
- type SuiteContext
Constants ¶
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 InitTestFailpoint ¶
func InitTestFailpoint(t *testing.T) *SuiteContext
InitTestFailpoint inits SuiteContext for failpoint tests.