MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GetTabInfo.hpp
1 /*
2  Copyright (C) 2003, 2005-2007 MySQL AB, 2009 Sun Microsystems, Inc.
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 GET_INFO_TAB_HPP
20 #define GET_INFO_TAB_HPP
21 
22 #include "SignalData.hpp"
23 
33  // Blocks
34  friend class Dbdict;
35  friend class Backup;
36  friend class Trix;
37  friend class DbUtil;
38  // API
39  friend class Table;
40 
41  friend bool printGET_TABINFO_REQ(FILE *, const Uint32 *, Uint32, Uint16);
42 public:
43  STATIC_CONST( SignalLength = 5 );
44 public:
45  Uint32 senderData;
46  Uint32 senderRef;
47  Uint32 requestType; // Bitmask of GetTabInfoReq::RequestType
48  union {
49  Uint32 tableId;
50  Uint32 tableNameLen;
51  };
52  Uint32 schemaTransId; // To see own schema trans
53 
54  enum RequestType {
55  RequestById = 0,
56  RequestByName = 1,
57  LongSignalConf = 2
58  };
59  SECTION( TABLE_NAME = 0 );
60 };
61 
66  // Blocks
67  friend class Dbdict;
68  friend class Backup;
69  friend class Trix;
70  friend class DbUtil;
71  // API
72  friend class Table;
73 
74  friend bool printGET_TABINFO_REF(FILE *, const Uint32 *, Uint32, Uint16);
75 public:
76  STATIC_CONST( SignalLength = 7 );
77  /* 6.3 <-> 7.0 upgrade code */
78  STATIC_CONST( OriginalSignalLength = 5 );
79  STATIC_CONST( OriginalErrorOffset = 4 );
80 public:
81  Uint32 senderData;
82  Uint32 senderRef;
83  Uint32 requestType; // Bitmask of GetTabInfoReq::RequestType
84  union {
85  Uint32 tableId;
86  Uint32 tableNameLen;
87  };
88  Uint32 schemaTransId;
89  Uint32 errorCode;
90  Uint32 errorLine;
91 
92  enum ErrorCode {
93  InvalidTableId = 709,
94  TableNotDefined = 723,
95  TableNameTooLong = 702,
96  NoFetchByName = 710,
97  Busy = 701
98  };
99 };
100 
105  // Blocks
106  friend class Dbdict;
107  friend class Backup;
108  friend class Trix;
109  friend class DbUtil;
110  friend class Suma;
111  // API
112  friend class Table;
113 
114  friend bool printGET_TABINFO_CONF(FILE *, const Uint32 *, Uint32, Uint16);
115 public:
116  STATIC_CONST( SignalLength = 6 );
117 
118  SECTION( DICT_TAB_INFO = 0 );
119 public:
120  Uint32 senderData;
121  Uint32 tableId;
122  union {
123  Uint32 gci; // For table
124  Uint32 freeWordsHi; // for logfile group m_free_file_words
125  };
126  union {
127  Uint32 totalLen; // In words
128  Uint32 freeExtents;
129  Uint32 freeWordsLo; // for logfile group m_free_file_words
130  };
131  Uint32 tableType;
132  Uint32 senderRef;
133 };
134 
135 #endif