Bug #98579 Port not changed when updating existing dsn with SQLConfigDatasource
Submitted: 13 Feb 2020 12:01 Modified: 10 Mar 4:14
Reporter: Vincent Locht Email Updates:
Status: Analyzing Impact on me:
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:8.0.18 OS:Microsoft Windows
Assigned to: MySQL Verification Team CPU Architecture:Any
Tags: DSN, existing, port, UPDATE

[13 Feb 2020 12:01] Vincent Locht
Impossible to change port on DSN by software

When using the 'SQLConfigDatasource' with parameters like:


If the 'MYDSN' does not exists, everithing is fine.

If the 'MYDSN' already exists, the port number is not saved, all other parameters are ok.

This was ok with connector 3.51.9
Not ok (tested) with 5.1.8, 5.3.13, 8.0.18 32bits

How to repeat:
In odbcad32, create a user DSN 'MYDSN' with a set of parameters.

Have a call to SQLConfigDataSource to update 'MYDSN' with different options

Check the DSN, all is changed except the port number
[15 Jul 2020 15:59] MySQL Verification Team
Please try version 8.0.21.
[27 Jul 2020 13:23] Vincent Locht
Result for try with 8.0.21 connector:

The port is still not updated when displayed by ODBCad32.
But correct port seems to be used by connexion...

test with a mysql 8.0.18 local server on 8306 port, DSN manualy configured with 9999 port

Software actions: Use of SQLConfigDataSource to set port to 8306 on the DSN
call to db via DSN: The db is found and reply.

Open ODBCad32, the DSN is still on 9999 !!!

If DSN is erased (by soft or manualy) the displayed port is 8306
[9 Mar 13:23] MySQL Verification Team
Hello Vincent Locht,

Thank you for the bug report.
Could you please provide repeatable test case? Thanks.

Ashwini Patil
[9 Mar 13:39] Vincent Locht
There is no test case because this occurs while setting up DSN in windows...
Please read explanations in previous posts.

Thank you,