mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / storage / ndb / src / common / debugger / signaldata / PrepFailReqRef.cpp
blob9775e7e2a7934751c00737911ed115740c85d80f
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 */
17 #include <kernel_types.h>
18 #include <BlockNumbers.h>
19 #include <signaldata/PrepFailReqRef.hpp>
21 bool
22 printPREPFAILREQREF(FILE * output,
23 const Uint32 * theData,
24 Uint32 len,
25 Uint16 receiverBlockNo){
27 PrepFailReqRef * cc = (PrepFailReqRef*)theData;
29 fprintf(output, " xxxBlockRef = (%d, %d) failNo = %d noOfNodes = %d\n",
30 refToBlock(cc->xxxBlockRef), refToNode(cc->xxxBlockRef),
31 cc->failNo, cc->noOfNodes);
33 int hits = 0;
34 fprintf(output, " Nodes: ");
35 for(int i = 0; i<MAX_NODES; i++){
36 if(NodeBitmask::get(cc->theNodes, i)){
37 hits++;
38 fprintf(output, " %d", i);
40 if(hits == 16){
41 fprintf(output, "\n Nodes: ");
42 hits = 0;
45 if(hits != 0)
46 fprintf(output, "\n");
48 return true;