[CONCPP-21] CONCPP connect URL overrides properties instead of the opposite. Created: 2020-07-01  Updated: 2020-08-03  Resolved: 2020-08-03

Status: Closed
Project: MariaDB Connector/C++
Component/s: General
Affects Version/s: N/A
Fix Version/s: N/A

Type: Bug Priority: Trivial
Reporter: Anders Karlsson Assignee: Lawrin Novitsky
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux CentOS 7.7



 Description   

In the Connection::connect(SQLString &url, Properties &props) method, it seems that a property in the url will override a property in props, which I think is non-standard. In the following code will attempt to connect with the username "unknown" instead of "myuser"

   sql::Properties p;
   sql::Driver* driver = sql::mariadb::get_driver_instance();
   sql::Connection *conn;
 
   p["user"] = "myuser";
   conn = driver->connect("tcp://host?user=unknown", p);



 Comments   
Comment by Anders Karlsson [ 2020-07-01 ]

My error. I had an issue with my test case, this works as expected.

Comment by Lawrin Novitsky [ 2020-08-03 ]

Well, I missed the comment, but I've added the testcase, and it works

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