Closed srdan-bozovic-msft closed 2 years ago
@kardianos could you help review? Thx!
@srdan-bozovic-msft This seems wrong to me. msdsn.Config
contains separate Host
and Instance
fields. If you manually populate that struct, does it work? If so, then any change must happen in the msdsn package.
What configuration DSN format do you use? If you are using the URL based DSN format, does it work? For instance, if you use: sqlserver://<user>:<pass>@<host>[:port]/<instance?database=<db-name>
will it work?
Parsing a host from instance within the tds.go isn't correct.
oh and there should be a test included.
Thx for the guidance @kardianos.
The problem I was trying to solve has been exposed in routing scenario, where both Host and Instance were assigned to host.
I made another commit to address this.
Is this proper way to fix the issue?
@srdan-bozovic-msft So if I understand correctly, the DNS entry for the host is "blah\Foo"? I need a concrete example to work from first. Please fill in the following details of a hypothetical example:
msdsn.Config.Host
msdsn.Config.Instance
Once I have these four values, I might begin to understand.
@kardianos Driver receives from the server routing information code pointer "audit-test-server.database.windows.net\f7716e6f65ef"
Currently all of that is copied to a Host while it should be split btw Host and Instance
msdsn.Config.Host = "audit-test-server.database.windows.net" msdsn.Config.Instance = "f7716e6f65ef"
When is the next release slated to come out? i am excited to see this patch in the version pulled from go get -u
For Microsoft SQL Host could take form [server]\[instance]. Without this fix LookupIP will fail in this scenario.