1 /* Copyright (c) 2003, 2013, 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, version 2.0,
5    as published by the Free Software Foundation.
6 
7    This program is also distributed with certain software (including
8    but not limited to OpenSSL) that is licensed under separate terms,
9    as designated in a particular file or component or in included license
10    documentation.  The authors of MySQL hereby grant you an additional
11    permission to link the program and your derivative works with the
12    separately licensed software that they have included with MySQL.
13 
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License, version 2.0, for more details.
18 
19    You should have received a copy of the GNU General Public License
20    along with this program; if not, write to the Free Software
21    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
22 
23 #ifndef INDEX_STAT_SIGNAL_DATA_HPP
24 #define INDEX_STAT_SIGNAL_DATA_HPP
25 
26 #include "SignalData.hpp"
27 
28 #define JAM_FILE_ID 193
29 
30 
31 struct IndexStatReq {
32   enum RequestType {
33     // update
34     RT_UPDATE_STAT = 1,
35     RT_CLEAN_NEW = 2,
36     RT_SCAN_FRAG = 3,
37     RT_CLEAN_OLD = 4,
38     RT_START_MON = 5,
39     // delete
40     RT_DELETE_STAT = 6,
41     RT_STOP_MON = 7,
42     RT_DROP_HEAD = 8,
43     RT_CLEAN_ALL = 9
44   };
45   STATIC_CONST( SignalLength = 9 );
46   Uint32 clientRef;
47   Uint32 clientData;
48   Uint32 transId;
49   Uint32 transKey;
50   Uint32 requestInfo;
51   Uint32 requestFlag;
52   Uint32 indexId;
53   Uint32 indexVersion;
54   Uint32 tableId;
55 };
56 
57 struct IndexStatImplReq {
58   STATIC_CONST( SignalLength = 10 );
59   Uint32 senderRef;
60   Uint32 senderData;
61   Uint32 transId;
62   Uint32 requestType;
63   Uint32 requestFlag;
64   Uint32 indexId;
65   Uint32 indexVersion;
66   Uint32 tableId;
67   Uint32 fragId;
68   Uint32 fragCount;
69 };
70 
71 struct IndexStatConf {
72   STATIC_CONST( SignalLength = 3 );
73   Uint32 senderRef;
74   union { Uint32 senderData; Uint32 clientData; };
75   Uint32 transId;
76 };
77 
78 struct IndexStatImplConf {
79   STATIC_CONST( SignalLength = 2 );
80   Uint32 senderRef;
81   Uint32 senderData;
82 };
83 
84 struct IndexStatRef {
85   enum ErrorCode {
86     Busy = 701,
87     NotMaster = 702,
88     InvalidIndex = 913,
89     InvalidRequest = 914,
90     NoFreeStatOp = 915,
91     InvalidSysTable = 916,
92     InvalidSysTableData = 917,
93     BusyUtilPrepare = 918,
94     BusyUtilExecute = 919
95   };
96   STATIC_CONST( SignalLength = 7 );
97   Uint32 senderRef;
98   union { Uint32 senderData; Uint32 clientData; };
99   Uint32 transId;
100   Uint32 errorCode;
101   Uint32 errorLine;
102   Uint32 errorNodeId;
103   Uint32 masterNodeId;
104 };
105 
106 struct IndexStatImplRef {
107   STATIC_CONST( SignalLength = 4 );
108   Uint32 senderRef;
109   Uint32 senderData;
110   Uint32 errorCode;
111   Uint32 errorLine;
112 };
113 
114 struct IndexStatRep {
115   enum RequestType {
116     RT_UPDATE_REQ = 1,  // TUX->DICT request stats update
117     RT_UPDATE_CONF = 2  // TRIX->TUX report stats update
118   };
119   STATIC_CONST( SignalLength = 9 );
120   Uint32 senderRef;
121   Uint32 senderData;
122   Uint32 requestType;
123   Uint32 requestFlag;
124   Uint32 indexId;
125   Uint32 indexVersion;
126   Uint32 tableId;
127   Uint32 fragId;
128   Uint32 loadTime;
129 };
130 
131 
132 #undef JAM_FILE_ID
133 
134 #endif
135