Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Done
-
1.0.1
-
None
-
Windows 11 64Bit
Description
My program crashes after i call driver->connect using sql::Properties
try { |
sql::Driver *driver = sql::mariadb::get_driver_instance();
|
sql::SQLString url("jdbc:mariadb://127.0.0.1:3306/test"); |
sql::Properties properties({{"user", "root"}, {"password", ""}}); |
std::unique_ptr<sql::Connection> conn(driver->connect(url, properties));
|
conn->close();
|
}
|
catch(sql::SQLException &e) { |
std::cerr << "Error Connecting to MariaDB Platform: " << e.what() << std::endl; |
return 1; |
}
|
but it doesn't crash if i use this code
try { |
sql::Driver *driver = sql::mariadb::get_driver_instance();
|
sql::SQLString url("jdbc:mariadb://127.0.0.1:3306/test"); |
std::unique_ptr<sql::Connection> conn(driver->connect(url, "root", "")); |
conn->close();
|
}
|
catch(sql::SQLException &e) { |
std::cerr << "Error Connecting to MariaDB Platform: " << e.what() << std::endl; |
return 1; |
}
|