MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ScanFrag.cpp
1 /*
2  Copyright (C) 2004-2006, 2008 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 
21 #include <BlockNumbers.h>
22 #include <signaldata/ScanTab.hpp>
23 #include <signaldata/ScanFrag.hpp>
24 
25 bool
26 printSCAN_FRAGREQ(FILE * output, const Uint32 * theData,
27  Uint32 len, Uint16 receiverBlockNo) {
28  const ScanFragReq * const sig = (ScanFragReq *)theData;
29  fprintf(output, " senderData: 0x%x\n", sig->senderData);
30  fprintf(output, " resultRef: 0x%x\n", sig->resultRef);
31  fprintf(output, " savePointId: %u\n", sig->savePointId);
32 
33  fprintf(output, " flags: ");
34  if (ScanFragReq::getLockMode(sig->requestInfo))
35  fprintf(output, "X");
36  if (ScanFragReq::getHoldLockFlag(sig->requestInfo))
37  fprintf(output, "h");
38  if (ScanFragReq::getKeyinfoFlag(sig->requestInfo))
39  fprintf(output, "k");
40  if (ScanFragReq::getReadCommittedFlag(sig->requestInfo))
41  fprintf(output, "d");
42  if (ScanFragReq::getRangeScanFlag(sig->requestInfo))
43  fprintf(output, "r");
44  if (ScanFragReq::getDescendingFlag(sig->requestInfo))
45  fprintf(output, "(desc)");
46  if (ScanFragReq::getTupScanFlag(sig->requestInfo))
47  fprintf(output, "t");
48  if (ScanFragReq::getNoDiskFlag(sig->requestInfo))
49  fprintf(output, "(nodisk)");
50  fprintf(output, " attrLen: %u",
51  ScanFragReq::getAttrLen(sig->requestInfo));
52  fprintf(output, " reorg: %u",
53  ScanFragReq::getReorgFlag(sig->requestInfo));
54  fprintf(output, " corr: %u",
55  ScanFragReq::getCorrFactorFlag(sig->requestInfo));
56  fprintf(output, " stat: %u",
57  ScanFragReq::getStatScanFlag(sig->requestInfo));
58  fprintf(output, "\n");
59 
60  fprintf(output, " tableId: %u\n", sig->tableId);
61  fprintf(output, " fragmentNo: %u\n", sig->fragmentNoKeyLen & 0xFFFF);
62  fprintf(output, " keyLen: %u\n", sig->fragmentNoKeyLen >> 16);
63  fprintf(output, " schemaVersion: 0x%x\n", sig->schemaVersion);
64  fprintf(output, " transId1: 0x%x\n", sig->transId1);
65  fprintf(output, " transId2: 0x%x\n", sig->transId2);
66  fprintf(output, " clientOpPtr: 0x%x\n", sig->clientOpPtr);
67  fprintf(output, " batch_size_rows: %u\n", sig->batch_size_rows);
68  fprintf(output, " batch_size_bytes: %u\n", sig->batch_size_bytes);
69 
70  if (ScanFragReq::getCorrFactorFlag(sig->requestInfo))
71  {
72  fprintf(output, " corrFactorLo: 0x%x\n", sig->variableData[0]);
73  fprintf(output, " corrFactorHi: 0x%x\n", sig->variableData[1]);
74  }
75 
76  return true;
77 }
78 
79 bool
80 printSCAN_FRAGCONF(FILE * output, const Uint32 * theData,
81  Uint32 len, Uint16 receiverBlockNo)
82 {
83  const ScanFragConf * const sig =
84  reinterpret_cast<const ScanFragConf*>(theData);
85  fprintf(output, " senderData: 0x%x\n", sig->senderData);
86  fprintf(output, " completedOps: %u\n", sig->completedOps);
87  fprintf(output, " fragmentCompleted: 0x%x\n", sig->fragmentCompleted);
88  fprintf(output, " transId1: 0x%x\n", sig->transId1);
89  fprintf(output, " transId2: 0x%x\n", sig->transId2);
90  fprintf(output, " total_len: %u\n", sig->total_len);
91 
92  return true;
93 }