// SetSnapshot set the snapshot variable for tidb
SetSnapshot set the snapshot variable for tidb
// SetSnapshot set the snapshot variable for tidb
func SetSnapshot(ctx context.Context, db *sql.DB, snapshot string) error {
	sql := fmt.Sprintf("SET @@tidb_snapshot='%s'", snapshot)
	log.Infof("set history snapshot: %s", sql)
	_, err := db.ExecContext(ctx, sql)
	return errors.Trace(err)
}
func SetSnapshot ( ctx context . Context , db * sql . DB , snapshot string ) error { sql := fmt . Sprintf ( " " , snapshot ) log . Infof ( " " , sql ) _ , err := db . ExecContext ( ctx , sql ) return errors . Trace ( err ) }
SetSnapshot set the snapshot variable for tidb
SetSnapshot set the snapshot variable for tidb