Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractPreparedStmtTextsFromSetSessionStatesSQL ¶
ExtractPreparedStmtTextsFromSetSessionStatesSQL is a best-effort helper to extract stmtID -> SQL text.
Types ¶
type PreparedStmtInfo ¶
type SessionStates ¶
type SessionStates struct {
PreparedStmts map[uint32]*PreparedStmtInfo `json:"prepared-stmts,omitempty"`
}
SessionStates mirrors TiDB session states JSON schema partially. Currently we only need prepared statements for traffic capture / replay.
func ParseFromSetSessionStatesSQL ¶
func ParseFromSetSessionStatesSQL(sql string) (SessionStates, error)
ParseFromSetSessionStatesSQL parses a SQL string like: SET SESSION_STATES '...json...' and returns its decoded SessionStates. If sql is not a SET SESSION_STATES statement, it returns an empty SessionStates and nil error.
Click to show internal directories.
Click to hide internal directories.