MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SchemaTrans.hpp
1 /* Copyright (C) 2007, 2008 MySQL AB, 2008 Sun Microsystems, Inc.
2  All rights reserved. Use is subject to license terms.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; version 2 of the License.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
16 
17 #ifndef SCHEMA_TRANS_HPP
18 #define SCHEMA_TRANS_HPP
19 
20 #include "SignalData.hpp"
21 
22 // begin
23 
25  STATIC_CONST( SignalLength = 3 );
26  Uint32 clientRef;
27  Uint32 transId;
28  Uint32 requestInfo;
29 };
30 
32  STATIC_CONST( SignalLength = 3 );
33  Uint32 senderRef;
34  Uint32 transId;
35  Uint32 transKey;
36 };
37 
39  STATIC_CONST( SignalLength = 6 );
40  enum ErrorCode {
41  NoError = 0,
42  NotMaster = 702,
43  Busy = 701,
44  BusyWithNR = 711,
45  TooManySchemaTrans = 780,
46  IncompatibleVersions = 763,
47  Nodefailure = 786
48  };
49  Uint32 senderRef;
50  Uint32 transId;
51  Uint32 errorCode;
52  Uint32 errorLine;
53  Uint32 errorNodeId;
54  Uint32 masterNodeId;
55 };
56 
57 // commit, abort
58 
60  // must match NdbDictionary::Dictionary::SchemaTransFlag
61  enum Flag {
62  SchemaTransAbort = 1,
63  SchemaTransBackground = 2,
64  SchemaTransPrepare = 4 // Only run prepare
65  };
66  STATIC_CONST( SignalLength = 5 );
67  Uint32 clientRef;
68  Uint32 transId;
69  Uint32 requestInfo;
70  Uint32 transKey;
71  Uint32 flags;
72 };
73 
75  STATIC_CONST( SignalLength = 2 );
76  Uint32 senderRef;
77  Uint32 transId;
78 };
79 
81  enum ErrorCode {
82  NoError = 0,
83  NotMaster = 702,
84  InvalidTransKey = 781,
85  InvalidTransId = 782,
86  InvalidTransState = 784
87  };
88  STATIC_CONST( SignalLength = 6 );
89  Uint32 senderRef;
90  Uint32 transId;
91  Uint32 errorCode;
92  Uint32 errorLine;
93  Uint32 errorNodeId;
94  Uint32 masterNodeId;
95 };
96 
98  enum ErrorCode {
99  NoError = 0,
100  TransAborted = 787
101  };
102  STATIC_CONST( SignalLength = 6 );
103  Uint32 senderRef;
104  Uint32 transId;
105  Uint32 errorCode;
106  Uint32 errorLine;
107  Uint32 errorNodeId;
108  Uint32 masterNodeId;
109 };
110 
111 #endif