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
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
,
33 struct ndb_mgm_reply
* reply
);
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
,
45 struct ndb_mgm_reply
* reply
);
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
,
59 enum ndb_mgm_signal_log_mode mode
,
60 const char* blockNames
,
61 struct ndb_mgm_reply
* reply
);
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
,
75 struct ndb_mgm_reply
* reply
);
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
,
89 struct ndb_mgm_reply
* reply
);
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
,
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
,
120 struct ndb_mgm_reply
* reply
);
122 int ndb_mgm_set_int64_parameter(NdbMgmHandle handle
,
125 unsigned long long value
,
126 struct ndb_mgm_reply
* reply
);
128 int ndb_mgm_set_string_parameter(NdbMgmHandle handle
,
132 struct ndb_mgm_reply
* reply
);
134 Uint64
ndb_mgm_get_session_id(NdbMgmHandle handle
);
136 struct NdbMgmSession
{
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
);