Merge pull request #190 from jesmarcannao/last

FIX ISSUE #174
pull/201/head^2
Rene Cannao 11 years ago
commit ea46b285c7

@ -78,8 +78,12 @@
//#include "cpp.h"
#define PROXYSQL_VERSION "20140617"
#ifdef DEBUG
#define DEB "_DEBUG"
#else
#define DEB ""
#endif /* DEBUG */
#define PROXYSQL_VERSION "20140617" DEB
#define PROXYSQL_CODENAME "Hebe"
#ifndef PROXYSQL_FUNC_DEFS

@ -364,6 +364,8 @@ struct _global_variables_t {
//pthread_rwlock_t rwlock_global;
pthread_rwlock_t rwlock_usernames;
bool has_debug;
volatile int shutdown;
bool nostart;
int reload;

@ -14,7 +14,12 @@ typedef struct _account_details_t {
bool transaction_persistent;
} account_details_t;
#define MYSQL_AUTHENTICATION_VERSION "0.1.0706"
#ifdef DEBUG
#define DEB "_DEBUG"
#else
#define DEB ""
#endif /* DEBUG */
#define MYSQL_AUTHENTICATION_VERSION "0.1.0706" DEB
//#define MY_SEPERATOR_HASH "__uy1gf2doi3ujh4ge5__"
@ -35,6 +40,14 @@ class Standard_MySQL_Authentication: public MySQL_Authentication {
// PtrArray cred_array;
public:
Standard_MySQL_Authentication() {
#ifdef DEBUG
if (glovars.has_debug==false) {
#else
if (glovars.has_debug==true) {
#endif /* DEBUG */
perror("Incompatible debagging version");
exit(EXIT_FAILURE);
}
spinlock_rwlock_init(&creds_backends.lock);
spinlock_rwlock_init(&creds_frontends.lock);
};

@ -16,7 +16,12 @@ extern "C" {
#endif /* __cplusplus */
#define MYSQL_THREAD_VERSION "0.1.1114"
#ifdef DEBUG
#define DEB "_DEBUG"
#else
#define DEB ""
#endif /* DEBUG */
#define MYSQL_THREAD_VERSION "0.1.1114" DEB
#define DEFAULT_NUM_THREADS 4
@ -200,6 +205,14 @@ class Standard_MySQL_Threads_Handler: public MySQL_Threads_Handler
} variables;
public:
Standard_MySQL_Threads_Handler() {
#ifdef DEBUG
if (glovars.has_debug==false) {
#else
if (glovars.has_debug==true) {
#endif /* DEBUG */
perror("Incompatible debagging version");
exit(EXIT_FAILURE);
}
num_threads=0;
mysql_threads=NULL;
stacksize=0;

@ -1293,8 +1293,12 @@ __end_while_pool:
return NULL;
}
#define PROXYSQL_ADMIN_VERSION "0.1.0815"
#ifdef DEBUG
#define DEB "_DEBUG"
#else
#define DEB ""
#endif /* DEBUG */
#define PROXYSQL_ADMIN_VERSION "0.1.0815" DEB
//class Standard_ProxySQL_Admin: public ProxySQL_Admin {
/*
@ -1315,6 +1319,14 @@ public:
*/
Standard_ProxySQL_Admin::Standard_ProxySQL_Admin() {
// int i;
#ifdef DEBUG
if (glovars.has_debug==false) {
#else
if (glovars.has_debug==true) {
#endif /* DEBUG */
perror("Incompatible debagging version");
exit(EXIT_FAILURE);
}
SPA=this;
spinlock_rwlock_init(&rwlock);

@ -29,7 +29,12 @@
} while(0)
#define QUERY_CACHE_VERSION "0.1.0629"
#ifdef DEBUG
#define DEB "_DEBUG"
#else
#define DEB ""
#endif /* DEBUG */
#define QUERY_CACHE_VERSION "0.1.0629" DEB
__thread uint64_t __thr_cntSet=0;
__thread uint64_t __thr_cntGet=0;
@ -316,6 +321,14 @@ virtual double area() const {
};
Standard_Query_Cache() {
#ifdef DEBUG
if (glovars.has_debug==false) {
#else
if (glovars.has_debug==true) {
#endif /* DEBUG */
perror("Incompatible debagging version");
exit(EXIT_FAILURE);
}
QCnow=time(NULL);
//test=0;
size=SHARED_QUERY_CACHE_HASH_TABLES;

@ -9,7 +9,12 @@
#include "../deps/libinjection/libinjection_sqli.h"
#define QUERY_PROCESSOR_VERSION "0.1.728"
#ifdef DEBUG
#define DEB "_DEBUG"
#else
#define DEB ""
#endif /* DEBUG */
#define QUERY_PROCESSOR_VERSION "0.1.728" DEB
#define strdup_null(__c) ( __c ? strdup(__c) : __c )
@ -238,6 +243,14 @@ protected:
public:
Standard_Query_Processor() {
#ifdef DEBUG
if (glovars.has_debug==false) {
#else
if (glovars.has_debug==true) {
#endif /* DEBUG */
perror("Incompatible debagging version");
exit(EXIT_FAILURE);
}
proxy_debug(PROXY_DEBUG_MYSQL_QUERY_PROCESSOR, 4, "Initializing Query Processor with version=0\n");
spinlock_rwlock_init(&rwlock);
version=0;

@ -190,6 +190,12 @@ int main(int argc, const char * argv[]) {
{
#ifdef DEBUG
glovars.has_debug=true;
#else
glovars.has_debug=false;
#endif /* DEBUG */
__thr_sfp=l_mem_init();
{

@ -3,4 +3,3 @@
//#include "proxysql_glovars.hpp"
#include "cpp.h"
//ProxySQL_GlobalVariables GloVars;

Loading…
Cancel
Save