[ODBC-387] Connection string superseded by default settings Created: 2023-03-24  Updated: 2023-03-24  Resolved: 2023-03-24

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: General
Affects Version/s: 3.1.17
Fix Version/s: 3.2.0, 3.1.18

Type: Bug Priority: Major
Reporter: David Gausmann Assignee: Lawrin Novitsky
Resolution: Done Votes: 0
Labels: None
Environment:

Windows Server


Attachments: Zip Archive maodbc.zip    

 Description   

I installed now my application, which connects via the ODBC driver with named pipe to mariadb, to the customer's server.
The connection string looks like:

Driver={MariaDB ODBC 3.1 Driver};NAMEDPIPE=1;NO_PROMPT=1;SOCKET=myNamedPipe;USER=root;PASSWORD=myPassword

There was no connection possible. The response was always that the username or password is wrong. But both were correct.
The MariaDB server is installed to listen only on named pipe (skip-networking).

After some attempts the customer told me that he has an additionally installed MySQL server running on the same machine (installed as service via xampp; listening only on port 3306).
We tried the password of the MySQL server listening on 3306 and the login succeeded. Our named pipe connection string was connecting to the MySQL server which doesn't use named pipes. Instead the connection was done via port 3306.

I've tried much combinations with the connection string. On the customer's server the following settings were completely ignored:

  • NAMEDPIPE=1
  • TCPIP=0
  • OPTION=8192
    however the option "PORT" was working. If we set it to something different, then no connection was possible (neither via named pipe nor to the MySQL server listening on port 3306).

This is a bug from my point of view, that settings from my connection string are ignored. I explicitely said via NAMEDPIPE=1 that no networking should be used, but it is ignored. We installed the same MariaDB driver like on my computer (same MSI file). On my computer everything works fine.
So either the ODBC driver doesn't recognize the settings NAMEDPIPE/TCPIP/OPTIONS on the customer's server for some reason or someone else has superseded my connection string.

I have absolutely no idea why this happens.
However as a workaround we enabled networking on the MariaDB server (now listening on a custom port) and we added ";PORT=portno" to the named pipe connection string and now it works.

What could this be? Is there something like a TNSNAMES.ORA on Oracle systems which takes precedence over connection strings?



 Comments   
Comment by David Gausmann [ 2023-03-24 ]

One more information: PHP and MySQL Workbench are able to connect to MariaDB via Named Pipe.

Comment by Lawrin Novitsky [ 2023-03-24 ]

Thank you for your report. I agree that is a bug. I think this has been sorted out in the scope of your ODBC-385 ticket, but I double-check that, though. Or I can attach here the archive with driver library for you to try

Comment by David Gausmann [ 2023-03-24 ]

If you attach an archive with the DLLs I need to replace on the customer's server, then I can test it.

Comment by Lawrin Novitsky [ 2023-03-24 ]

Well, not ODBC-385, but ODBC-384. The testcase seemingly proves, that it has been sorted out, and I remember I made sure that connection is made via named pipe while working on it.

Comment by Lawrin Novitsky [ 2023-03-24 ]

Not on the server, but on the machine where you or he/she connecting from. If you want to try, please tell me 32b or 64b you need

Comment by David Gausmann [ 2023-03-24 ]

In this case client and server are the same machine. I need 64 bit.

Comment by Lawrin Novitsky [ 2023-03-24 ]

Well, I've attached the debug dll built from current 3.1 repo state.
But I have already verified, that it has been fixed by the ODBC-384 patch

Generated at Thu Feb 08 03:28:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.