MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CreateFilegroupImpl.hpp
1 /*
2  Copyright (C) 2005-2008 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 CREATE_FILEGROUP_IMPL_HPP
20 #define CREATE_FILEGROUP_IMPL_HPP
21 
22 #include "SignalData.hpp"
23 
28  friend class Dbdict;
29  friend class Tsman;
30  friend class Lgman;
31 
35  friend bool printCREATE_FILEGROUP_IMPL_REQ(FILE*, const Uint32*, Uint32, Uint16);
36 
37  STATIC_CONST( SignalLength = 5 ); // DICT2DICT
38  STATIC_CONST( TablespaceLength = 7 );
39  STATIC_CONST( LogfileGroupLength = 6 );
40 
41  Uint32 senderData;
42  Uint32 senderRef;
43  Uint32 filegroup_id;
44  Uint32 filegroup_version;
45  Uint32 requestType;
46 
47  union {
48  struct {
49  Uint32 extent_size;
50  Uint32 logfile_group_id;
51  } tablespace;
52  struct {
53  Uint32 buffer_size; // In pages
54  } logfile_group;
55  };
56 };
57 
62  friend class Dbdict;
63  friend class Tsman;
64  friend class Lgman;
65 
69  friend bool printCREATE_FILEGROUP_IMPL_REF(FILE*, const Uint32*, Uint32, Uint16);
70 
71  STATIC_CONST( SignalLength = 3 );
72 
73  enum ErrorCode {
74  NoError = 0,
75  FilegroupAlreadyExists = 1502,
76  OutOfFilegroupRecords = 1503,
77  OutOfLogBufferMemory = 1504,
78  OneLogfileGroupLimit = 1514
79  };
80 
81  Uint32 senderData;
82  Uint32 senderRef;
83  Uint32 errorCode;
84 };
85 
90  friend class Dbdict;
91  friend class Tsman;
92  friend class Lgman;
93 
97  friend bool printCREATE_FILEGROUP_IMPL_CONF(FILE*, const Uint32*, Uint32, Uint16);
98 
99  STATIC_CONST( SignalLength = 2 );
100 
101  Uint32 senderData;
102  Uint32 senderRef;
103 };
104 
109  friend class Dbdict;
110  friend class Tsman;
111  friend class Lgman;
112 
116  friend bool printCREATE_FILE_IMPL_REQ(FILE*, const Uint32*, Uint32, Uint16);
117 
118  STATIC_CONST( SignalLength = 11 ); // DICT2DICT
119  STATIC_CONST( DatafileLength = 10 );
120  STATIC_CONST( UndofileLength = 9 );
121  STATIC_CONST( CommitLength = 7 );
122  STATIC_CONST( AbortLength = 7 );
123  SECTION( FILENAME = 0 );
124 
125  enum RequestInfo {
126  Create = 0x1,
127  CreateForce = 0x2,
128  Open = 0x4,
129  Commit = 0x8,
130  Abort = 0x10
131  };
132 
133  Uint32 senderData;
134  Uint32 senderRef;
135  Uint32 requestInfo;
136  Uint32 file_id;
137  Uint32 file_version;
138  Uint32 filegroup_id;
139  Uint32 filegroup_version;
140  Uint32 file_size_hi;
141  Uint32 file_size_lo;
142 
143  union {
144  struct {
145  Uint32 extent_size;
146  } tablespace;
147  };
148  Uint32 requestType;
149 };
150 
152  friend class Dbdict;
153  friend class Tsman;
154  friend class Lgman;
155 
159  friend bool printCREATE_FILE_IMPL_REF(FILE*, const Uint32*, Uint32, Uint16);
160 
161  STATIC_CONST( SignalLength = 5 );
162 
163  enum ErrorCode {
164  NoError = 0,
165  InvalidFilegroup = 1505,
166  InvalidFilegroupVersion = 1506,
167  FileNoAlreadyExists = 1507,
168  OutOfFileRecords = 1508,
169  FileError = 1509,
170  InvalidFileMetadata = 1510,
171  OutOfMemory = 1511,
172  FileReadError = 1512,
173  FilegroupNotOnline = 1513,
174  FileSizeTooLarge = 1515,
175  FileSizeTooSmall = 1516
176  };
177 
178  Uint32 senderData;
179  Uint32 senderRef;
180  Uint32 errorCode;
181  Uint32 fsErrCode;
182  Uint32 osErrCode;
183 };
184 
186  friend class Dbdict;
187  friend class Tsman;
188  friend class Lgman;
189 
190 
194  friend bool printCREATE_FILE_IMPL_CONF(FILE*, const Uint32*, Uint32, Uint16);
195 
196  STATIC_CONST( SignalLength = 4 );
197 
198  Uint32 senderData;
199  Uint32 senderRef;
200 };
201 
202 #endif