[ARGUS] argus-clients and mysql8
Andreas Hasenack
andreas at canonical.com
Fri Aug 7 13:02:45 EDT 2020
Hi there,
in Ubuntu we have been carrying a workaround/patch for a mysql8 build
problem. Mysql8 removed the my_bool definition[1]:
"""
Incompatible Change: 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 patch is:
--- a/examples/ramysql/rasql.c
+++ b/examples/ramysql/rasql.c
@@ -57,6 +57,7 @@
#include <rasplit.h>
#include <mysql.h>
+typedef bool my_bool;
char *RaDatabase = NULL;
char **RaTables = NULL;
diff --git a/examples/ramysql/rasqlinsert.c b/examples/ramysql/rasqlinsert.c
index 2772c9c..6c4d37c 100644
--- a/examples/ramysql/rasqlinsert.c
+++ b/examples/ramysql/rasqlinsert.c
@@ -71,6 +71,7 @@ int ArgusTotalSelectSQLStatements = 0;
#include <sys/socket.h>
#include <mysql.h>
+typedef bool my_bool;
char *RaDatabase = NULL;
char **RaTables = NULL;
diff --git a/examples/ramysql/rasqltimeindex.c
b/examples/ramysql/rasqltimeindex.c
index 16cbdfe..8fd81b6 100644
--- a/examples/ramysql/rasqltimeindex.c
+++ b/examples/ramysql/rasqltimeindex.c
@@ -54,6 +54,7 @@
#include <sys/socket.h>
#include <mysql.h>
+typedef bool my_bool;
#include <rasqltimeindex.h>
As I said, it's just a workaround, because it's reintroducing the
removed typedef. Upstream should probably use a proper new type.
Cheers!
1. https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-1.html
More information about the argus
mailing list