int mysql_shutdown(MYSQL *mysql, enum
enum_shutdown_level shutdown_level)
Description
Asks the database server to shut down. The connected user must
have SHUTDOWN
privileges. The
shutdown_level
argument was added in MySQL
4.1.3 (and 5.0.1). The MySQL server currently supports only
one type (level of gracefulness) of shutdown;
shutdown_level
must be equal to
SHUTDOWN_DEFAULT
. Later we wil add more
levels and then the shutdown_level
argument
will enable us to choose the desired level. MySQL servers and
MySQL clients before and after 4.1.3 are compatible; MySQL
servers newer than 4.1.3 accept the
mysql_shutdown(MYSQL *mysql)
call, and
MySQL servers older than 4.1.3 accept the new
mysql_shutdown()
call. But dynamically
linked executables which have been compiled with older
versions of libmysqlclient
headers, and
call mysql_shutdown()
, need to be used with
the old libmysqlclient
dynamic library.
The shutdown process is described in Sección 5.4, “El proceso de cierre del servidor MySQL”.
Return Values
Zero for success. Non-zero if an error occurred.
Errors
CR_COMMANDS_OUT_OF_SYNC
Commands were executed in an improper order.
CR_SERVER_GONE_ERROR
The MySQL server has gone away.
CR_SERVER_LOST
The connection to the server was lost during the query.
CR_UNKNOWN_ERROR
An unknown error occurred.
Ésta es una traducción del manual de referencia de MySQL, que puede encontrarse en dev.mysql.com. El manual de referencia original de MySQL está escrito en inglés, y esta traducción no necesariamente está tan actualizada como la versión original. Para cualquier sugerencia sobre la traducción y para señalar errores de cualquier tipo, no dude en dirigirse a mysql-es@vespito.com.