CreateFragmentation.cpp
上传用户:romrleung
上传日期:2022-05-23
资源大小:18897k
文件大小:2k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. /* Copyright (C) 2003 MySQL AB
  2.    This program is free software; you can redistribute it and/or modify
  3.    it under the terms of the GNU General Public License as published by
  4.    the Free Software Foundation; either version 2 of the License, or
  5.    (at your option) any later version.
  6.    This program is distributed in the hope that it will be useful,
  7.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  8.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  9.    GNU General Public License for more details.
  10.    You should have received a copy of the GNU General Public License
  11.    along with this program; if not, write to the Free Software
  12.    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
  13. #include <signaldata/CreateFragmentation.hpp>
  14. bool
  15. printCREATE_FRAGMENTATION_REQ(FILE * output, const Uint32 * theData, 
  16.       Uint32 len, Uint16 receiverBlockNo) {
  17.   const CreateFragmentationReq * const sig = (CreateFragmentationReq *)theData;
  18.   fprintf(output, " senderRef: %xn", sig->senderRef);
  19.   fprintf(output, " senderData: %xn", sig->senderData);
  20.   fprintf(output, " fragmentationType: %xn", sig->fragmentationType);
  21.   fprintf(output, " noOfFragments: %xn", sig->noOfFragments);
  22.   fprintf(output, " fragmentNode: %xn", sig->fragmentNode);
  23.   if (sig->primaryTableId == RNIL)
  24.     fprintf(output, " primaryTableId: nonen");
  25.   else
  26.     fprintf(output, " primaryTableId: %xn", sig->primaryTableId);
  27.   return true;
  28. }
  29. bool
  30. printCREATE_FRAGMENTATION_REF(FILE * output, const Uint32 * theData, 
  31.       Uint32 len, Uint16 receiverBlockNo) {
  32.   const CreateFragmentationRef * const sig = (CreateFragmentationRef *)theData;
  33.   fprintf(output, " senderRef: %xn", sig->senderRef);
  34.   fprintf(output, " senderData: %xn", sig->senderData);
  35.   fprintf(output, " errorCode: %xn", sig->errorCode);
  36.   return true;
  37. }
  38. bool
  39. printCREATE_FRAGMENTATION_CONF(FILE * output, const Uint32 * theData, 
  40.        Uint32 len, Uint16 receiverBlockNo) {
  41.   const CreateFragmentationConf * const sig = 
  42.     (CreateFragmentationConf *)theData;
  43.   fprintf(output, " senderRef: %xn", sig->senderRef);
  44.   fprintf(output, " senderData: %xn", sig->senderData);
  45.   fprintf(output, " noOfReplicas: %xn", sig->noOfReplicas);
  46.   fprintf(output, " noOfFragments: %xn", sig->noOfFragments);
  47.   return true;
  48. }