You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: repair_vars.go
    path of file: ./repos/tidb/pkg/util/domainutil
    
    the code of the file until where you have to start completion: // Copyright 2019 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in co
    
func (r *repairInfo) CheckAndFetchRepairedTable(di *model.DBInfo, tbl *model.TableInfo) bool {
	r.Lock()
	defer r.Unlock()
	if !r.repairMode {
		return false
	}
	isRepair := false
	for _, tn := range r.repairTableList {
		// Use dbName and tableName to specify a table.
		if strings.ToLower(tn) == di.Name.L+"."+tbl.Name.L {
			isRepair = true
			break
		}
	}
	if isRepair {
		// Record the repaired table in Map.
		if repairedDB, ok := r.repairDBInfoMap[di.ID]; ok {
			repairedDB.Tables = append(repairedDB.Tables, tbl)
		} else {
			// Shallow copy the DBInfo.
			repairedDB := di.Copy()
			// Clean the tables and set repaired table.
			repairedDB.Tables = []*model.TableInfo{tbl}
			r.repairDBInfoMap[di.ID] = repairedDB
		}
		return true
	}
	return false
}