0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-16 04:47:18 +08:00

review fix

This commit is contained in:
damian-tomczak 2023-09-25 11:05:44 +02:00
parent 4b75ccc7a3
commit ffc5a27992

View File

@ -79,7 +79,18 @@ namespace sqlpp
throw sqlpp::exception{"MySQL: could not init mysql data structure"}; throw sqlpp::exception{"MySQL: could not init mysql data structure"};
} }
#if MYSQL_VERSION_ID < 80034
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"};
}
}
#else
mysql->reconnect = config->auto_reconnect mysql->reconnect = config->auto_reconnect
#endif
connect(native_handle(), *config); connect(native_handle(), *config);
} }