MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SchemaTransImpl.hpp
1 /* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
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 SCHEMA_TRANS_IMPL_HPP
17 #define SCHEMA_TRANS_IMPL_HPP
18 
19 #include <Bitmask.hpp>
20 #include "SignalData.hpp"
21 #include "GlobalSignalNumbers.h"
22 
24 {
25  enum RequestType
26  {
27  RT_START = 0x0,
28  RT_PARSE = 0x1,
29  RT_FLUSH_PREPARE = 0x2,
30  RT_PREPARE = 0x3,
31  RT_ABORT_PARSE = 0x4,
32  RT_ABORT_PREPARE = 0x5,
33  RT_FLUSH_COMMIT = 0x6,
34  RT_COMMIT = 0x7,
35  RT_FLUSH_COMPLETE= 0x8,
36  RT_COMPLETE = 0x9,
37  RT_END = 0xa // release...
38  };
39 
40  STATIC_CONST( SignalLength = 8 );
41  STATIC_CONST( SignalLengthStart = 9 );
42  STATIC_CONST( GSN = GSN_SCHEMA_TRANS_IMPL_REQ );
43  Uint32 senderRef;
44  Uint32 transId;
45  Uint32 transKey;
46  Uint32 requestInfo; // request type | op extra | global flags | local flags
47  Uint32 opKey;
48  union {
49  struct {
50  Uint32 clientRef;
51  Uint32 objectId;
52  } start;
53  struct {
54  Uint32 gsn;
55  } parse;
56  };
57 };
58 
60 {
61  STATIC_CONST( SignalLength = 4 );
62  STATIC_CONST( GSN = GSN_SCHEMA_TRANS_IMPL_CONF );
63  Uint32 senderRef;
64  Uint32 transKey;
65  Uint32 opKey;
66  Uint32 requestType;
67 };
68 
70 {
71  STATIC_CONST( SignalLength = 8 );
72  STATIC_CONST( GSN = GSN_SCHEMA_TRANS_IMPL_REF );
73  enum ErrorCode {
74  NoError = 0,
75  NotMaster = 702,
76  TooManySchemaTrans = 780,
77  InvalidTransKey = 781,
78  InvalidTransId = 782,
79  TooManySchemaOps = 783,
80  SeizeFailed = 783,
81  InvalidTransState = 784,
82  NF_FakeErrorREF = 99
83  };
84  Uint32 senderRef;
85  union { Uint32 transKey, senderData; };
86  Uint32 opKey;
87  Uint32 requestType;
88  Uint32 errorCode;
89  Uint32 errorLine;
90  Uint32 errorNodeId;
91  Uint32 masterNodeId;
92 };
93 
94 #endif