[Asterisk-code-review] cdr_mysql: Fix missing use of 'my_bool' with MySql >= 8.0.1 (asterisk[13])
Friendly Automation
asteriskteam at digium.com
Thu Nov 7 08:30:34 CST 2019
Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/13144 )
Change subject: cdr_mysql: Fix missing use of 'my_bool' with MySql >= 8.0.1
......................................................................
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
---
M addons/cdr_mysql.c
1 file changed, 6 insertions(+), 2 deletions(-)
Approvals:
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
diff --git a/addons/cdr_mysql.c b/addons/cdr_mysql.c
index 7fb0b6e..b613844 100644
--- a/addons/cdr_mysql.c
+++ b/addons/cdr_mysql.c
@@ -180,7 +180,9 @@
{
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 @@
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
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13144
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I66a28d8f0011e33774edee13a6f8efd2302bb920
Gerrit-Change-Number: 13144
Gerrit-PatchSet: 2
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191107/eb46e161/attachment.html>
More information about the asterisk-code-review
mailing list