mariadb/server-tools/instance-manager/client_func.c
unknown fb3d6c39a0 IM mostly fixed according to Brian's directions. Will need to do some additional option handling and cleanups
server-tools/instance-manager/Makefile.am:
  New file added
server-tools/instance-manager/client_func.c:
  typo fixed
server-tools/instance-manager/commands.cc:
  there are no admin-user snd admin-password fields anymore, so no need to show their values
server-tools/instance-manager/guardian.cc:
  Syncronization added -- now guardian wakes up whenever SIGCLD has been catched
server-tools/instance-manager/guardian.h:
  Condition variable declared
server-tools/instance-manager/instance.cc:
  Persistent connection to the instance removed. Now we use SIGTERM instead of com_shutdown for STOP. We also
  manage SIGCHLD ourselves now (therefore no double fork).
server-tools/instance-manager/instance.h:
  Pointer to the instance_map added, MySQL connection structures removed
server-tools/instance-manager/instance_map.cc:
  More syncronization added (to make proper STOP)
server-tools/instance-manager/instance_map.h:
  added condition variable and mutex for connection threads to wait for SIGCHLD
server-tools/instance-manager/instance_options.cc:
  defaults-handling methods have been added.
server-tools/instance-manager/instance_options.h:
  New functions and constants declared
server-tools/instance-manager/listener.cc:
  No changes here (bk bug?)
server-tools/instance-manager/manager.cc:
  SIGCHLD handling added
2005-01-25 13:54:56 +03:00

32 lines
815 B
C

#include <my_global.h>
#include <my_sys.h>
#include <mysql.h>
/*
Currently we cannot use libmysqlclient directly because of the linking
issues. Here we provide needed libmysqlclient functions.
TODO: to think how to use libmysqlclient code instead of copy&paste.
The other possible solution is to use simple_command directly.
*/
const char * STDCALL
mysql_get_server_info(MYSQL *mysql)
{
return((char*) mysql->server_version);
}
int STDCALL
mysql_ping(MYSQL *mysql)
{
DBUG_ENTER("mysql_ping");
DBUG_RETURN(simple_command(mysql,COM_PING,0,0,0));
}
int STDCALL
mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level)
{
uchar level[1];
DBUG_ENTER("mysql_shutdown");
level[0]= (uchar) shutdown_level;
DBUG_RETURN(simple_command(mysql, COM_SHUTDOWN, (char *)level, 1, 0));
}