FlushTableWithReadLock flush tables with read lock
(ctx context.Context, db *sql.Conn)
| 725 | |
| 726 | // FlushTableWithReadLock flush tables with read lock |
| 727 | func 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 |
| 734 | func LockTables(ctx context.Context, db *sql.Conn, database, table string) error { |
no test coverage detected