ODBC 8.1 driver with `localhost` causes long delays
- Dominant language
- Go
- Stars
- 24.4k
- Forks
- 873
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 108
Description
Dolt can experience very long latency with oracle ODBC driver 8.1 and a `localhost` connection. This seems to be the result of the driver attempting to talk to the IPv6 localhost address `::1`. The symptom is multiple `SYN / [RST, ACK]` responses over the wire:

Together these failed IPv6 packet attempts take several full seconds to get past.
There are two workarounds possible:
1. Use `127.0.0.1` instead of localhost in the connection string, which forces IPv4
In your connection string, change this:
`DRIVER={MySQL ODBC 8.1 ANSI Driver};SERVER=localhost;OPTION=3;PORT=3306;DATABASE=mydb;USER=root;PWD=;PERSIST SECURITY INFO=True;`
To this:
`DRIVER={MySQL ODBC 8.1 ANSI Driver};SERVER=127.0.0.1;OPTION=3;PORT=3306;DATABASE=mydb;USER=root;PWD=;PERSIST SECURITY INFO=True;`
2. Use ODBC driver version 8.0, listed here as 8.0.32:
https://downloads.mysql.com/archives/c-odbc/
It's possible to install both 8.0 and 8.1 side by side. Specify which version to use in your connection string as above.
Either workaround will restore latency to normal levels.
For additional context, see:
https://github.com/dolthub/dolt/issues/6706
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.