mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-05 08:25:16 +00:00
[2342] Corrections based on first part for third section of review.
This commit is contained in:
@@ -475,6 +475,15 @@ MySqlLeaseMgr::openDatabase() {
|
||||
isc_throw(NoDatabaseName, "must specified a name for the database");
|
||||
}
|
||||
|
||||
// Set options for the connection:
|
||||
// - automatic reconnection
|
||||
my_bool auto_reconnect = 1;
|
||||
int result = mysql_options(mysql_, MYSQL_OPT_RECONNECT, &auto_reconnect);
|
||||
if (result != 0) {
|
||||
isc_throw(DbOpenError, "unable to set auto-reconnect option: " <<
|
||||
mysql_error(mysql_));
|
||||
}
|
||||
|
||||
// Open the database. Use defaults for non-specified options.
|
||||
MYSQL* status = mysql_real_connect(mysql_, host, user, password, name,
|
||||
0, NULL, 0);
|
||||
|
Reference in New Issue
Block a user