Update mssql.go
query will run on the database passed as the parameter instead of the master database
This commit is contained in:
parent
4ea7f8afa6
commit
f930705ed2
|
@ -128,7 +128,7 @@ func NewMSSQLBackend(conf map[string]string, logger log.Logger) (physical.Backen
|
|||
}
|
||||
|
||||
var num int
|
||||
err = db.QueryRow("SELECT 1 FROM sys.schemas WHERE name = '" + schema + "'").Scan(&num)
|
||||
err = db.QueryRow("SELECT 1 FROM " + database + ".sys.schemas WHERE name = '" + schema + "'").Scan(&num)
|
||||
|
||||
switch {
|
||||
case err == sql.ErrNoRows:
|
||||
|
|
Loading…
Reference in New Issue