Documentation ¶
Index ¶
- type Executor
- func (e *Executor) ABTestDelete(sql string) error
- func (e *Executor) ABTestExecDDL(sql string) error
- func (e *Executor) ABTestIfTxn() bool
- func (e *Executor) ABTestInsert(sql string) error
- func (e *Executor) ABTestSelect(sql string) error
- func (e *Executor) ABTestTxnBegin() error
- func (e *Executor) ABTestTxnCommit() error
- func (e *Executor) ABTestTxnRollback() error
- func (e *Executor) ABTestUpdate(sql string) error
- func (e *Executor) BeginWithOnlineTables()
- func (e *Executor) Close() error
- func (e *Executor) DMSelectEqual(sql string, conn1, conn2 *connection.Connection) error
- func (e *Executor) Delete(stmt string) error
- func (e *Executor) EndTransaction()
- func (e *Executor) Exec(sql string) error
- func (e *Executor) ExecDDL(stmt string) error
- func (e *Executor) ExecIgnoreErr(sql string)
- func (e *Executor) ExecSQL(sql *types.SQL) error
- func (e *Executor) GenerateDDLAlterTable(opt *generator.DDLOptions) (*types.SQL, error)
- func (e *Executor) GenerateDDLCreateIndex(opt *generator.DDLOptions) (*types.SQL, error)
- func (e *Executor) GenerateDDLCreateTable() (*types.SQL, error)
- func (e *Executor) GenerateDMLDelete() (*types.SQL, error)
- func (e *Executor) GenerateDMLInsert() (*types.SQL, error)
- func (e *Executor) GenerateDMLSelect() (*types.SQL, error)
- func (e *Executor) GenerateDMLSelectForUpdate() (*types.SQL, error)
- func (e *Executor) GenerateDMLUpdate() (*types.SQL, error)
- func (e *Executor) GenerateSleep() *types.SQL
- func (e *Executor) GenerateTxnBegin() *types.SQL
- func (e *Executor) GenerateTxnCommit() *types.SQL
- func (e *Executor) GenerateTxnRollback() *types.SQL
- func (e *Executor) GetConn() *connection.Connection
- func (e *Executor) GetConn1() *connection.Connection
- func (e *Executor) GetConn2() *connection.Connection
- func (e *Executor) GetConn3() *connection.Connection
- func (e *Executor) GetID() int
- func (e *Executor) IfTxn() bool
- func (e *Executor) Insert(stmt string) error
- func (e *Executor) PrintSchema() error
- func (e *Executor) ReConnect() error
- func (e *Executor) ReloadSchema() error
- func (e *Executor) Select(stmt string) error
- func (e *Executor) SingleTestDelete(sql string) error
- func (e *Executor) SingleTestExecDDL(sql string) error
- func (e *Executor) SingleTestIfTxn() bool
- func (e *Executor) SingleTestInsert(sql string) error
- func (e *Executor) SingleTestSelect(sql string) error
- func (e *Executor) SingleTestTxnBegin() error
- func (e *Executor) SingleTestTxnCommit() error
- func (e *Executor) SingleTestTxnRollback() error
- func (e *Executor) SingleTestUpdate(sql string) error
- func (e *Executor) Start()
- func (e *Executor) Stop(msg string)
- func (e *Executor) TxnBegin() error
- func (e *Executor) TxnCommit() error
- func (e *Executor) TxnRollback() error
- func (e *Executor) Update(stmt string) error
- func (e *Executor) WaitTiFlashTableSync(table string) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct { sync.Mutex // SQL channel SQLCh chan *types.SQL // Since we must ensure no other transactions commit or begin between the transaction start time points of abtest // when a transaction begins/commits/rollbacks, generator wait for it ready for both A/B side // This channel is for sending signal to generator when both A/B side's begin/commit/rollback are ready TxnReadyCh chan struct{} // ErrCh for waiting SQL execution finish // and pass execution error ErrCh chan error // OnlineTable record tables which are manipulated in transaction for avoiding online DDL OnlineTable []string TiFlash bool // contains filtered or unexported fields }
Executor define test executor
func (*Executor) ABTestDelete ¶
ABTestDelete expose abTestDelete
func (*Executor) ABTestExecDDL ¶
ABTestExecDDL expose abTestExecDDL
func (*Executor) ABTestInsert ¶
ABTestInsert expose abTestInsert
func (*Executor) ABTestSelect ¶
ABTestSelect expose abTestSelect
func (*Executor) ABTestTxnBegin ¶
ABTestTxnBegin export abTestTxnBegin
func (*Executor) ABTestTxnCommit ¶
ABTestTxnCommit export abTestTxnCommit
func (*Executor) ABTestTxnRollback ¶
ABTestTxnRollback export abTestTxnRollback
func (*Executor) ABTestUpdate ¶
ABTestUpdate expose abTestUpdate
func (*Executor) BeginWithOnlineTables ¶
func (e *Executor) BeginWithOnlineTables()
BeginWithOnlineTables begins transaction with online tables
func (*Executor) DMSelectEqual ¶
func (e *Executor) DMSelectEqual(sql string, conn1, conn2 *connection.Connection) error
DMSelectEqual check data equal by `SELECT`.
func (*Executor) EndTransaction ¶
func (e *Executor) EndTransaction()
EndTransaction clear online tables
func (*Executor) ExecIgnoreErr ¶
ExecIgnoreErr function for quick executor some SQLs with error tolerance
func (*Executor) GenerateDDLAlterTable ¶
GenerateDDLAlterTable rand alter table statement
func (*Executor) GenerateDDLCreateIndex ¶
GenerateDDLCreateIndex rand create index statement
func (*Executor) GenerateDDLCreateTable ¶
GenerateDDLCreateTable rand create table statement
func (*Executor) GenerateDMLDelete ¶
GenerateDMLDelete rand update statement
func (*Executor) GenerateDMLInsert ¶
GenerateDMLInsert rand insert statement
func (*Executor) GenerateDMLSelect ¶
GenerateDMLSelect rand select statement
func (*Executor) GenerateDMLSelectForUpdate ¶
GenerateDMLSelectForUpdate rand update statement
func (*Executor) GenerateDMLUpdate ¶
GenerateDMLUpdate rand update statement
func (*Executor) GenerateSleep ¶
GenerateSleep rand insert statement
func (*Executor) GenerateTxnBegin ¶
GenerateTxnBegin start transaction
func (*Executor) GenerateTxnCommit ¶
GenerateTxnCommit commit transaction
func (*Executor) GenerateTxnRollback ¶
GenerateTxnRollback rollback transaction
func (*Executor) GetConn ¶
func (e *Executor) GetConn() *connection.Connection
GetConn get connection of first connection
func (*Executor) GetConn1 ¶
func (e *Executor) GetConn1() *connection.Connection
GetConn1 get connection of first connection
func (*Executor) GetConn2 ¶
func (e *Executor) GetConn2() *connection.Connection
GetConn2 get connection of second connection
func (*Executor) GetConn3 ¶
func (e *Executor) GetConn3() *connection.Connection
GetConn3 get connection of third connection.
func (*Executor) PrintSchema ¶
PrintSchema print schema information and return
func (*Executor) ReloadSchema ¶
ReloadSchema expose reloadSchema
func (*Executor) SingleTestDelete ¶
SingleTestDelete expose singleTestDelete
func (*Executor) SingleTestExecDDL ¶
SingleTestExecDDL expose singleTestExecDDL
func (*Executor) SingleTestIfTxn ¶
SingleTestIfTxn expose singleTestIfTxn
func (*Executor) SingleTestInsert ¶
SingleTestInsert expose singleTestInsert
func (*Executor) SingleTestSelect ¶
SingleTestSelect expose singleTestSelect
func (*Executor) SingleTestTxnBegin ¶
SingleTestTxnBegin export singleTestTxnBegin
func (*Executor) SingleTestTxnCommit ¶
SingleTestTxnCommit export singleTestTxnCommit
func (*Executor) SingleTestTxnRollback ¶
SingleTestTxnRollback export singleTestTxnRollback
func (*Executor) SingleTestUpdate ¶
SingleTestUpdate expose singleTestUpdate
func (*Executor) TxnRollback ¶
TxnRollback offer unified method for single & abtest
func (*Executor) WaitTiFlashTableSync ¶
WaitTiFlashTableSync waits table sync to TiFlash