~michaeleguo/ubuntu/trusty/percona-xtradb-cluster-5.5/arm64fix

« back to all changes in this revision

Viewing changes to storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-10 14:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20140210144423-f2134l2gxuvq2m6l
Tags: upstream-5.5.34-25.9+dfsg
ImportĀ upstreamĀ versionĀ 5.5.34-25.9+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2003 MySQL AB
 
2
 
 
3
   This program is free software; you can redistribute it and/or modify
 
4
   it under the terms of the GNU General Public License as published by
 
5
   the Free Software Foundation; version 2 of the License.
 
6
 
 
7
   This program is distributed in the hope that it will be useful,
 
8
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
   GNU General Public License for more details.
 
11
 
 
12
   You should have received a copy of the GNU General Public License
 
13
   along with this program; if not, write to the Free Software
 
14
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA */
 
15
 
 
16
#ifndef CREATE_FILEGROUP_IMPL_HPP
 
17
#define CREATE_FILEGROUP_IMPL_HPP
 
18
 
 
19
#include "SignalData.hpp"
 
20
 
 
21
struct CreateFilegroupImplReq {
 
22
  /**
 
23
   * Sender(s) / Reciver(s)
 
24
   */
 
25
  friend class Dbdict;
 
26
  friend class Tsman;
 
27
  friend class Lgman;
 
28
 
 
29
  /**
 
30
   * For printing
 
31
   */
 
32
  friend bool printCREATE_FILEGROUP_IMPL_REQ(FILE*, const Uint32*, Uint32, Uint16);
 
33
  
 
34
  STATIC_CONST( TablespaceLength = 6 );
 
35
  STATIC_CONST( LogfileGroupLength = 5 );
 
36
  
 
37
  Uint32 senderData;
 
38
  Uint32 senderRef;  
 
39
  Uint32 filegroup_id;
 
40
  Uint32 filegroup_version;
 
41
  
 
42
  union {
 
43
    struct {
 
44
      Uint32 extent_size;
 
45
      Uint32 logfile_group_id;
 
46
    } tablespace;
 
47
    struct {
 
48
      Uint32 buffer_size; // In pages
 
49
    } logfile_group;
 
50
  };
 
51
};
 
52
 
 
53
struct CreateFilegroupImplRef {
 
54
  /**
 
55
   * Sender(s)
 
56
   */
 
57
  friend class Dbdict;
 
58
  friend class Tsman;
 
59
  friend class Lgman;
 
60
  
 
61
  /**
 
62
   * For printing
 
63
   */
 
64
  friend bool printCREATE_FILEGROUP_IMPL_REF(FILE*, const Uint32*, Uint32, Uint16);
 
65
  
 
66
  STATIC_CONST( SignalLength = 3 );
 
67
 
 
68
  enum ErrorCode {
 
69
    NoError = 0,
 
70
    FilegroupAlreadyExists = 1502,
 
71
    OutOfFilegroupRecords = 1503,
 
72
    OutOfLogBufferMemory = 1504,
 
73
    OneLogfileGroupLimit = 1514
 
74
  };
 
75
  
 
76
  Uint32 senderData;
 
77
  Uint32 senderRef;
 
78
  Uint32 errorCode;
 
79
};
 
80
 
 
81
struct CreateFilegroupImplConf {
 
82
  /**
 
83
   * Sender(s)
 
84
   */
 
85
  friend class Dbdict;
 
86
  friend class Tsman;
 
87
  friend class Lgman;
 
88
  
 
89
  /**
 
90
   * For printing
 
91
   */
 
92
  friend bool printCREATE_FILEGROUP_IMPL_CONF(FILE*, const Uint32*, Uint32, Uint16);
 
93
  
 
94
  STATIC_CONST( SignalLength = 2 );
 
95
 
 
96
  Uint32 senderData;
 
97
  Uint32 senderRef;
 
98
};
 
99
 
 
100
struct CreateFileImplReq {
 
101
  /**
 
102
   * Sender(s) / Reciver(s)
 
103
   */
 
104
  friend class Dbdict;
 
105
  friend class Tsman;
 
106
  friend class Lgman;
 
107
 
 
108
  /**
 
109
   * For printing
 
110
   */
 
111
  friend bool printCREATE_FILE_IMPL_REQ(FILE*, const Uint32*, Uint32, Uint16);
 
112
  
 
113
  STATIC_CONST( DatafileLength = 9 );
 
114
  STATIC_CONST( UndofileLength = 8 );
 
115
  STATIC_CONST( CommitLength = 6 );
 
116
  STATIC_CONST( AbortLength = 6 );
 
117
  SECTION( FILENAME = 0 );
 
118
  
 
119
  enum RequestInfo {
 
120
    Create = 0x1,
 
121
    CreateForce = 0x2,
 
122
    Open = 0x4,
 
123
    Commit = 0x8,
 
124
    Abort = 0x10
 
125
  };
 
126
  
 
127
  Uint32 senderData;
 
128
  Uint32 senderRef;
 
129
 
 
130
  Uint32 requestInfo;
 
131
  Uint32 file_id;
 
132
  Uint32 filegroup_id;
 
133
  Uint32 filegroup_version;
 
134
  Uint32 file_size_hi;
 
135
  Uint32 file_size_lo;
 
136
 
 
137
  union {
 
138
    struct {
 
139
      Uint32 extent_size;
 
140
    } tablespace;
 
141
  };
 
142
};
 
143
 
 
144
struct CreateFileImplRef {
 
145
  friend class Dbdict;
 
146
  friend class Tsman;
 
147
  friend class Lgman;
 
148
  
 
149
  /**
 
150
   * For printing
 
151
   */
 
152
  friend bool printCREATE_FILE_IMPL_REF(FILE*, const Uint32*, Uint32, Uint16);
 
153
  
 
154
  STATIC_CONST( SignalLength = 5 );
 
155
 
 
156
  enum ErrorCode {
 
157
    NoError = 0,
 
158
    InvalidFilegroup = 1505,
 
159
    InvalidFilegroupVersion = 1506,
 
160
    FileNoAlreadyExists = 1507,
 
161
    OutOfFileRecords = 1508,
 
162
    FileError = 1509,
 
163
    InvalidFileMetadata = 1510,
 
164
    OutOfMemory = 1511,
 
165
    FileReadError = 1512,
 
166
    FilegroupNotOnline = 1513,
 
167
    FileSizeTooLarge = 1515
 
168
  };
 
169
  
 
170
  Uint32 senderData;
 
171
  Uint32 senderRef;
 
172
  Uint32 errorCode;
 
173
  Uint32 fsErrCode;
 
174
  Uint32 osErrCode;
 
175
};
 
176
 
 
177
struct CreateFileImplConf {
 
178
  friend class Dbdict;
 
179
  friend class Tsman;
 
180
  friend class Lgman;
 
181
  
 
182
  
 
183
  /**
 
184
   * For printing
 
185
   */
 
186
  friend bool printCREATE_FILE_IMPL_CONF(FILE*, const Uint32*, Uint32, Uint16);
 
187
  
 
188
  STATIC_CONST( SignalLength = 4 );
 
189
 
 
190
  Uint32 senderData;
 
191
  Uint32 senderRef;
 
192
};
 
193
 
 
194
#endif