Bug #98579 Port not changed when updating existing dsn with SQLConfigDatasource
Submitted: 13 Feb 12:01 Modified: 27 Jul 13:23
Reporter: Vincent Locht Email Updates:
Status: Open Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:8.0.18 OS:Microsoft Windows
Assigned to: CPU Architecture:Any
Tags: DSN, existing, port, UPDATE

[13 Feb 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 15:59] MySQL Verification Team
Please try version 8.0.21.
[27 Jul 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