Tentative fix for the issue.

There is no ticket yet, but bound to use of binaries built with
differnet VS version.
This commit is contained in:
Lawrin Novitsky
2021-05-05 23:39:23 +02:00
parent 8c39b2431b
commit ed2632f03e
3 changed files with 21 additions and 2 deletions

View File

@ -3225,5 +3225,20 @@ void connection::bugConCpp21()
}
void connection::unknownPropertyConnect()
{
sql::Properties p;
p["user"]= user;
con.reset(driver->connect(url + "?password=" + passwd + "&notExistentPropery=blahblah", p));
ASSERT(con.get() == nullptr);
p["hostName"]= url;
p["password"]= passwd;
p["notExistentPropery"]= "blahblah";
con.reset(driver->connect(p));
ASSERT(con.get() == nullptr);
}
} /* namespace connection */
} /* namespace testsuite */

View File

@ -87,6 +87,7 @@ public:
TEST_CASE(tls_version);
TEST_CASE(cached_sha2_auth);
TEST_CASE(bugConCpp21);
TEST_CASE(unknownPropertyConnect);
}
/**
@ -266,6 +267,9 @@ public:
* URL overrides properties instead of the opposite
*/
void bugConCpp21();
/* Unknown properties cause nullptr for connect() and exception for getConnection() */
void unknownPropertyConnect();
};