[Asterisk-code-review] cdr_mysql: Fix missing use of 'my_bool' with MySql >= 8.0.1 (asterisk[16])

George Joseph asteriskteam at digium.com
Thu Nov 7 09:40:31 CST 2019


George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/13145 )

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; Approved for Submit



diff --git a/addons/cdr_mysql.c b/addons/cdr_mysql.c
index 3f67dd5..9336f3f 100644
--- a/addons/cdr_mysql.c
+++ b/addons/cdr_mysql.c
@@ -173,7 +173,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
 
@@ -468,7 +470,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/+/13145
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I66a28d8f0011e33774edee13a6f8efd2302bb920
Gerrit-Change-Number: 13145
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/4560c140/attachment.html>


More information about the asterisk-code-review mailing list