/* shutdown() */ static VALUE my_shutdown(int argc, VALUE* argv, VALUE obj) { MYSQL* m = GetHandler(obj); VALUE level; rb_scan_args(argc, argv, "01", &level); #if MYSQL_VERSION_ID >= 40103 if (mysql_shutdown(m, NIL_P(level) ? SHUTDOWN_DEFAULT : NUM2INT(level)) != 0) #else if (mysql_shutdown(m) != 0) #endif mysql_raise(m); return obj; }
/* 关闭mysql 服务器 */ int CppMySQL3DB::shutDown() { if( mysql_shutdown(_db_ptr,SHUTDOWN_DEFAULT) == 0 ) return 0; else return -1; }
/** * @brief Shutdown MySQL. */ void G_MySQL_Shutdown(void) { #if HAVE_MYSQL if (g_mysql_state.mysql) { mysql_shutdown(g_mysql_state.mysql, SHUTDOWN_DEFAULT); g_mysql_state.mysql = NULL; } #endif }
static PyObject* wsql_connection_shutdown(wsql_connection *self) { int r; CHECK_CONNECTION(self, NULL); Py_BEGIN_ALLOW_THREADS r = mysql_shutdown(&(self->connection) #if MYSQL_VERSION_ID >= 40103 , SHUTDOWN_DEFAULT #endif ); Py_END_ALLOW_THREADS if (r) return wsql_raise_error(self); Py_RETURN_NONE; }
//-------------------------------------------------------------------------- bool Connection::shutdown () { bool suc = !(mysql_shutdown(&mysql)); if (throw_exceptions && !suc) throw MysqlBadQuery(error()); else return suc; }
int CDatabase_Connection::shutdown(enum mysql_enum_shutdown_level shutdown_level) { return mysql_shutdown(&my, shutdown_level); }
DBConnector::~DBConnector() { Close(); mysql_shutdown(&mysql, SHUTDOWN_DEFAULT); }