1 /* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. 2 3 This program is free software; you can redistribute it and/or modify 4 it under the terms of the GNU General Public License, version 2.0, 5 as published by the Free Software Foundation. 6 7 This program is also distributed with certain software (including 8 but not limited to OpenSSL) that is licensed under separate terms, 9 as designated in a particular file or component or in included license 10 documentation. The authors of MySQL hereby grant you an additional 11 permission to link the program and your derivative works with the 12 separately licensed software that they have included with MySQL. 13 14 This program is distributed in the hope that it will be useful, 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 GNU General Public License, version 2.0, for more details. 18 19 You should have received a copy of the GNU General Public License 20 along with this program; if not, write to the Free Software 21 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ 22 23 #ifndef NDBD_HPP 24 #define NDBD_HPP 25 26 void 27 ndbd_run(bool foreground, int report_fd, 28 const char* connect_str, int force_nodeid, const char* bind_address, 29 bool no_start, bool initial, bool initialstart, 30 unsigned allocated_nodeid); 31 32 enum NdbShutdownType { 33 NST_Normal, 34 NST_Watchdog, 35 NST_ErrorHandler, 36 NST_ErrorHandlerSignal, 37 NST_Restart, 38 NST_ErrorInsert 39 }; 40 41 enum NdbRestartType { 42 NRT_Default = 0, 43 NRT_NoStart_Restart = 1, // -n 44 NRT_DoStart_Restart = 2, // 45 NRT_NoStart_InitialStart = 3, // -n -i 46 NRT_DoStart_InitialStart = 4 // -i 47 }; 48 49 /** 50 * Shutdown/restart Ndb 51 * 52 * @param error_code - The error causing shutdown/restart 53 * @param type - Type of shutdown/restart 54 * @param restartType - Type of restart (only valid if type == NST_Restart) 55 * 56 * NOTE! never returns 57 */ 58 void 59 NdbShutdown(int error_code, 60 NdbShutdownType type, 61 NdbRestartType restartType = NRT_Default); 62 63 64 65 #endif 66