MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TuxMaint.hpp
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 #ifndef TUX_MAINT_HPP
20 #define TUX_MAINT_HPP
21 
22 #include "SignalData.hpp"
23 
24 /*
25  * Ordered index maintenance operation.
26  */
27 
28 class TuxMaintReq {
29  friend class Dbtup;
30  friend class Dbtux;
31  friend bool printTUX_MAINT_REQ(FILE*, const Uint32*, Uint32, Uint16);
32 public:
33  enum OpCode { // first byte of opInfo
34  OpAdd = 1,
35  OpRemove = 2
36  };
37  enum OpFlag { // second byte of opInfo
38  };
39  enum ErrorCode {
40  NoError = 0, // must be zero
41  SearchError = 901, // add + found or remove + not found
42  NoMemError = 902
43  };
44  STATIC_CONST( SignalLength = 8 );
45 
46  /*
47  * Error code set by TUX. Zero means no error.
48  */
49  Uint32 errorCode;
50  /*
51  * Table, index, fragment.
52  */
53  Uint32 tableId;
54  Uint32 indexId;
55  Uint32 fragId;
56  /*
57  * Tuple version identified by physical address of "original" tuple
58  * and version number.
59  */
60  Uint32 pageId;
61  Uint32 pageIndex;
62  Uint32 tupVersion;
63  /*
64  * Operation code and flags.
65  */
66  Uint32 opInfo;
67 
68  Uint32 tupFragPtrI;
69  Uint32 fragPageId;
70 };
71 
72 #endif