MariaDB 10 Replication support

MariaDB 10 Replication support
This commit is contained in:
MassimilianoPinto
2014-05-26 10:09:01 +02:00
parent a819887b07
commit cde204db47
3 changed files with 69 additions and 18 deletions

View File

@ -22,8 +22,9 @@
* @verbatim
* Revision History
*
* Date Who Description
* 18/06/13 Mark Riddoch Initial implementation
* Date Who Description
* 18/06/13 Mark Riddoch Initial implementation
* 20/05/14 Massimiliano Pinto Addition of server_string
*
* @endverbatim
*/
@ -67,6 +68,7 @@ SERVER *server;
server->nextdb = NULL;
server->monuser = NULL;
server->monpw = NULL;
server->server_string = NULL;
spinlock_acquire(&server_spin);
server->next = allServers;
@ -109,6 +111,8 @@ SERVER *ptr;
/* Clean up session and free the memory */
free(server->name);
free(server->protocol);
if (server->server_string)
free(server->server_string);
free(server);
return 1;
}
@ -197,6 +201,8 @@ char *stat;
free(stat);
dcb_printf(dcb, "\tProtocol: %s\n", ptr->protocol);
dcb_printf(dcb, "\tPort: %d\n", ptr->port);
if (ptr->server_string)
dcb_printf(dcb, "\tServer Version:\t\t%s\n", ptr->server_string);
dcb_printf(dcb, "\tNumber of connections: %d\n", ptr->stats.n_connections);
dcb_printf(dcb, "\tCurrent no. of connections: %d\n", ptr->stats.n_current);
ptr = ptr->next;
@ -222,6 +228,8 @@ char *stat;
free(stat);
dcb_printf(dcb, "\tProtocol: %s\n", server->protocol);
dcb_printf(dcb, "\tPort: %d\n", server->port);
if (server->server_string)
dcb_printf(dcb, "\tServer Version:\t\t%s\n", server->server_string);
dcb_printf(dcb, "\tNumber of connections: %d\n", server->stats.n_connections);
dcb_printf(dcb, "\tCurrent No. of connections: %d\n", server->stats.n_current);
}