From: Francis Dupont Date: Sat, 2 Feb 2019 09:08:13 +0000 (+0100) Subject: [354-compilation-with-mysql-fails-on-fedora-29] Simplified patch X-Git-Tag: 458-config-backend-support-in-src-lib_base~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=249c7be76ace172590eaa0a3fc2f4505c84d4fe3;p=thirdparty%2Fkea.git [354-compilation-with-mysql-fails-on-fedora-29] Simplified patch --- diff --git a/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc b/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc index 0f44fcfcc5..1152c7e9d3 100644 --- a/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc +++ b/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc @@ -68,17 +68,10 @@ MySqlConfigBackendImpl(const DatabaseConnection::ParameterMap& parameters) // caused issues for some unit tests which were unable to cleanup // the database after the test because of pending transactions. // Use of autocommit will eliminate this problem. -#ifdef HAVE_MYSQL_MY_BOOL my_bool result = mysql_autocommit(conn_.mysql_, 1); - if (result != 0) { + if (result != MLM_FALSE) { isc_throw(DbOperationError, mysql_error(conn_.mysql_)); } -#else - bool result = mysql_autocommit(conn_.mysql_, 1); - if (!result) { - isc_throw(DbOperationError, mysql_error(conn_.mysql_)); - } -#endif } MySqlConfigBackendImpl::~MySqlConfigBackendImpl() {