|
|
|
|
@ -229,6 +229,7 @@ MySQL_HostGroups_Manager::MySQL_HostGroups_Manager() {
|
|
|
|
|
status.server_connections_connected=0;
|
|
|
|
|
status.server_connections_aborted=0;
|
|
|
|
|
status.server_connections_created=0;
|
|
|
|
|
status.servers_table_version=0;
|
|
|
|
|
status.myconnpoll_get=0;
|
|
|
|
|
status.myconnpoll_get_ok=0;
|
|
|
|
|
status.myconnpoll_get_ping=0;
|
|
|
|
|
@ -281,6 +282,10 @@ void MySQL_HostGroups_Manager::wrunlock() {
|
|
|
|
|
spin_wrunlock(&rwlock);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
unsigned int MySQL_HostGroups_Manager::get_servers_table_version() {
|
|
|
|
|
return __sync_fetch_and_add(&status.servers_table_version,0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// add a new row in mysql_servers_incoming
|
|
|
|
|
// we always assume that the calling thread has acquired a rdlock()
|
|
|
|
|
bool MySQL_HostGroups_Manager::server_add(unsigned int hid, char *add, uint16_t p, unsigned int _weight, enum MySerStatus status, unsigned int _comp /*, uint8_t _charset */, unsigned int _max_connections, unsigned int _max_replication_lag) {
|
|
|
|
|
@ -403,6 +408,7 @@ bool MySQL_HostGroups_Manager::commit() {
|
|
|
|
|
generate_mysql_servers_table();
|
|
|
|
|
generate_mysql_replication_hostgroups_table();
|
|
|
|
|
|
|
|
|
|
__sync_fetch_and_add(&status.servers_table_version,1);
|
|
|
|
|
wrunlock();
|
|
|
|
|
if (GloMTH) {
|
|
|
|
|
GloMTH->signal_all_threads(1);
|
|
|
|
|
|