mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / storage / ndb / include / mgmapi / mgmapi_debug.h
blob47d2db78c527524ae24150e6a146f01a71e1b654
1 /* Copyright (c) 2003-2006 MySQL AB
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; version 2 of the License.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with this program; if not, write to the Free Software
14 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
16 #ifndef MGMAPI_DEBUG_H
17 #define MGMAPI_DEBUG_H
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
23 /**
24 * Start signal logging.
26 * @param handle the NDB management handle.
27 * @param nodeId the node Id.
28 * @param reply the reply message.
29 * @return 0 if successful.
31 int ndb_mgm_start_signallog(NdbMgmHandle handle,
32 int nodeId,
33 struct ndb_mgm_reply* reply);
35 /**
36 * Stop signal logging.
38 * @param handle the NDB management handle.
39 * @param nodeId the node Id.
40 * @param reply the reply message.
41 * @return 0 if successful.
43 int ndb_mgm_stop_signallog(NdbMgmHandle handle,
44 int nodeId,
45 struct ndb_mgm_reply* reply);
47 /**
48 * Set the signals to log.
50 * @param handle the NDB management handle.
51 * @param nodeId the node id.
52 * @param mode the signal log mode.
53 * @param blockNames the block names (space separated).
54 * @param reply the reply message.
55 * @return 0 if successful or an error code.
57 int ndb_mgm_log_signals(NdbMgmHandle handle,
58 int nodeId,
59 enum ndb_mgm_signal_log_mode mode,
60 const char* blockNames,
61 struct ndb_mgm_reply* reply);
63 /**
64 * Set trace.
66 * @param handle the NDB management handle.
67 * @param nodeId the node id.
68 * @param traceNumber the trace number.
69 * @param reply the reply message.
70 * @return 0 if successful or an error code.
72 int ndb_mgm_set_trace(NdbMgmHandle handle,
73 int nodeId,
74 int traceNumber,
75 struct ndb_mgm_reply* reply);
77 /**
78 * Provoke an error.
80 * @param handle the NDB management handle.
81 * @param nodeId the node id.
82 * @param errrorCode the errorCode.
83 * @param reply the reply message.
84 * @return 0 if successful or an error code.
86 int ndb_mgm_insert_error(NdbMgmHandle handle,
87 int nodeId,
88 int errorCode,
89 struct ndb_mgm_reply* reply);
91 /**
92 * Dump state
94 * @param handle the NDB management handle.
95 * @param nodeId the node id.
96 * @param args integer array
97 * @param number of args in int array
98 * @param reply the reply message.
99 * @return 0 if successful or an error code.
101 int ndb_mgm_dump_state(NdbMgmHandle handle,
102 int nodeId,
103 const int * args,
104 int num_args,
105 struct ndb_mgm_reply* reply);
110 * @param handle the NDB management handle.
111 * @param nodeId the node id. 0 = all db nodes
112 * @param errrorCode the errorCode.
113 * @param reply the reply message.
114 * @return 0 if successful or an error code.
116 int ndb_mgm_set_int_parameter(NdbMgmHandle handle,
117 int node,
118 int param,
119 unsigned value,
120 struct ndb_mgm_reply* reply);
122 int ndb_mgm_set_int64_parameter(NdbMgmHandle handle,
123 int node,
124 int param,
125 unsigned long long value,
126 struct ndb_mgm_reply* reply);
128 int ndb_mgm_set_string_parameter(NdbMgmHandle handle,
129 int node,
130 int param,
131 const char * value,
132 struct ndb_mgm_reply* reply);
134 Uint64 ndb_mgm_get_session_id(NdbMgmHandle handle);
136 struct NdbMgmSession {
137 Uint64 id;
138 Uint32 m_stopSelf;
139 Uint32 m_stop;
140 Uint32 nodeid;
141 Uint32 parser_buffer_len;
142 Uint32 parser_status;
145 int ndb_mgm_get_session(NdbMgmHandle handle, Uint64 id,
146 struct NdbMgmSession *s, int *len);
148 #ifdef __cplusplus
150 #endif
153 #endif