1 /*
2    Copyright (C) 2003, 2005-2008 MySQL AB
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, version 2.0,
7    as published by the Free Software Foundation.
8 
9    This program is also distributed with certain software (including
10    but not limited to OpenSSL) that is licensed under separate terms,
11    as designated in a particular file or component or in included license
12    documentation.  The authors of MySQL hereby grant you an additional
13    permission to link the program and your derivative works with the
14    separately licensed software that they have included with MySQL.
15 
16    This program is distributed in the hope that it will be useful,
17    but WITHOUT ANY WARRANTY; without even the implied warranty of
18    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19    GNU General Public License, version 2.0, for more details.
20 
21    You should have received a copy of the GNU General Public License
22    along with this program; if not, write to the Free Software
23    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
24 */
25 
26 #ifndef CREATE_TAB_HPP
27 #define CREATE_TAB_HPP
28 
29 #include "SignalData.hpp"
30 
31 struct CreateTabReq
32 {
33   STATIC_CONST( SignalLength = 6 );
34   STATIC_CONST( SignalLengthLDM = 6 + 11 );
35 
36   enum RequestType {
37   };
38 
39   Uint32 senderRef;
40   Uint32 senderData;
41   Uint32 tableId;
42   Uint32 tableVersion;
43   Uint32 requestType;
44   Uint32 gci;
45 
46   /**
47    * Used when sending to LQH++
48    */
49   Uint32 noOfCharsets;
50   Uint32 tableType;           // DictTabInfo::TableType
51   Uint32 primaryTableId;      // table of index or RNIL
52   Uint32 tablespace_id;       // RNIL for MM table
53   Uint32 forceVarPartFlag;
54   Uint32 noOfAttributes;
55   Uint32 noOfNullAttributes;
56   Uint32 noOfKeyAttr;
57   Uint32 checksumIndicator;
58   Uint32 GCPIndicator;
59   Uint32 extraRowAuthorBits;
60 
61   SECTION( DICT_TAB_INFO = 0 );
62   SECTION( FRAGMENTATION = 1 );
63 };
64 
65 struct CreateTabConf {
66   STATIC_CONST( SignalLength = 3 );
67 
68   Uint32 senderRef;
69   Uint32 senderData;
70 
71   union {
72     Uint32 lqhConnectPtr;
73     Uint32 tuxConnectPtr;
74     Uint32 tupConnectPtr;
75   };
76 };
77 
78 struct CreateTabRef {
79   STATIC_CONST( SignalLength = 6 );
80 
81   Uint32 senderRef;
82   Uint32 senderData;
83   Uint32 errorCode;
84   Uint32 errorLine;
85   Uint32 errorKey;
86   Uint32 errorStatus;
87 };
88 
89 /**
90  * TcSchVerReq is CreateTab but towards TC...
91  *   should be removed in favor of CreateTab
92  */
93 struct TcSchVerReq
94 {
95   Uint32 tableId;
96   Uint32 tableVersion;
97   Uint32 tableLogged;
98   Uint32 senderRef;
99   Uint32 tableType;
100   Uint32 senderData;
101   Uint32 noOfPrimaryKeys;
102   Uint32 singleUserMode;
103   Uint32 userDefinedPartition;
104   STATIC_CONST( SignalLength = 9 );
105 };
106 
107 struct TcSchVerConf
108 {
109   Uint32 senderRef;
110   Uint32 senderData;
111   STATIC_CONST( SignalLength = 2 );
112 };
113 
114 #endif
115