int mysql_shutdown(MYSQL *mysql, enum
mysql_enum_shutdown_level shutdown_level)
Description
Asks the database server to shut down. The connected user must
have the SHUTDOWN
privilege. The
shutdown_level
argument was added in MySQL
5.0.1. MySQL 5.0 servers support only one type of
shutdown; shutdown_level
must be equal to
SHUTDOWN_DEFAULT
. Additional shutdown levels
are planned to make it possible to choose the desired level.
Dynamically linked executables which have been compiled with
older versions of the libmysqlclient
headers
and call mysql_shutdown()
need
to be used with the old libmysqlclient
dynamic library.
The shutdown process is described in Section 5.1.10, “The Shutdown Process”.
Return Values
Zero for success. Nonzero if an error occurred.
Errors
Commands were executed in an improper order.
The MySQL server has gone away.
The connection to the server was lost during the query.
An unknown error occurred.
User Comments
This comment applies particularly to building mysql++ under Windows for MySQL v5.0.x. If you get an error that in connection.cc, the include file config.h cannot be found, simply comment the include line for config.h out.
I have seen other comments that you should replace the include line with:
#define HAVE_MYSQL_SHUTDOWN_LEVEL_ARG
but, that allows the condition:
# define SHUTDOWN_ARG ,SHUTDOWN_DEFAULT
to be processed, and that generates the error that SHUTDOWN_DEFAULT is undefined.
Chuck
Add your own comment.