-
Notifications
You must be signed in to change notification settings - Fork 990
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'Master/v2.x' into v2.x_unified_makefile…
…_fixes # Conflicts: # lib/Makefile
- Loading branch information
Showing
14 changed files
with
239 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#ifndef __CLASS_PROXYSQL_POLL | ||
#define __CLASS_PROXYSQL_POLL | ||
|
||
//#include "MySQL_Data_Stream.h" | ||
|
||
class iface_info { | ||
public: | ||
char *iface; | ||
char *address; | ||
int port; | ||
int fd; | ||
iface_info(char *_i, char *_a, int p, int f) { | ||
iface=strdup(_i); | ||
address=strdup(_a); | ||
port=p; | ||
fd=f; | ||
} | ||
~iface_info() { | ||
free(iface); | ||
free(address); | ||
close(fd); | ||
} | ||
}; | ||
|
||
class ProxySQL_Poll { | ||
private: | ||
void shrink(); | ||
void expand(unsigned int more); | ||
|
||
public: | ||
unsigned int len; | ||
unsigned int size; | ||
struct pollfd *fds; | ||
MySQL_Data_Stream **myds; | ||
unsigned long long *last_recv; | ||
unsigned long long *last_sent; | ||
std::atomic<bool> bootstrapping_listeners; | ||
volatile int pending_listener_add; | ||
volatile int pending_listener_del; | ||
unsigned int poll_timeout; | ||
unsigned long loops; | ||
StatCounters *loop_counters; | ||
|
||
ProxySQL_Poll(); | ||
~ProxySQL_Poll(); | ||
void add(uint32_t _events, int _fd, MySQL_Data_Stream *_myds, unsigned long long sent_time); | ||
void remove_index_fast(unsigned int i); | ||
int find_index(int fd); | ||
}; | ||
#endif // __CLASS_PROXYSQL_POLL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include "mysql.h" | ||
#include "mariadb_com.h" | ||
|
||
MARIADB_CHARSET_INFO * proxysql_find_charset_name(const char * const name); | ||
MARIADB_CHARSET_INFO * proxysql_find_charset_collate_names(const char *csname, const char *collatename); | ||
const MARIADB_CHARSET_INFO * proxysql_find_charset_nr(unsigned int nr); | ||
MARIADB_CHARSET_INFO * proxysql_find_charset_collate(const char *collatename); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.