#ifdef __cplusplus #include #include #include //#include //#include //#include //#include //#include "btree_map.h" #ifndef EZOPTION //#include "ezOptionParser.hpp" #define EZOPTION #endif /* EZOPTION */ #endif #include #include #include #include #include #include #include #ifdef NDEBUG #undef NDEBUG #endif #include #include #include //#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //#include #include #include //#include //#include //#include #include #define HAVE_BOOL #include "my_global.h" #include "my_pthread.h" #include "mysql.h" #include "mysql_com.h" #include "proxysql_mem.h" #include "proxysql_structs.h" #include "proxysql_debug.h" #include "proxysql_macros.h" #include "jemalloc.h" #ifdef DEBUG //#define VALGRIND_ENABLE_ERROR_REPORTING //#define VALGRIND_DISABLE_ERROR_REPORTING #include "valgrind.h" #else #define VALGRIND_ENABLE_ERROR_REPORTING #define VALGRIND_DISABLE_ERROR_REPORTING #endif /* DEBUG */ #include "sqlite3.h" #include "c_tokenizer.h" //#include "cpp.h" #ifdef DEBUG #define DEB "_DEBUG" #else #define DEB "" #endif /* DEBUG */ #define PROXYSQL_VERSION "1.3.0-alpha" DEB #define PROXYSQL_CODENAME "Truls" #ifndef PROXYSQL_FUNC_DEFS #define PROXYSQL_FUNC_DEFS #ifdef __cplusplus extern "C" { //int parse_mysql_pkt(unsigned char *, MySQL_Data_Stream *, int); #endif /* __cplusplus */ //mysql_data_stream_t * mysql_data_stream_New(mysql_session_t *, int, mysql_backend_t *); int listen_on_port(char *, uint16_t, int); int listen_on_unix(char *, int); int connect_socket(char *, int); //void process_global_variables_from_file(GKeyFile *, int ); //void main_opts(gint *, gchar ***); int config_file_is_readable(char *); unsigned int CPY3(unsigned char *); int pkt_ok(unsigned char *, unsigned int); int pkt_end(unsigned char *, unsigned int); int pkt_com_query(unsigned char *, unsigned int); enum MySQL_response_type mysql_response(unsigned char *, unsigned int); void pre_variable_mysql_threads(global_variable_entry_t *); void proxy_error_func(const char *, ...); #ifdef DEBUG void init_debug_struct(); void init_debug_struct_from_cmdline(); void proxy_debug_func(enum debug_module, int, int, const char *, int, const char *, const char *, ...); #endif #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* PROXYSQL_FUNC_DEFS */