mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / storage / ndb / src / common / debugger / signaldata / UtilExecute.cpp
blobb889bf1f298d55b47011b51de310a997ce1fd919
1 /* Copyright (c) 2003, 2005, 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 #include <signaldata/UtilExecute.hpp>
18 bool
19 printUTIL_EXECUTE_REQ(FILE* out, const Uint32 * data, Uint32 len, Uint16 rec)
21 const UtilExecuteReq* const sig = (UtilExecuteReq*)data;
22 fprintf(out, " senderRef: H'%.8x, senderData: H'%.8x prepareId: %d "
23 " releaseFlag: %d\n",
24 sig->senderRef,
25 sig->senderData,
26 sig->getPrepareId(),
27 sig->getReleaseFlag());
28 return true;
31 bool
32 printUTIL_EXECUTE_CONF(FILE* out, const Uint32 * data, Uint32 len, Uint16 rec)
34 UtilExecuteConf* sig = (UtilExecuteConf*)data;
35 fprintf(out, " senderData: H'%.8x\n",
36 sig->senderData);
37 return true;
40 bool
41 printUTIL_EXECUTE_REF(FILE* out, const Uint32 * data, Uint32 len, Uint16 rec)
43 UtilExecuteRef* sig = (UtilExecuteRef*)data;
44 fprintf(out, " senderData: H'%.8x, ", sig->senderData);
45 fprintf(out, " errorCode: %s, ",
46 sig->errorCode == UtilExecuteRef::IllegalKeyNumber ?
47 "IllegalKeyNumber" :
48 sig->errorCode == UtilExecuteRef::IllegalAttrNumber ?
49 "IllegalAttrNumber" :
50 sig->errorCode == UtilExecuteRef::TCError ?
51 "TCError" :
52 sig->errorCode == UtilExecuteRef::AllocationError ?
53 "AllocationError" :
54 "Unknown");
55 fprintf(out, " TCErrorCode: %d\n",
56 sig->TCErrorCode);
57 return true;