Query_Processor is no longer a plugin

pull/277/head
René Cannaò 11 years ago
parent 59507675e5
commit 63d2bea7dd

@ -83,46 +83,104 @@ struct _Query_Processor_output_t {
typedef struct _Query_Processor_rule_t QP_rule_t;
typedef struct _Query_Processor_output_t QP_out_t;
static char *commands_counters_desc[MYSQL_COM_QUERY___NONE];
class Command_Counter {
private:
int cmd_idx;
int _add_idx(unsigned long long t) {
if (t<=100) return 0;
if (t<=500) return 1;
if (t<=1000) return 2;
if (t<=5000) return 3;
if (t<=10000) return 4;
if (t<=50000) return 5;
if (t<=100000) return 6;
if (t<=500000) return 7;
if (t<=1000000) return 8;
if (t<=5000000) return 9;
if (t<=10000000) return 10;
return 11;
}
public:
unsigned long long total_time;
unsigned long long counters[13];
Command_Counter(int a) {
total_time=0;
cmd_idx=a;
total_time=0;
for (int i=0; i<13; i++) {
counters[i]=0;
}
}
unsigned long long add_time(unsigned long long t) {
total_time+=t;
counters[0]++;
int i=_add_idx(t);
counters[i+1]++;
return total_time;
}
char **get_row() {
char **pta=(char **)malloc(sizeof(char *)*15);
pta[0]=commands_counters_desc[cmd_idx];
itostr(pta[1],total_time);
for (int i=0;i<13;i++) itostr(pta[i+2], counters[i]);
return pta;
}
void free_row(char **pta) {
for (int i=1;i<15;i++) free(pta[i]);
free(pta);
}
};
class Query_Processor {
private:
enum MYSQL_COM_QUERY_command __query_parser_command_type(void *args);
protected:
rwlock_t rwlock;
std::vector<QP_rule_t *> rules;
Command_Counter * commands_counters[MYSQL_COM_QUERY___NONE];
volatile unsigned int version;
public:
Query_Processor() {};
virtual ~Query_Processor() {};
virtual const char *version() {return NULL;};
virtual void print_version() {};
virtual void reset_all(bool lock=true) {};
virtual void wrlock() {}; // explicit write lock, to be used in multi-isert
virtual void wrunlock() {}; // explicit write unlock
virtual bool insert(QP_rule_t *qr, bool lock=true) {return false;}; // insert a new rule. Uses a generic void pointer to a structure that may vary depending from the Query Processor
Query_Processor();
~Query_Processor();
//const char *version();
void print_version();
void reset_all(bool lock=true);
void wrlock(); // explicit write lock, to be used in multi-isert
void wrunlock(); // explicit write unlock
bool insert(QP_rule_t *qr, bool lock=true); // insert a new rule. Uses a generic void pointer to a structure that may vary depending from the Query Processor
// virtual bool insert_locked(QP_rule_t *qr) {return false;}; // call this instead of insert() in case lock was already acquired via wrlock()
virtual QP_rule_t * new_query_rule(int rule_id, bool active, char *username, char *schemaname, int flagIN, char *match_pattern, bool negate_match_pattern, int flagOUT, char *replace_pattern, int destination_hostgroup, int cache_ttl, bool apply) {return NULL;}; // to use a generic query rule struct, this is generated by this function and returned as generic void pointer
virtual void delete_query_rule(QP_rule_t *qr) {}; // destructor
virtual bool remove(int rule_id, bool lock=true) {return false;};
QP_rule_t * new_query_rule(int rule_id, bool active, char *username, char *schemaname, int flagIN, char *match_pattern, bool negate_match_pattern, int flagOUT, char *replace_pattern, int destination_hostgroup, int cache_ttl, bool apply); // to use a generic query rule struct, this is generated by this function and returned as generic void pointer
void delete_query_rule(QP_rule_t *qr); // destructor
//virtual bool remove(int rule_id, bool lock=true) {return false;}; // FIXME: not implemented yet, should be implemented at all ?
// virtual bool remove_locked(int rule_id) {return false;}; // call this instead of remove() in case lock was already acquired via wrlock()
virtual QP_out_t * process_mysql_query(MySQL_Session *sess, void *ptr, unsigned int size, bool delete_original) {return NULL;};
virtual void delete_QP_out(QP_out_t *o) {};
QP_out_t * process_mysql_query(MySQL_Session *sess, void *ptr, unsigned int size, bool delete_original);
void delete_QP_out(QP_out_t *o);
virtual void sort(bool lock=true) {};
void sort(bool lock=true);
virtual void init_thread() {};
virtual void end_thread() {};
virtual void commit() {}; // this applies all the changes in memory
virtual SQLite3_result * get_current_query_rules() {return NULL;};
virtual SQLite3_result * get_stats_query_rules() {return NULL;};
void init_thread();
void end_thread();
void commit(); // this applies all the changes in memory
SQLite3_result * get_current_query_rules();
SQLite3_result * get_stats_query_rules();
virtual void update_query_processor_stats() {};
void update_query_processor_stats();
virtual void * query_parser_init(char *query, int query_length, int flags) {return NULL;};
virtual enum MYSQL_COM_QUERY_command query_parser_command_type(void *args) {return MYSQL_COM_QUERY_UNKNOWN;}
virtual char * query_parser_first_comment(void *args) { return NULL; }
virtual void query_parser_free(void *args) {};
void * query_parser_init(char *query, int query_length, int flags);
enum MYSQL_COM_QUERY_command query_parser_command_type(void *args);
char * query_parser_first_comment(void *args);
void query_parser_free(void *args);
virtual unsigned long long query_parser_update_counters(enum MYSQL_COM_QUERY_command c, unsigned long long t) { return 0; }
unsigned long long query_parser_update_counters(enum MYSQL_COM_QUERY_command c, unsigned long long t);
virtual SQLite3_result * get_stats_commands_counters() {return NULL;};
SQLite3_result * get_stats_commands_counters();
};

@ -60,7 +60,7 @@ OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
#_OBJ_CPP = ProxySQL_GloVars.oo network.oo debug.oo proxysql_global.oo configfile.oo Standard_Query_Cache.oo SpookyV2.oo Standard_MySQL_Thread.oo Standard_MySQL_Authentication.oo gen_utils.oo mysql_connection_pool.oo simple_kv.oo advanced_kv.oo sqlite3db.oo mysql_connection.oo global_variables.oo proxysql_mem.oo MySQL_Protocol.oo mysql_data_stream.oo mysql_session.oo mysql_backend.oo
#_OBJ_CPP = ProxySQL_GloVars.oo network.oo debug.oo proxysql_global.oo configfile.oo Standard_Query_Cache.oo SpookyV2.oo Standard_MySQL_Authentication.oo gen_utils.oo mysql_connection_pool.oo simple_kv.oo advanced_kv.oo sqlite3db.oo mysql_connection.oo global_variables.oo proxysql_mem.oo MySQL_Protocol.oo mysql_data_stream.oo mysql_session.oo mysql_backend.oo
#_OBJ_CPP = ProxySQL_GloVars.oo network.oo debug.oo configfile.oo Standard_Query_Cache.oo SpookyV2.oo Standard_MySQL_Authentication.oo gen_utils.oo mysql_connection_pool.oo simple_kv.oo advanced_kv.oo sqlite3db.oo mysql_connection.oo global_variables.oo proxysql_mem.oo MySQL_Protocol.oo mysql_data_stream.oo MySQL_Session.oo mysql_backend.oo MySQL_HostGroups_Manager.oo
_OBJ_CPP = ProxySQL_GloVars.oo network.oo debug.oo configfile.oo Standard_Query_Cache.oo SpookyV2.oo MySQL_Authentication.oo gen_utils.oo simple_kv.oo sqlite3db.oo global_variables.oo proxysql_mem.oo mysql_connection.oo MySQL_HostGroups_Manager.oo mysql_data_stream.oo MySQL_Thread.oo MySQL_Session.oo MySQL_Protocol.oo mysql_backend.oo
_OBJ_CPP = ProxySQL_GloVars.oo network.oo debug.oo configfile.oo Standard_Query_Cache.oo SpookyV2.oo MySQL_Authentication.oo gen_utils.oo simple_kv.oo sqlite3db.oo global_variables.oo proxysql_mem.oo mysql_connection.oo MySQL_HostGroups_Manager.oo mysql_data_stream.oo MySQL_Thread.oo MySQL_Session.oo MySQL_Protocol.oo mysql_backend.oo Query_Processor.oo
OBJ_CPP = $(patsubst %,$(ODIR)/%,$(_OBJ_CPP))
#_SHARED_OBJ= Standard_Query_Cache.ko Standard_MySQL_Thread.ko
@ -75,21 +75,21 @@ Standard_ProxySQL_Admin.so: Standard_ProxySQL_Admin.cpp libproxysql.a
#Standard_ProxySQL_Admin.so: Standard_ProxySQL_Admin.ko Standard_MySQL_Thread.ko libproxysql.a
# $(CPP) -shared -fPIC -o $@ $(CPPFLAGS) Standard_ProxySQL_Admin.ko Standard_MySQL_Thread.ko libproxysql.a -lcrypto $(LIBS)
Standard_Query_Processor.so: Standard_Query_Processor.ko libproxysql.a
$(CPP) -shared -fPIC -o $@ $(CPPFLAGS) Standard_Query_Processor.ko libproxysql.a -lcrypto $(LIBS) -linjection
#Standard_Query_Processor.so: Standard_Query_Processor.ko libproxysql.a
# $(CPP) -shared -fPIC -o $@ $(CPPFLAGS) Standard_Query_Processor.ko libproxysql.a -lcrypto $(LIBS) -linjection
#Standard_MySQL_Authentication.so: Standard_MySQL_Authentication.ko libproxysql.a
# $(CPP) -shared -fPIC -o $@ $(CPPFLAGS) Standard_MySQL_Authentication.ko libproxysql.a -lcrypto $(LIBS)
Standard_Query_Cache.so: Standard_Query_Cache.ko libproxysql.a
$(CPP) -shared -fPIC -o $@ $(CPPFLAGS) Standard_Query_Cache.ko libproxysql.a -lcrypto $(LIBS)
$(CPP) -shared -fPIC -o $@ $(CPPFLAGS) Standard_Query_Cache.ko libproxysql.a -lcrypto -linjection $(LIBS)
# $(CC) -shared -fPIC -o $@ $(CPPFLAGS) $(ODIR)/Standard_Query_Cache.oo $(ODIR)/SpookyV2.oo $(ODIR)/gen_utils.oo
#Standard_MySQL_Thread.so: Standard_MySQL_Thread.ko libproxysql.a
# $(CPP) -shared -fPIC -o $@ $(CPPFLAGS) Standard_MySQL_Thread.ko libproxysql.a -lcrypto $(LIBS)
# $(CC) -shared -fPIC -o $@ $(CPPFLAGS) $(ODIR)/Standard_MySQL_Thread.oo $(ODIR)/mysql_session.oo
LOADABLE_LIB = Standard_ProxySQL_Admin.so Standard_Query_Processor.so Standard_Query_Cache.so
LOADABLE_LIB = Standard_ProxySQL_Admin.so Standard_Query_Cache.so
DYN_LIB: $(LOADABLE_LIB)
.PHONY: DYN_LIB
@ -107,8 +107,8 @@ $(ODIR)/%.oo: %.cpp
# g++ -c -o mysql_data_stream.oo mysql_data_stream.cpp $(CFLAGS) -Wall
libproxysql.a: $(ODIR) $(OBJ) $(OBJ_CPP)
ar rcs $@ $(OBJ) $(OBJ_CPP)
libproxysql.a: $(ODIR) $(OBJ) $(OBJ_CPP) $(INJECTION_PATH)/libinjection.a $(RE2_PATH)/obj/libre2.a
ar rcs $@ $(OBJ) $(OBJ_CPP) $(INJECTION_PATH)/libinjection.a $(RE2_PATH)/obj/libre2.a
libproxysql.so: $(ODIR) $(OBJ) $(OBJ_CPP)
$(CPP) -shared -fPIC -o $@ $(OBJ) $(OBJ_CPP)

@ -68,7 +68,7 @@ struct __SQP_query_parser_t {
typedef struct __SQP_query_parser_t SQP_par_t;
static char *commands_counters_desc[MYSQL_COM_QUERY___NONE];
//static char *commands_counters_desc[MYSQL_COM_QUERY___NONE];
@ -122,7 +122,7 @@ static void __reset_rules(std::vector<QP_rule_t *> * qrs) {
qrs->clear();
}
/*
class Command_Counter {
private:
int cmd_idx;
@ -170,14 +170,14 @@ class Command_Counter {
free(pta);
}
};
*/
// per thread variables
__thread unsigned int _thr_SQP_version;
__thread std::vector<QP_rule_t *> * _thr_SQP_rules;
//__thread unsigned int _thr_commands_counters[MYSQL_COM_QUERY___NONE];
__thread Command_Counter * _thr_commands_counters[MYSQL_COM_QUERY___NONE];
/*
class Standard_Query_Processor: public Query_Processor {
private:
@ -188,9 +188,9 @@ Command_Counter * commands_counters[MYSQL_COM_QUERY___NONE];
volatile unsigned int version;
protected:
public:
Standard_Query_Processor() {
*/
Query_Processor::Query_Processor() {
#ifdef DEBUG
if (glovars.has_debug==false) {
#else
@ -250,13 +250,13 @@ Standard_Query_Processor() {
commands_counters_desc[MYSQL_COM_QUERY_UNKNOWN]=(char *)"UNKNOWN";
};
virtual ~Standard_Query_Processor() {
Query_Processor::~Query_Processor() {
for (int i=0; i<MYSQL_COM_QUERY___NONE; i++) delete commands_counters[i];
__reset_rules(&rules);
};
// This function is called by each thread when it starts. It create a Query Processor Table for each thread
virtual void init_thread() {
void Query_Processor::init_thread() {
proxy_debug(PROXY_DEBUG_MYSQL_QUERY_PROCESSOR, 4, "Initializing Per-Thread Query Processor Table with version=0\n");
_thr_SQP_version=0;
_thr_SQP_rules=new std::vector<QP_rule_t *>;
@ -264,28 +264,28 @@ virtual void init_thread() {
};
virtual void end_thread() {
void Query_Processor::end_thread() {
proxy_debug(PROXY_DEBUG_MYSQL_QUERY_PROCESSOR, 4, "Destroying Per-Thread Query Processor Table with version=%d\n", _thr_SQP_version);
__reset_rules(_thr_SQP_rules);
delete _thr_SQP_rules;
for (int i=0; i<MYSQL_COM_QUERY___NONE; i++) delete _thr_commands_counters[i];
};
virtual void print_version() {
void Query_Processor::print_version() {
fprintf(stderr,"Standard Query Processor rev. %s -- %s -- %s\n", QUERY_PROCESSOR_VERSION, __FILE__, __TIMESTAMP__);
};
virtual void wrlock() {
void Query_Processor::wrlock() {
spin_wrlock(&rwlock);
};
virtual void wrunlock() {
void Query_Processor::wrunlock() {
spin_wrunlock(&rwlock);
};
virtual QP_rule_t * new_query_rule(int rule_id, bool active, char *username, char *schemaname, int flagIN, char *match_pattern, bool negate_match_pattern, int flagOUT, char *replace_pattern, int destination_hostgroup, int cache_ttl, bool apply) {
QP_rule_t * Query_Processor::new_query_rule(int rule_id, bool active, char *username, char *schemaname, int flagIN, char *match_pattern, bool negate_match_pattern, int flagOUT, char *replace_pattern, int destination_hostgroup, int cache_ttl, bool apply) {
QP_rule_t * newQR=(QP_rule_t *)malloc(sizeof(QP_rule_t));
newQR->rule_id=rule_id;
newQR->active=active;
@ -306,17 +306,17 @@ virtual QP_rule_t * new_query_rule(int rule_id, bool active, char *username, cha
};
virtual void delete_query_rule(QP_rule_t *qr) {
void Query_Processor::delete_query_rule(QP_rule_t *qr) {
__delete_query_rule(qr);
};
virtual void reset_all(bool lock) {
void Query_Processor::reset_all(bool lock) {
if (lock) spin_wrlock(&rwlock);
__reset_rules(&rules);
if (lock) spin_wrunlock(&rwlock);
};
virtual bool insert(QP_rule_t *qr, bool lock) {
bool Query_Processor::insert(QP_rule_t *qr, bool lock) {
bool ret=true;
if (lock) spin_wrlock(&rwlock);
rules.push_back(qr);
@ -325,7 +325,7 @@ virtual bool insert(QP_rule_t *qr, bool lock) {
};
virtual void sort(bool lock) {
void Query_Processor::sort(bool lock) {
if (lock) spin_wrlock(&rwlock);
proxy_debug(PROXY_DEBUG_MYSQL_QUERY_PROCESSOR, 4, "Sorting rules\n");
std::sort (rules.begin(), rules.end(), rules_sort_comp_function);
@ -334,7 +334,7 @@ virtual void sort(bool lock) {
// when commit is called, the version number is increased and the this will trigger the mysql threads to get a new Query Processor Table
// The operation is asynchronous
virtual void commit() {
void Query_Processor::commit() {
spin_wrlock(&rwlock);
__sync_add_and_fetch(&version,1);
proxy_debug(PROXY_DEBUG_MYSQL_QUERY_PROCESSOR, 4, "Increasing version number to %d - all threads will notice this and refresh their rules\n", version);
@ -342,7 +342,7 @@ virtual void commit() {
};
virtual SQLite3_result * get_stats_commands_counters() {
SQLite3_result * Query_Processor::get_stats_commands_counters() {
proxy_debug(PROXY_DEBUG_MYSQL_QUERY_PROCESSOR, 4, "Dumping commands counters\n");
SQLite3_result *result=new SQLite3_result(15);
result->add_column_definition(SQLITE_TEXT,"Command");
@ -367,7 +367,7 @@ virtual SQLite3_result * get_stats_commands_counters() {
}
return result;
}
virtual SQLite3_result * get_stats_query_rules() {
SQLite3_result * Query_Processor::get_stats_query_rules() {
proxy_debug(PROXY_DEBUG_MYSQL_QUERY_PROCESSOR, 4, "Dumping query rules statistics, using Global version %d\n", version);
SQLite3_result *result=new SQLite3_result(2);
spin_rdlock(&rwlock);
@ -387,7 +387,7 @@ virtual SQLite3_result * get_stats_query_rules() {
return result;
}
virtual SQLite3_result * get_current_query_rules() {
SQLite3_result * Query_Processor::get_current_query_rules() {
proxy_debug(PROXY_DEBUG_MYSQL_QUERY_PROCESSOR, 4, "Dumping current query rules, using Global version %d\n", version);
SQLite3_result *result=new SQLite3_result(13);
spin_rdlock(&rwlock);
@ -417,7 +417,7 @@ virtual SQLite3_result * get_current_query_rules() {
}
virtual QP_out_t * process_mysql_query(MySQL_Session *sess, void *ptr, unsigned int size, bool delete_original) {
QP_out_t * Query_Processor::process_mysql_query(MySQL_Session *sess, void *ptr, unsigned int size, bool delete_original) {
QP_out_t *ret=NULL;
unsigned int len=size-sizeof(mysql_hdr)-1;
char *query=(char *)l_alloc(len+1);
@ -557,11 +557,11 @@ __exit_process_mysql_query:
};
// this function is called by mysql_session to free the result generated by process_mysql_query()
virtual void delete_QP_out(QP_out_t *o) {
void Query_Processor::delete_QP_out(QP_out_t *o) {
l_free(sizeof(QP_out_t),o);
};
virtual void update_query_processor_stats() {
void Query_Processor::update_query_processor_stats() {
// Note:
// this function is called by each thread to update global query statistics
//
@ -593,26 +593,26 @@ virtual void update_query_processor_stats() {
}
};
virtual void * query_parser_init(char *query, int query_length, int flags) {
void * Query_Processor::query_parser_init(char *query, int query_length, int flags) {
SQP_par_t *qp=(SQP_par_t *)malloc(sizeof(SQP_par_t));
libinjection_sqli_init(&qp->sf, query, query_length, FLAG_SQL_MYSQL);
return (void *)qp;
};
virtual enum MYSQL_COM_QUERY_command query_parser_command_type(void *args) {
enum MYSQL_COM_QUERY_command Query_Processor::query_parser_command_type(void *args) {
enum MYSQL_COM_QUERY_command ret=__query_parser_command_type(args);
//_thr_commands_counters[ret]++;
return ret;
}
virtual unsigned long long query_parser_update_counters(enum MYSQL_COM_QUERY_command c, unsigned long long t) {
unsigned long long Query_Processor::query_parser_update_counters(enum MYSQL_COM_QUERY_command c, unsigned long long t) {
if (c>=MYSQL_COM_QUERY___NONE) return 0;
unsigned long long ret=_thr_commands_counters[c]->add_time(t);
return ret;
}
enum MYSQL_COM_QUERY_command __query_parser_command_type(void *args) {
enum MYSQL_COM_QUERY_command Query_Processor::__query_parser_command_type(void *args) {
SQP_par_t *qp=(SQP_par_t *)args;
while (libinjection_sqli_tokenize(&qp->sf)) {
if (qp->sf.current->type=='E' || qp->sf.current->type=='k' || qp->sf.current->type=='T') {
@ -722,19 +722,9 @@ enum MYSQL_COM_QUERY_command __query_parser_command_type(void *args) {
return MYSQL_COM_QUERY_UNKNOWN;
}
virtual char * query_parser_first_comment(void *args) { return NULL; }
char * Query_Processor::query_parser_first_comment(void *args) { return NULL; }
virtual void query_parser_free(void *args) {
void Query_Processor::query_parser_free(void *args) {
SQP_par_t *qp=(SQP_par_t *)args;
free(qp);
};
};
extern "C" Query_Processor * create_Query_Processor_func() {
return new Standard_Query_Processor();
}
extern "C" void destroy_Query_Processor(Query_Processor * qp) {
delete qp;
}

@ -28,19 +28,24 @@ LIBCONFIG_PATH=$(DEPS_PATH)/libconfig/libconfig-1.4.9
LIBCONFIG_IDIR=-I$(LIBCONFIG_PATH)/lib
LIBCONFIG_LDIR=-L$(LIBCONFIG_PATH)/lib/.libs
INJECTION_PATH=$(DEPS_PATH)/libinjection
INJECTION_IDIR=$(INJECTION_PATH)
RE2_PATH=$(DEPS_PATH)/re2/re2
RE2_IDIR=$(RE2_PATH)
IDIR=../include
LDIR=../lib
#IDIRS=-I$(IDIR) -I$(JEMALLOC_IDIR) -I$(MARIADB_IDIR) -I$(LIBEVENT_IDIR) $(GLIB_IDIRS) $(LIBCONFIG_IDIR)
#LDIRS=-L$(LDIR) -L$(JEMALLOC_LDIR) -L$(MARIADB_LDIR) -L$(LIBEVENT_LDIR) $(GLIB_LDIRS) $(LIBCONFIG_LDIR)
IDIRS=-I$(IDIR) -I$(JEMALLOC_IDIR) -I$(MARIADB_IDIR) $(LIBCONFIG_IDIR)
LDIRS=-L$(LDIR) -L$(JEMALLOC_LDIR) $(LIBCONFIG_LDIR)
LDIRS=-L$(LDIR) -L$(JEMALLOC_LDIR) $(LIBCONFIG_LDIR) -L$(RE2_PATH)/obj -L$(INJECTION_PATH)
#LDIRS=-L$(LDIR) -L$(JEMALLOC_LDIR) -L$(MARIADB_LDIR) $(GLIB_LDIRS) $(LIBCONFIG_LDIR)
CFLAGS=-std=c++0x $(IDIRS) $(OPTZ) $(DEBUG)
LIBS=-rdynamic -Wl,-Bstatic -lconfig -lproxysql -ljemalloc -lconfig++ -Wl,-Bdynamic -lpthread -lm -lz -lrt -ldl -lcrypto -lssl $(EXTRALINK)
LIBS=-rdynamic -Wl,-Bstatic -lconfig -lproxysql -ljemalloc -lconfig++ -lre2 -linjection -Wl,-Bdynamic -lpthread -lm -lz -lrt -ldl -lcrypto -lssl $(EXTRALINK)
#LIBS=-rdynamic -Wl,-Bstatic -lproxysql -ljemalloc -levent $(GLIB_LIB) -Wl,-Bdynamic -ldl -lpthread -lm -lz -lrt
LIBPROXYSQLAR=$(LDIR)/libproxysql.a
@ -63,7 +68,7 @@ $(ODIR)/%.o: %.cpp
proxysql: $(ODIR) $(OBJ) $(LIBPROXYSQLAR)
$(CC) -o $@ $(OBJ) $(CFLAGS) $(LDIRS) $(LIBS)
$(CC) -o $@ $(OBJ) $(LIBPROXYSQLAR) $(CFLAGS) $(LDIRS) $(LIBS)
$(ODIR):
mkdir $(ODIR)

@ -14,11 +14,6 @@
extern "C" Query_Cache* create_QC_func();
extern "C" MySQL_Thread * create_MySQL_Thread_func();
extern "C" void destroy_MySQL_Thread_func();
extern "C" MySQL_Threads_Handler * create_MySQL_Threads_Handler_func();
extern "C" MySQL_Authentication * create_MySQL_Authentication_func();
extern "C" Query_Processor * create_Query_Processor_func();
extern "C" ProxySQL_Admin * create_ProxySQL_Admin_func();
@ -385,6 +380,7 @@ int main(int argc, const char * argv[]) {
// }
}
*/
/*
{
dlerror();
dlsym_error=NULL;
@ -406,7 +402,7 @@ int main(int argc, const char * argv[]) {
// create_MySQL_Thread=&create_MySQL_Thread_func;
// }
}
*/
/*
{
dlerror();
@ -491,7 +487,7 @@ __start_label:
{
GloQPro = create_Query_Processor();
GloQPro = new Query_Processor();
GloQPro->print_version();
}
GloAdmin->init_mysql_query_rules();

@ -18,7 +18,7 @@ admin_variables=
mysql_variables=
{
threads=4
threads=2
//threads=32
have_compress=true
poll_timeout=2000

Loading…
Cancel
Save