fix for support mysql 8.x https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-1.html
This commit is contained in:
parent
af1cc79a3f
commit
60f0751132
1 changed files with 7 additions and 0 deletions
|
@ -172,7 +172,14 @@ namespace pvpgn
|
|||
// mysql->reconnect = 1;
|
||||
#endif
|
||||
#if MYSQL_VERSION_ID >= 50019
|
||||
#if MYSQL_VERSION_ID < 80001
|
||||
my_bool my_true = true;
|
||||
#endif
|
||||
#if MYSQL_VERSION_ID >= 80001
|
||||
// Since 8.0.1 the my_bool type is no longer used in MySQL source code. Any third-party code that used this type to represent C boolean variables should use the bool or int C type instead.
|
||||
// The change from my_bool to bool means that the mysql.h header file now requires a C++ or C99 compiler to compile.
|
||||
bool my_true = true;
|
||||
#endif
|
||||
if (mysql_options(mysql, MYSQL_OPT_RECONNECT, &my_true)){
|
||||
eventlog(eventlog_level_warn, __FUNCTION__, "Failed to turn on MYSQL_OPT_RECONNECT.");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue