1 /*
2    Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
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, version 2.0,
6    as published by the Free Software Foundation.
7 
8    This program is also distributed with certain software (including
9    but not limited to OpenSSL) that is licensed under separate terms,
10    as designated in a particular file or component or in included license
11    documentation.  The authors of MySQL hereby grant you an additional
12    permission to link the program and your derivative works with the
13    separately licensed software that they have included with MySQL.
14 
15    This program is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18    GNU General Public License, version 2.0, for more details.
19 
20    You should have received a copy of the GNU General Public License
21    along with this program; if not, write to the Free Software
22    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
23 */
24 
25 #ifndef CREATE_TABLE_HPP
26 #define CREATE_TABLE_HPP
27 
28 #include "SignalData.hpp"
29 
30 struct CreateTableReq {
31   STATIC_CONST( SignalLength = 5 );
32 
33   union { Uint32 clientRef, senderRef; };
34   union { Uint32 clientData, senderData; };
35   Uint32 requestInfo;
36   Uint32 transId;
37   Uint32 transKey;
38 
39   SECTION( DICT_TAB_INFO = 0 );
40 };
41 
42 struct CreateTableConf {
43   STATIC_CONST( SignalLength = 5 );
44 
45   Uint32 senderRef;
46   union { Uint32 clientData, senderData; };
47   Uint32 transId;
48   Uint32 tableId;
49   Uint32 tableVersion;
50 };
51 
52 struct CreateTableRef {
53   STATIC_CONST( SignalLength = 9 );
54 
55   enum ErrorCode {
56     NoError = 0,
57     Busy = 701,
58     BusyWithNR = 711,
59     NotMaster = 702,
60     TooManySchemaOps = 783,     //wl3600_todo move the 3 to DictSignal.hpp
61     InvalidTransKey = 781,
62     InvalidTransId = 782,
63     InvalidFormat = 703,
64     AttributeNameTooLong = 704,
65     TableNameTooLong = 705,
66     Inconsistency = 706,
67     NoMoreTableRecords = 707,
68     NoMoreAttributeRecords = 708,
69     AttributeNameTwice = 720,
70     TableAlreadyExist = 721,
71     InvalidArraySize = 736,
72     ArraySizeTooBig = 737,
73     RecordTooBig = 738,
74     InvalidPrimaryKeySize  = 739,
75     NullablePrimaryKey = 740,
76     InvalidCharset = 743,
77     SingleUser = 299,
78     InvalidTablespace = 755,
79     VarsizeBitfieldNotSupported = 757,
80     NotATablespace = 758,
81     InvalidTablespaceVersion = 759,
82     OutOfStringBuffer = 773,
83     NoLoggingTemporaryTable = 778,
84     InvalidHashMap = 790,
85     TableDefinitionTooBig = 793,
86     FeatureRequiresUpgrade = 794
87   };
88 
89   Uint32 senderRef;
90   union { Uint32 clientData, senderData; };
91   Uint32 transId;
92   Uint32 errorCode;
93   Uint32 errorLine;
94   Uint32 errorNodeId;
95   Uint32 masterNodeId;
96   Uint32 errorStatus;
97   Uint32 errorKey;
98 
99   //wl3600_todo out
getErrorCodeCreateTableRef100   Uint32 getErrorCode() const {
101     return errorCode;
102   }
getErrorLineCreateTableRef103   Uint32 getErrorLine() const {
104     return errorLine;
105   }
106 };
107 
108 #endif
109