cdr_mysql: Fix missing use of 'my_bool' with MySql >= 8.0.1

MySql 8.0.1 replaced the "my_bool" type with "bool" so an #if
was added to use "bool" with MYSQL_VERSION_ID >= 80001.

ASTERISK-28604

Change-Id: I66a28d8f0011e33774edee13a6f8efd2302bb920
This commit is contained in:
George Joseph
2019-10-29 07:35:10 -06:00
parent 9c8424a97b
commit 7a85a947af

View File

@@ -180,7 +180,9 @@ static int mysql_log(struct ast_cdr *cdr)
{
struct ast_str *sql1 = ast_str_thread_get(&sql1_buf, 1024), *sql2 = ast_str_thread_get(&sql2_buf, 1024);
int retries = 5;
#if MYSQL_VERSION_ID >= 50013
#if MYSQL_VERSION_ID >= 80001
bool my_bool_true = 1;
#elif MYSQL_VERSION_ID >= 50013
my_bool my_bool_true = 1;
#endif
@@ -478,7 +480,9 @@ static int my_load_module(int reload)
MYSQL_ROW row;
MYSQL_RES *result;
char sqldesc[128];
#if MYSQL_VERSION_ID >= 50013
#if MYSQL_VERSION_ID >= 80001
bool my_bool_true = 1;
#elif MYSQL_VERSION_ID >= 50013
my_bool my_bool_true = 1;
#endif