MCPcopy
hub / github.com/pingcap/tidb / FlushTableWithReadLock

Function FlushTableWithReadLock

dumpling/export/sql.go:727–731  ·  view source on GitHub ↗

FlushTableWithReadLock flush tables with read lock

(ctx context.Context, db *sql.Conn)

Source from the content-addressed store, hash-verified

725
726// FlushTableWithReadLock flush tables with read lock
727func FlushTableWithReadLock(ctx context.Context, db *sql.Conn) error {
728 const ftwrlQuery = "FLUSH TABLES WITH READ LOCK"
729 _, err := db.ExecContext(ctx, ftwrlQuery)
730 return errors.Annotatef(err, "sql: %s", ftwrlQuery)
731}
732
733// LockTables locks table with read lock
734func LockTables(ctx context.Context, db *sql.Conn, database, table string) error {

Callers 2

SetupMethod · 0.85
resolveAutoConsistencyFunction · 0.85

Calls 1

ExecContextMethod · 0.65

Tested by

no test coverage detected