Versions in this module Expand all Collapse all v1 v1.0.0 Oct 16, 2017 Changes in this version + const AutocommitVar + const CharacterSetConnection + const CharacterSetResults + const CharsetDatabase + const CodeIncorrectScope + const CodeReadOnly + const CodeUnknownStatusVar + const CodeUnknownSystemVar + const CodeUnknownTimeZone + const CollationConnection + const CollationDatabase + const DefBatchDelete + const DefBatchInsert + const DefBuildStatsConcurrency + const DefCurretTS + const DefDistSQLScanConcurrency + const DefIndexJoinBatchSize + const DefIndexLookupConcurrency + const DefIndexLookupSize + const DefIndexSerialScanConcurrency + const DefMaxRowCountForINLJ + const DefOptAggPushDown + const DefOptInSubqUnfolding + const DefSkipUTF8Check + const MaxAllowedPacket + const SQLModeVar + const TiDBBatchDelete + const TiDBBatchInsert + const TiDBBuildStatsConcurrency + const TiDBCurrentTS + const TiDBDistSQLScanConcurrency + const TiDBIndexJoinBatchSize + const TiDBIndexLookupConcurrency + const TiDBIndexLookupSize + const TiDBIndexSerialScanConcurrency + const TiDBMaxRowCountForINLJ + const TiDBOptAggPushDown + const TiDBOptInSubqUnFolding + const TiDBSkipConstraintCheck + const TiDBSkipUTF8Check + const TiDBSnapshot + const TimeZone + const TxnIsolation + var DefaultStatusVarScopeFlag = ScopeGlobal | ScopeSession + var ErrCantSetToNull = terror.ClassVariable.New(codeCantSetToNull, "cannot set variable to null") + var ErrIncorrectScope = terror.ClassVariable.New(CodeIncorrectScope, "Incorrect variable scope") + var ErrReadOnly = terror.ClassVariable.New(CodeReadOnly, "variable is read only") + var ErrSnapshotTooOld = terror.ClassVariable.New(codeSnapshotTooOld, "snapshot is older than GC safe point %s") + var ErrUnknownTimeZone = terror.ClassVariable.New(CodeUnknownTimeZone, "unknown or incorrect time zone: %s") + var SetNamesVariables = []string + var SysVars map[string]*SysVar + var UnknownStatusVar = terror.ClassVariable.New(CodeUnknownStatusVar, "unknown status variable") + var UnknownSystemVar = terror.ClassVariable.New(CodeUnknownSystemVar, "unknown system variable '%s'") + func GetStatusVars(vars *SessionVars) (map[string]*StatusVal, error) + func RegisterStatistics(s Statistics) + type GlobalVarAccessor interface + GetGlobalSysVar func(name string) (string, error) + SetGlobalSysVar func(name string, value string) error + type RetryInfo struct + DroppedPreparedStmtIDs []uint32 + Retrying bool + func (r *RetryInfo) AddAutoIncrementID(id int64) + func (r *RetryInfo) Clean() + func (r *RetryInfo) GetCurrAutoIncrementID() (int64, error) + func (r *RetryInfo) ResetOffset() + type ScopeFlag uint8 + const ScopeGlobal + const ScopeNone + const ScopeSession + type SessionVars struct + AllowAggPushDown bool + AllowInSubqueryUnFolding bool + BatchDelete bool + BatchInsert bool + BinlogClient interface{} + BuildStatsConcurrencyVar int + ClientCapability uint32 + CommonGlobalLoaded bool + ConnectionID uint64 + CurrInsertValues interface{} + CurrentDB string + DistSQLScanConcurrency int + GlobalVarsAccessor GlobalVarAccessor + InRestrictedSQL bool + IndexJoinBatchSize int + IndexLookupConcurrency int + IndexLookupSize int + IndexSerialScanConcurrency int + InsertID uint64 + LastFoundRows uint64 + LastInsertID uint64 + MaxRowCountForINLJ int + PreparedStmtNameToID map[string]uint32 + PreparedStmts map[uint32]interface{} + PrevLastInsertID uint64 + RetryInfo *RetryInfo + SQLMode mysql.SQLMode + SkipConstraintCheck bool + SkipUTF8Check bool + SnapshotInfoschema interface{} + SnapshotTS uint64 + Status uint16 + StmtCtx *StatementContext + StrictSQLMode bool + Systems map[string]string + TLSConnectionState *tls.ConnectionState + TimeZone *time.Location + TxnCtx *TransactionContext + User *auth.UserIdentity + Users map[string]string + UsersLock sync.RWMutex + func NewSessionVars() *SessionVars + func (s *SessionVars) GetCharsetInfo() (charset, collation string) + func (s *SessionVars) GetNextPreparedStmtID() uint32 + func (s *SessionVars) GetStatusFlag(flag uint16) bool + func (s *SessionVars) GetTimeZone() *time.Location + func (s *SessionVars) InTxn() bool + func (s *SessionVars) IsAutocommit() bool + func (s *SessionVars) SetLastInsertID(insertID uint64) + func (s *SessionVars) SetStatusFlag(flag uint16, on bool) + type StatementContext struct + DividedByZeroAsWarning bool + IgnoreTruncate bool + IgnoreZeroInDate bool + InInsertStmt bool + InSelectStmt bool + InShowWarning bool + InUpdateOrDeleteStmt bool + NotFillCache bool + OverflowAsWarning bool + Priority mysql.PriorityEnum + TimeZone *time.Location + TruncateAsWarning bool + func MostRestrictStateContext() *StatementContext + func (sc *StatementContext) AddAffectedRows(rows uint64) + func (sc *StatementContext) AddFoundRows(rows uint64) + func (sc *StatementContext) AffectedRows() uint64 + func (sc *StatementContext) AppendWarning(warn error) + func (sc *StatementContext) FoundRows() uint64 + func (sc *StatementContext) GetWarnings() []error + func (sc *StatementContext) HandleOverflow(err error, warnErr error) error + func (sc *StatementContext) HandleTruncate(err error) error + func (sc *StatementContext) ResetForRetry() + func (sc *StatementContext) SetWarnings(warns []error) + func (sc *StatementContext) WarningCount() uint16 + type Statistics interface + GetScope func(status string) ScopeFlag + Stats func(*SessionVars) (map[string]interface{}, error) + type StatusVal struct + Scope ScopeFlag + Value interface{} + type SysVar struct + Name string + Scope ScopeFlag + Value string + func GetSysVar(name string) *SysVar + type TableDelta struct + Count int64 + Delta int64 + type TransactionContext struct + Binlog interface{} + DirtyDB interface{} + ForUpdate bool + Histroy interface{} + InfoSchema interface{} + SchemaVersion int64 + StartTS uint64 + TableDeltaMap map[int64]TableDelta + func (tc *TransactionContext) UpdateDeltaForTable(tableID int64, delta int64, count int64)