~vadim-tk/percona-server/percona-galera-5.1.57-0.8.1

« back to all changes in this revision

Viewing changes to storage/ndb/src/common/debugger/signaldata/TuxMaint.cpp

  • Committer: root
  • Date: 2011-07-28 00:14:23 UTC
  • Revision ID: root@r815.office.percona.com-20110728001423-6pw0v4b7r0dkbsr4
Ported to Galera 0.8.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2003 MySQL AB
 
2
 
 
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.
 
6
 
 
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.
 
11
 
 
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
 
 
16
#include <signaldata/TuxMaint.hpp>
 
17
#include <SignalLoggerManager.hpp>
 
18
#include <AttributeHeader.hpp>
 
19
 
 
20
bool
 
21
printTUX_MAINT_REQ(FILE* output, const Uint32* theData, Uint32 len, Uint16 rbn)
 
22
{
 
23
  //const bool inOut = rbn & (1 << 15);
 
24
  const TuxMaintReq* const sig = (const TuxMaintReq*)theData;
 
25
  fprintf(output, " errorCode=%d\n", sig->errorCode);
 
26
  fprintf(output, " table: id=%u", sig->tableId);
 
27
  fprintf(output, " index: id=%u", sig->indexId);
 
28
  fprintf(output, " fragment: id=%u\n", sig->fragId);
 
29
  fprintf(output, " tuple: loc=%u.%u version=%u\n", sig->pageId, sig->pageIndex, sig->tupVersion);
 
30
  const Uint32 opCode = sig->opInfo & 0xFF;
 
31
  const Uint32 opFlag = sig->opInfo >> 8;
 
32
  switch (opCode ) {
 
33
  case TuxMaintReq::OpAdd:
 
34
    fprintf(output, " opCode=Add opFlag=%u\n", opFlag);
 
35
    break;
 
36
  case TuxMaintReq::OpRemove:
 
37
    fprintf(output, " opCode=Remove opFlag=%u\n", opFlag);
 
38
    break;
 
39
  default:
 
40
    fprintf(output, " opInfo=%x ***invalid***\n", sig->opInfo);
 
41
    break;
 
42
  }
 
43
  return true;
 
44
}