mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-12 21:09:00 +00:00
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:
@@ -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);
|
struct ast_str *sql1 = ast_str_thread_get(&sql1_buf, 1024), *sql2 = ast_str_thread_get(&sql2_buf, 1024);
|
||||||
int retries = 5;
|
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;
|
my_bool my_bool_true = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -478,7 +480,9 @@ static int my_load_module(int reload)
|
|||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
MYSQL_RES *result;
|
MYSQL_RES *result;
|
||||||
char sqldesc[128];
|
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;
|
my_bool my_bool_true = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user