From 54148c5f733c23ee3fcae59a7af7f3ea93dfe4eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Tue, 22 Mar 2022 19:20:18 +0100 Subject: [PATCH] Fix compilation of 'setparser_test.cpp' --- test/tap/tests/Makefile | 2 +- test/tap/tests/setparser_test.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/test/tap/tests/Makefile b/test/tap/tests/Makefile index 0da22825f..a7b4d2523 100644 --- a/test/tap/tests/Makefile +++ b/test/tap/tests/Makefile @@ -142,7 +142,7 @@ create_connection_annotation: test_connection_annotation-t.cpp g++ -DTEST_AURORA -DDEBUG test_connection_annotation-t.cpp $(INCLUDEDIRS) $(LDIRS) $(OPT) -std=c++11 $(OBJ) $(MYLIBS) -ltap -ldl $(STATIC_LIBS) -o test_connection_annotation-t -DGITVERSION=\"$(GIT_VERSION)\" setparser_test: setparser_test.cpp $(TAP_LIBDIR)/libtap.a $(RE2_PATH)/util/test.cc $(LDIR)/set_parser.cpp $(LIBPROXYSQLAR) - g++ -DDEBUG setparser_test.cpp $(RE2_PATH)/util/test.cc ../../../src/obj/proxysql_global.o $(INCLUDEDIRS) $(LDIRS) $(OPT) -std=c++11 -lproxysql $(MYLIBS) -ltap -ldl -lpthread $(WASAN) -o setparser_test -DGITVERSION=\"$(GIT_VERSION)\" + g++ -DDEBUG setparser_test.cpp $(RE2_PATH)/util/test.cc $(INCLUDEDIRS) $(LDIRS) $(OPT) -std=c++11 -lproxysql $(MYLIBS) -ltap -ldl -lpthread $(WASAN) -o setparser_test -DGITVERSION=\"$(GIT_VERSION)\" reg_test_3504-change_user_libmariadb_helper: reg_test_3504-change_user_helper.cpp $(CXX) -DDEBUG reg_test_3504-change_user_helper.cpp $(INCLUDEDIRS) $(LDIRS) $(OPT) $(MYLIBS) -lpthread -ldl -std=c++11 -ltap $(STATIC_LIBS) -o reg_test_3504-change_user_libmariadb_helper -DGITVERSION=\"$(GIT_VERSION)\" diff --git a/test/tap/tests/setparser_test.cpp b/test/tap/tests/setparser_test.cpp index 627d01fa8..d0462f885 100644 --- a/test/tap/tests/setparser_test.cpp +++ b/test/tap/tests/setparser_test.cpp @@ -6,6 +6,11 @@ * This file is an extension of ../../set_parser_test/setparsertest.cpp */ +// NOTE: Avoids the definition of 'global_variables glovars' in 'proxysql_structs.h' +#define PROXYSQL_EXTERN +// NOTE: Avoids definition of 'proxy_sqlite3_*' functions as 'extern' +#define MAIN_PROXY_SQLITE3 + #include "re2/re2.h" #include "re2/regexp.h" #include "util/test.h" @@ -30,6 +35,7 @@ */ #include "openssl/ssl.h" #include "proxysql_structs.h" +#include "sqlite3db.h" #include "MySQL_LDAP_Authentication.hpp" MySQL_LDAP_Authentication *GloMyLdapAuth = nullptr; // ******************************************************************************************