Skip to content

Commit

Permalink
Fixed clang linking error
Browse files Browse the repository at this point in the history
  • Loading branch information
rahim-kanji committed Sep 26, 2024
1 parent 610405a commit 4e61120
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions include/query_processor.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef __CLASS_QUERY_PROCESSOR_H
#define __CLASS_QUERY_PROCESSOR_H
#include "proxysql.h"
#include "cpp.h"
#include <type_traits>
#include <set>
#include "proxysql.h"
#include "cpp.h"

// Optimization introduced in 2.0.6
// to avoid a lot of unnecessary copy
Expand Down
14 changes: 7 additions & 7 deletions lib/Query_Processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ using json = nlohmann::json;
#define GET_THREAD_VARIABLE(VARIABLE_NAME) \
({((std::is_same_v<QP_DERIVED,MySQL_Query_Processor>) ? mysql_thread___##VARIABLE_NAME : pgsql_thread___##VARIABLE_NAME) ;})

template
class Query_Processor<MySQL_Query_Processor>;

template
class Query_Processor<PgSQL_Query_Processor>;

extern MySQL_Threads_Handler *GloMTH;
extern PgSQL_Threads_Handler* GloPTH;
extern ProxySQL_Admin *GloAdmin;
Expand Down Expand Up @@ -68,7 +62,7 @@ static bool rules_sort_comp_function (QP_rule_t * a, QP_rule_t * b) {
}

static unsigned long long mem_used_rule(QP_rule_t *qr) {
unsigned long long s = sizeof(QP_rule_t);
unsigned long long s = 0;
if (qr->username)
s+=strlen(qr->username);
if (qr->schemaname)
Expand Down Expand Up @@ -384,6 +378,7 @@ bool Query_Processor<QP_DERIVED>::insert(QP_rule_t *qr, bool lock) {
if (lock)
wrlock();
rules.push_back(qr);
rules_mem_used += sizeof(TypeQueryRule);
rules_mem_used += mem_used_rule(qr);
if (lock)
wrunlock();
Expand Down Expand Up @@ -2409,3 +2404,8 @@ void Query_Processor_Output::get_info_json(json& j) {
j["retries"] = retries;
j["max_lag_ms"] = max_lag_ms;
}
template
class Query_Processor<MySQL_Query_Processor>;

template
class Query_Processor<PgSQL_Query_Processor>;

0 comments on commit 4e61120

Please sign in to comment.