diff --git a/include/sqlpp11/mysql/connection.h b/include/sqlpp11/mysql/connection.h index d597041a..e23e0e76 100644 --- a/include/sqlpp11/mysql/connection.h +++ b/include/sqlpp11/mysql/connection.h @@ -286,11 +286,6 @@ namespace sqlpp return _handle->ping_server(); } - void reconnect() - { - return _handle->reconnect(); - } - const std::shared_ptr& get_config() { return _handle->config; diff --git a/include/sqlpp11/mysql/connection_config.h b/include/sqlpp11/mysql/connection_config.h index 6d382f9a..a518a326 100644 --- a/include/sqlpp11/mysql/connection_config.h +++ b/include/sqlpp11/mysql/connection_config.h @@ -42,15 +42,14 @@ namespace sqlpp std::string unix_socket; unsigned long client_flag{0}; std::string charset{"utf8"}; - bool auto_reconnect{true}; bool debug{false}; unsigned int connect_timeout_seconds{0}; // 0 = do not override MySQL library default bool operator==(const connection_config& other) const { return (other.host == host and other.user == user and other.password == password and - other.database == database and other.charset == charset and other.auto_reconnect == auto_reconnect and - other.debug == debug and other.connect_timeout_seconds == connect_timeout_seconds); + other.database == database and other.charset == charset and other.debug == debug and + other.connect_timeout_seconds == connect_timeout_seconds); } bool operator!=(const connection_config& other) const diff --git a/include/sqlpp11/mysql/detail/connection_handle.h b/include/sqlpp11/mysql/detail/connection_handle.h index 45b4b868..1629d53c 100644 --- a/include/sqlpp11/mysql/detail/connection_handle.h +++ b/include/sqlpp11/mysql/detail/connection_handle.h @@ -79,15 +79,6 @@ namespace sqlpp throw sqlpp::exception{"MySQL: could not init mysql data structure"}; } - if (config->auto_reconnect) - { - my_bool my_true{true}; - if (mysql_options(native_handle(), MYSQL_OPT_RECONNECT, &my_true)) - { - throw sqlpp::exception{"MySQL: could not set option MYSQL_OPT_RECONNECT"}; - } - } - connect(native_handle(), *config); } @@ -114,10 +105,6 @@ namespace sqlpp return mysql_ping(native_handle()) == 0; } - void reconnect() - { - connect(native_handle(), *config); - } }; } // namespace detail } // namespace mysql