TupFrag.hpp 3.9 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
/* Copyright (C) 2003 MySQL AB

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */

#ifndef TUP_FRAG_HPP
#define TUP_FRAG_HPP

#include "SignalData.hpp"

/*
 * Add fragment and add attribute signals between LQH and TUP,TUX.
 * NOTE: return signals from TUP,TUX to LQH must have same format.
 */

// TUP: add fragment

class TupFragReq {
  friend class Dblqh;
  friend class Dbtup;
public:
unknown's avatar
unknown committed
33
  STATIC_CONST( SignalLength = 15 );
34 35 36 37 38 39 40 41
private:
  Uint32 userPtr;
  Uint32 userRef;
  Uint32 reqInfo;
  Uint32 tableId;
  Uint32 noOfAttr;
  Uint32 fragId;
  Uint32 todo[8];
unknown's avatar
unknown committed
42
  Uint32 tablespaceid;
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
};

class TupFragConf {
  friend class Dblqh;
  friend class Dbtup;
public:
  STATIC_CONST( SignalLength = 4 );
private:
  Uint32 userPtr;
  Uint32 tupConnectPtr;
  Uint32 fragPtr;
  Uint32 fragId;
};

class TupFragRef {
  friend class Dblqh;
  friend class Dbtup;
public:
  STATIC_CONST( SignalLength = 2 );
private:
  Uint32 userPtr;
  Uint32 errorCode;
};

// TUX: add fragment

class TuxFragReq {
  friend class Dblqh;
  friend class Dbtux;
public:
73
  STATIC_CONST( SignalLength = 14 );
74 75 76 77 78 79 80 81 82 83
private:
  Uint32 userPtr;
  Uint32 userRef;
  Uint32 reqInfo;
  Uint32 tableId;
  Uint32 noOfAttr;
  Uint32 fragId;
  Uint32 fragOff;
  Uint32 tableType;
  Uint32 primaryTableId;
84 85 86
  Uint32 tupIndexFragPtrI;
  Uint32 tupTableFragPtrI[2];
  Uint32 accTableFragPtrI[2];
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
};

class TuxFragConf {
  friend class Dblqh;
  friend class Dbtux;
public:
  STATIC_CONST( SignalLength = 4 );
private:
  Uint32 userPtr;
  Uint32 tuxConnectPtr;
  Uint32 fragPtr;
  Uint32 fragId;
};

class TuxFragRef {
  friend class Dblqh;
  friend class Dbtux;
public:
  STATIC_CONST( SignalLength = 2 );
  enum ErrorCode {
    NoError = 0,
108 109 110
    InvalidRequest = 903,
    NoFreeFragment = 904,
    NoFreeAttributes = 905
111 112 113 114 115 116 117 118 119 120 121 122
  };
private:
  Uint32 userPtr;
  Uint32 errorCode;
};

// TUP: add attribute

class TupAddAttrReq {
  friend class Dblqh;
  friend class Dbtux;
public:
unknown's avatar
unknown committed
123
  STATIC_CONST( SignalLength = 5 );
124 125 126 127 128
private:
  Uint32 tupConnectPtr;
  Uint32 notused1;
  Uint32 attrId;
  Uint32 attrDescriptor;
unknown's avatar
unknown committed
129
  Uint32 extTypeInfo;
130 131 132 133 134 135
};

class TupAddAttrConf {
  friend class Dblqh;
  friend class Dbtup;
public:
136
  STATIC_CONST( SignalLength = 2 );
137 138
private:
  Uint32 userPtr;
139
  Uint32 lastAttr; // bool: got last attr and closed frag op
140 141 142 143 144 145 146
};

class TupAddAttrRef {
  friend class Dblqh;
  friend class Dbtup;
public:
  STATIC_CONST( SignalLength = 2 );
unknown's avatar
unknown committed
147 148
  enum ErrorCode {
    NoError = 0,
149
    InvalidCharset = 743,
150 151
    TooManyBitsUsed = 831,
    UnsupportedType = 906
unknown's avatar
unknown committed
152
  };
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
private:
  Uint32 userPtr;
  Uint32 errorCode;
};

// TUX: add attribute

class TuxAddAttrReq {
  friend class Dblqh;
  friend class Dbtux;
public:
  STATIC_CONST( SignalLength = 6 );
private:
  Uint32 tuxConnectPtr;
  Uint32 notused1;
  Uint32 attrId;
  Uint32 attrDescriptor;
  Uint32 extTypeInfo;
  Uint32 primaryAttrId;
};

class TuxAddAttrConf {
  friend class Dblqh;
  friend class Dbtux;
public:
178
  STATIC_CONST( SignalLength = 2 );
179 180
private:
  Uint32 userPtr;
181
  Uint32 lastAttr; // bool: got last attr and closed frag op
182 183 184 185 186 187 188 189 190
};

class TuxAddAttrRef {
  friend class Dblqh;
  friend class Dbtux;
public:
  STATIC_CONST( SignalLength = 2 );
  enum ErrorCode {
    NoError = 0,
191 192 193
    InvalidAttributeType = 906,
    InvalidCharset = 907,
    InvalidNodeSize = 908
194 195 196 197 198 199 200
  };
private:
  Uint32 userPtr;
  Uint32 errorCode;
};

#endif