From 4b75ccc7a3e3716d76a6ad180045cdbd84fa3b8a Mon Sep 17 00:00:00 2001 From: damian-tomczak Date: Thu, 21 Sep 2023 15:18:25 +0200 Subject: [PATCH] reconnect option is now deprecated --- include/sqlpp11/mysql/detail/connection_handle.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/include/sqlpp11/mysql/detail/connection_handle.h b/include/sqlpp11/mysql/detail/connection_handle.h index 45b4b8681..f7f34c00e 100644 --- a/include/sqlpp11/mysql/detail/connection_handle.h +++ b/include/sqlpp11/mysql/detail/connection_handle.h @@ -79,14 +79,7 @@ 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"}; - } - } + mysql->reconnect = config->auto_reconnect connect(native_handle(), *config); }