--- mysql-workbench-community-6.2.3-src/CMakeLists.txt +++ mysql-workbench-community-6.2.3-src/CMakeLists.txt @@ -85,7 +85,7 @@ find_package(TinyXML REQUIRED) find_package(GDAL REQUIRED) if (MYSQLCPPCONN_VERSION_1_1_4) - add_definition(-DMYSQLCPPCONN_VERSION_1_1_4) + add_definitions(-DMYSQLCPPCONN_VERSION_1_1_4) endif () if (UNIX) --- mysql-workbench-community-6.2.3-src/library/cdbc/src/driver_manager.cpp +++ mysql-workbench-community-6.2.3-src/library/cdbc/src/driver_manager.cpp @@ -20,6 +20,9 @@ #include "driver_manager.h" #include "mysql_driver.h" +#if defined(MYSQLCPPCONN_VERSION_1_1_4) +#include "cppconn/version_info.h" +#endif #include "cppconn/driver.h" #include "cppconn/statement.h" #include "cppconn/exception.h" @@ -402,7 +405,11 @@ retry: ConnectOptionsMap::iterator prop_iter= properties.find(prop_name); if (properties.end() != prop_iter) { +#if defined(MYCPPCONN_DM_PATCH_VERSION) && (MYCPPCONN_DM_MAJOR_VERSION > 1 || MYCPPCONN_DM_MINOR_VERSION > 1 || MYCPPCONN_DM_PATCH_VERSION >= 5) + sql::SQLString &val= *prop_iter->second.get(); +#else sql::SQLString &val= boost::get(prop_iter->second); +#endif if (val->empty()) properties.erase(prop_iter); }