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

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

When using the 'SQLConfigDatasource' with parameters like:

DSN=MYDSN;SERVER=127.0.0.1;PORT=8306;OPTION=2051;DATABASE=mybase

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 2021 13:23] MySQL Verification Team
Hello Vincent Locht,

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

Regards,
Ashwini Patil
[9 Mar 2021 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,
Vincent
[12 Oct 2021 12:39] MySQL Verification Team
Thank you for the feedback. Please try with latest version.
[13 Nov 2021 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".