Description:
I am opening this bug because the other I created (https://bugs.mysql.com/bug.php?id=106631) was closed as duplicate and the reply said that ODBC Driver Manager doesn't support curly braces in password, which is false.
------
Previous bug description:
The MySQL ODBC Connector is hanging when PWD parameter from connection string is escaped with {} and the PWD value contains }.
For general ODBC drivers, the } character should be escaped by doubling it: ...;PWD={some}}password};...
It seems that MySQL ODBC Connector is not able to handle the parsing and it is hanging.
If the PWD is not escaped with {}, it works well. eg. ...;PWD=some}password;...
The error is happening with the latest community driver and is reproducible using isql -k command.
How to repeat:
Run:
isql -k "DRIVER={/driver/path/libmyodbc8a.so};SERVER={host.docker.internal};PORT=3306;UID={root};PWD={some}}password};DATABASE={mysql};" -v
The isql command will hang. This other command will hang as well (not doubling } in the password):
Run isql -k "DRIVER={/driver/path/libmyodbc8a.so};SERVER={host.docker.internal};PORT=3306;UID={root};PWD={some}password};DATABASE={mysql};" -v
Suggested fix:
Handle correctly the parsing of double } when PWD value is escaped with {}.