1 /* Copyright (c) 2009, 2021, Oracle and/or its affiliates. 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 #define JAM_FILE_ID 218 27 28 29 void 30 ndbd_run(bool foreground, int report_fd, 31 const char* connect_str, int force_nodeid, const char* bind_address, 32 bool no_start, bool initial, bool initialstart, 33 unsigned allocated_nodeid, int connect_retries, int connect_delay); 34 35 enum NdbShutdownType { 36 NST_Normal, 37 NST_Watchdog, 38 NST_ErrorHandler, 39 NST_ErrorHandlerSignal, 40 NST_Restart, 41 NST_ErrorInsert 42 }; 43 44 enum NdbRestartType { 45 NRT_Default = 0, 46 NRT_NoStart_Restart = 1, // -n 47 NRT_DoStart_Restart = 2, // 48 NRT_NoStart_InitialStart = 3, // -n -i 49 NRT_DoStart_InitialStart = 4 // -i 50 }; 51 52 /** 53 * Shutdown/restart Ndb 54 * 55 * @param error_code - The error causing shutdown/restart 56 * @param type - Type of shutdown/restart 57 * @param restartType - Type of restart (only valid if type == NST_Restart) 58 * 59 * NOTE! never returns 60 */ 61 void 62 NdbShutdown(int error_code, 63 NdbShutdownType type, 64 NdbRestartType restartType = NRT_Default); 65 66 67 68 69 #undef JAM_FILE_ID 70 71 #endif 72