Change my_bool to bool.

The my_bool type no longer exists, and people may have been using it in their own code since some mysql.h functions have been returning that. The recommended fix is to use bool or int, which will work both in 8.0 and older versions.

https://bugs.mysql.com/bug.php?id=85131
This commit is contained in:
Yatsishin Ilya 2020-08-28 11:59:50 +03:00
parent 35af2f9df9
commit a47ffd191d

View File

@ -116,7 +116,7 @@ void Connection::connect(const char* db,
throw ConnectionFailed(errorMessage(driver.get()), mysql_errno(driver.get()));
/// Enables auto-reconnect.
my_bool reconnect = true;
bool reconnect = true;
if (mysql_options(driver.get(), MYSQL_OPT_RECONNECT, reinterpret_cast<const char *>(&reconnect)))
throw ConnectionFailed(errorMessage(driver.get()), mysql_errno(driver.get()));