Minor changes in TAP Makefile

Disabling jemalloc from TAP tests it saves around 5MB per binary

Also renamed proxysql_find_charset_collate() in proxysqlTap_find_charset_collate()
pull/4275/head
René Cannaò 3 years ago
parent c71cf9274f
commit 337f04ef55

@ -589,7 +589,7 @@ int wait_for_replication(
return result;
}
MARIADB_CHARSET_INFO * proxysql_find_charset_collate(const char *collatename) {
MARIADB_CHARSET_INFO * proxysqlTap_find_charset_collate(const char *collatename) {
MARIADB_CHARSET_INFO *c = (MARIADB_CHARSET_INFO *)mariadb_compiled_charsets;
do {
if (!strcasecmp(c->name, collatename)) {

@ -179,9 +179,9 @@ int wait_for_replication(
* 'MySQL_Variables' is not a easy task due to its interdependeces with other ProxySQL modules.
*/
#ifdef LIBMYSQL_HELPER
MY_CHARSET_INFO * proxysql_find_charset_collate(const char *collatename);
MY_CHARSET_INFO * proxysqlTap_find_charset_collate(const char *collatename);
#else
MARIADB_CHARSET_INFO * proxysql_find_charset_collate(const char *collatename);
MARIADB_CHARSET_INFO * proxysqlTap_find_charset_collate(const char *collatename);
#endif
/**
* @brief Creates the new supplied user in ProxySQL with the provided

@ -90,7 +90,7 @@ ifeq ($(UNAME_S),Linux)
LDIRS+= -L$(COREDUMPER_LDIR)
endif
MYLIBS=-Wl,--export-dynamic -Wl,-Bstatic -lconfig -lproxysql -ldaemon -ljemalloc -lconfig++ -lre2 -lpcrecpp -lpcre -lmariadbclient -lhttpserver -lmicrohttpd -linjection -lcurl -lssl -lcrypto -lev -Wl,-Bdynamic -lgnutls -lpthread -lm -lz -lrt $(EXTRALINK) -lprometheus-cpp-pull -lprometheus-cpp-core -luuid
MYLIBS=-Wl,--export-dynamic -Wl,-Bstatic -lconfig -lproxysql -ldaemon -lconfig++ -lre2 -lpcrecpp -lpcre -ltap -lmariadbclient -lhttpserver -lmicrohttpd -linjection -lcurl -lssl -lcrypto -lev -lprometheus-cpp-pull -lprometheus-cpp-core -luuid -Wl,-Bdynamic -lgnutls -lpthread -lm -lz -lrt $(EXTRALINK)
STATIC_LIBS= $(SSL_LDIR)/libssl.a $(SSL_LDIR)/libcrypto.a $(CITYHASH_LDIR)/libcityhash.a
LIBCOREDUMPERAR=
@ -148,7 +148,8 @@ py-%:
chmod +x $(patsubst py-%.py,%,$@)
%-t: %-t.cpp $(TAP_LIBDIR)/libtap.a
$(CXX) $^ $(INCLUDEDIRS) $(LDIRS) $(OPT) $(MYLIBS) -lpthread -ldl -std=c++11 -ltap $(STATIC_LIBS) -o $@
$(CXX) -std=c++11 $< $(INCLUDEDIRS) $(LDIRS) $(OPT) $(MYLIBS) -lpthread -ldl $(STATIC_LIBS) -o $@
# $(CXX) -std=c++11 $< $(INCLUDEDIRS) $(LDIRS) $(OPT) $(MYLIBS) -lpthread -ldl $(STATIC_LIBS) $(TAP_LIBDIR)/libtap.a -o $@
galera_1_timeout_count: galera_1_timeout_count.cpp $(TAP_LIBDIR)/libtap.a
g++ -DTEST_GALERA -DDEBUG galera_1_timeout_count.cpp ../tap/SQLite3_Server.cpp $(INCLUDEDIRS) $(LDIRS) $(OPT) -std=c++11 $(OBJ) -lproxysql $(MYLIBS) -ltap -ldl $(STATIC_LIBS) -o galera_1_timeout_count -DGITVERSION=\"$(GIT_VERSION)\"

@ -965,7 +965,7 @@ int test_mysql_server_variables(MYSQL*, const CommandLine& cl, const std::vector
MYSQL* mysql = mysql_init(NULL);
// Use a known default charset for the connection
MARIADB_CHARSET_INFO* latin2_charset = proxysql_find_charset_collate("latin2_general_ci");
MARIADB_CHARSET_INFO* latin2_charset = proxysqlTap_find_charset_collate("latin2_general_ci");
mysql->charset = latin2_charset;
if (!mysql_real_connect(mysql, cl.host, "root", "root", NULL, 13306, NULL, 0)) {
@ -1060,7 +1060,7 @@ int test_mysql_server_variables(MYSQL*, const CommandLine& cl, const std::vector
std::string username = std::get<0>(user_configs[1]);
std::string password = std::get<1>(user_configs[1]);
MARIADB_CHARSET_INFO* charset = proxysql_find_charset_collate("latin2_general_ci");
MARIADB_CHARSET_INFO* charset = proxysqlTap_find_charset_collate("latin2_general_ci");
mysql->charset = charset;
int err_code = mysql_change_user(mysql, username.c_str(), password.c_str(), NULL);
@ -1127,7 +1127,7 @@ int main(int argc, char** argv) {
MYSQL* proxysql = mysql_init(NULL);
// Use a known default charset for the connection
MARIADB_CHARSET_INFO* latin2_charset = proxysql_find_charset_collate("latin2_general_ci");
MARIADB_CHARSET_INFO* latin2_charset = proxysqlTap_find_charset_collate("latin2_general_ci");
proxysql->charset = latin2_charset;
if (

@ -33,7 +33,7 @@ int create_proxysql_connections(const CommandLine& cl, const std::vector<std::st
for (const auto& collation : collations) {
MYSQL* mysql = mysql_init(NULL);
const MARIADB_CHARSET_INFO* charset = proxysql_find_charset_collate(collation.c_str());
const MARIADB_CHARSET_INFO* charset = proxysqlTap_find_charset_collate(collation.c_str());
mysql->charset = charset;
if (!mysql_real_connect(mysql, cl.host, cl.username, cl.password, NULL, cl.port, NULL, 0)) {
@ -57,7 +57,7 @@ int run_change_user_on_all(const CommandLine& cl, const std::vector<std::string>
for (int i = 0; i < conns.size(); i++) {
MYSQL* mysql = conns[i];
MYSQL_QUERY(mysql, "START TRANSACTION");
const MARIADB_CHARSET_INFO* charset = proxysql_find_charset_collate(collations[i].c_str());
const MARIADB_CHARSET_INFO* charset = proxysqlTap_find_charset_collate(collations[i].c_str());
mysql->charset = charset;
if (mysql_change_user(mysql,cl.username, cl.password, NULL)) {
fprintf(stderr, "File %s, line %d, Error: %s\n", __FILE__, __LINE__, mysql_error(mysql));

Loading…
Cancel
Save