MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LCP.cpp
1 /*
2  Copyright (C) 2003-2006 MySQL AB
3  All rights reserved. Use is subject to license terms.
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; version 2 of the License.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 
19 
20 #include <RefConvert.hpp>
21 #include <signaldata/LCP.hpp>
22 #include <DebuggerNames.hpp>
23 
24 bool
25 printSTART_LCP_REQ(FILE * output, const Uint32 * theData,
26  Uint32 len, Uint16 receiverBlockNo){
27 
28  const StartLcpReq * const sig = (StartLcpReq *) theData;
29 
30  char buf1[8*_NDB_NODE_BITMASK_SIZE+1];
31  char buf2[8*_NDB_NODE_BITMASK_SIZE+1];
32  fprintf(output,
33  " Sender: %d LcpId: %d\n"
34  " ParticipatingDIH = %s\n"
35  " ParticipatingLQH = %s\n",
36  refToNode(sig->senderRef), sig->lcpId,
37  sig->participatingDIH.getText(buf1),
38  sig->participatingLQH.getText(buf2));
39 
40  return true;
41 }
42 
43 bool
44 printSTART_LCP_CONF(FILE * output, const Uint32 * theData,
45  Uint32 len, Uint16 receiverBlockNo){
46 
47  const StartLcpConf * const sig = (StartLcpConf *) theData;
48 
49  fprintf(output, " Sender: %d LcpId: %d\n",
50  refToNode(sig->senderRef), sig->lcpId);
51 
52  return true;
53 }
54 
55 bool
56 printLCP_FRAG_ORD(FILE * output, const Uint32 * theData,
57  Uint32 len, Uint16 receiverBlockNo){
58 
59  const LcpFragOrd * const sig = (LcpFragOrd *) theData;
60 
61  fprintf(output, " LcpId: %d LcpNo: %d Table: %d Fragment: %d\n",
62  sig->lcpId, sig->lcpNo, sig->tableId, sig->fragmentId);
63 
64  fprintf(output, " KeepGCI: %d LastFragmentFlag: %d\n",
65  sig->keepGci, sig->lastFragmentFlag);
66  return true;
67 }
68 
69 bool
70 printLCP_FRAG_REP(FILE * output, const Uint32 * theData,
71  Uint32 len, Uint16 receiverBlockNo){
72 
73  const LcpFragRep * const sig = (LcpFragRep *) theData;
74 
75  fprintf(output, " LcpId: %d LcpNo: %d NodeId: %d Table: %d Fragment: %d\n",
76  sig->lcpId, sig->lcpNo, sig->nodeId, sig->tableId, sig->fragId);
77  fprintf(output, " Max GCI Started: %d Max GCI Completed: %d\n",
78  sig->maxGciStarted, sig->maxGciCompleted);
79  return true;
80 }
81 
82 bool
83 printLCP_COMPLETE_REP(FILE * output, const Uint32 * theData,
84  Uint32 len, Uint16 receiverBlockNo){
85 
86  const LcpCompleteRep * const sig = (LcpCompleteRep *) theData;
87 
88  fprintf(output, " LcpId: %d NodeId: %d Block: %s\n",
89  sig->lcpId, sig->nodeId, getBlockName(sig->blockNo));
90  return true;
91 }