mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / storage / ndb / src / common / debugger / signaldata / UtilPrepare.cpp
blob9b6f4c7ea93b64a9cb51ee2f28440d5219760f3e
1 /* Copyright (c) 2003, 2005 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/UtilPrepare.hpp>
18 bool
19 printUTIL_PREPARE_REQ(FILE* out, const Uint32 * data, Uint32 len, Uint16 rec)
21 UtilPrepareReq* sig = (UtilPrepareReq*)data;
22 fprintf(out, " senderRef: H'%.8x senderData: H'%.8x\n",
23 sig->senderRef,
24 sig->senderData);
26 return true;
29 bool
30 printUTIL_PREPARE_CONF(FILE* out, const Uint32 * data, Uint32 len, Uint16 rec)
32 UtilPrepareConf* sig = (UtilPrepareConf*)data;
33 fprintf(out, " senderData: H'%.8x prepareId: %d\n",
34 sig->senderData,
35 sig->prepareId);
36 return true;
39 bool
40 printUTIL_PREPARE_REF(FILE* out, const Uint32 * data, Uint32 len, Uint16 rec)
42 UtilPrepareRef* sig = (UtilPrepareRef*)data;
43 fprintf(out, " senderData: H'%.8x, ", sig->senderData);
44 fprintf(out, " error: %d, ", sig->errorCode);
46 fprintf(out, " errorMsg: ");
47 switch(sig->errorCode) {
48 case UtilPrepareRef::NO_ERROR:
49 fprintf(out, "No error");
50 break;
51 case UtilPrepareRef::PREPARE_SEIZE_ERROR:
52 fprintf(out, "Failed to seize Prepare record");
53 break;
54 case UtilPrepareRef::PREPARED_OPERATION_SEIZE_ERROR:
55 fprintf(out, "Failed to seize PreparedOperation record");
56 break;
57 case UtilPrepareRef::DICT_TAB_INFO_ERROR:
58 fprintf(out, "Failed to get table info from DICT");
59 break;
61 fprintf(out, "\n");
62 return true;