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 DUMP_STATE_ORD_HPP
26 #define DUMP_STATE_ORD_HPP
27 
28 #include "SignalData.hpp"
29 
30 /**
31  * DumpStateOrd is sent by the mgmtsrvr to CMVMI.
32  * CMVMI the redirect the signal to all blocks.
33  *
34  * The implementation of the DumpStateOrd should dump state information
35  * (typically using the infoEvent-function)
36  */
37 class DumpStateOrd {
38   /**
39    * Sender/Reciver
40    */
41   friend class Cmvmi;
42 
43   /**
44    * Sender(s)
45    */
46   friend class MgmtSrvr;
47 
48   /**
49    * Reciver(s)
50    */
51   friend class Dbacc;
52   friend class Dblqh;
53   friend class Dbtup;
54   friend class Dbtc;
55   friend class Ndbcntr;
56   friend class Qmgr;
57   friend class Dbdih;
58   friend class Dbdict;
59   friend class Ndbfs;
60 
61 public:
62   enum DumpStateType {
63     /* any dumps above this value should go to one block only */
64     OneBlockOnly = 100000,
65 
66     _BackupMin   = 100000,
67     BackupStatus = 100000,
68     _BackupMax   = 100999,
69 
70     _TCMin       = 101000,
71     _TCMax       = 101999,
72 
73     _LQHMin = 102000,
74     LQHLogFileInitStatus = 102000,
75     _LQHMax = 102999,
76 
77     // 1 QMGR Dump information about phase 1 variables
78     // 13 CMVMI Dump signal counter
79     // 13 NDBCNTR Dump start phase information
80     // 13 NDBCNTR_REF  Dump start phase information
81     CommitAckMarkersSize = 14, // TC+LQH Dump free size in commitAckMarkerP
82     CommitAckMarkersDump = 15, // TC+LQH Dump info in commitAckMarkerPool
83     DihDumpNodeRestartInfo = 16, // 16 DIH Dump node restart info
84     DihDumpNodeStatusInfo = 17,// 17 DIH Dump node status info
85     DihPrintFragmentation = 18,// 18 DIH Print fragmentation
86     // 19 NDBFS Fipple with O_SYNC, O_CREATE etc.
87     // 20-24 BACKUP
88     NdbcntrTestStopOnError = 25,
89     NdbcntrStopNodes = 70,
90     // 100-105 TUP and ACC
91     // 200-240 UTIL
92     // 300-305 TRIX
93     QmgrErr935 = 935,
94     NdbfsDumpFileStat = 400,
95     NdbfsDumpAllFiles = 401,
96     NdbfsDumpOpenFiles = 402,
97     NdbfsDumpIdleFiles = 403,
98     CmvmiSchedulerExecutionTimer = 502,
99     CmvmiRealtimeScheduler = 503,
100     CmvmiExecuteLockCPU = 504,
101     CmvmiMaintLockCPU = 505,
102     CmvmiSchedulerSpinTimer = 506,
103     // 1222-1225 DICT
104     LqhDumpAllDefinedTabs = 1332,
105     LqhDumpNoLogPages = 1333,
106     LqhDumpOneScanRec = 2300,
107     LqhDumpAllScanRec = 2301,
108     LqhDumpAllActiveScanRec = 2302,
109     LqhDumpLcpState = 2303,
110     LqhErrorInsert5042 = 2315,
111 
112     AccDumpOneScanRec = 2400,
113     AccDumpAllScanRec = 2401,
114     AccDumpAllActiveScanRec = 2402,
115     AccDumpOneOperationRec = 2403,
116     AccDumpNumOpRecs = 2404,
117     AccDumpFreeOpRecs = 2405,
118     AccDumpNotFreeOpRecs = 2406,
119     DumpPageMemory = 1000, // Acc & TUP
120     TcDumpAllScanFragRec = 2500,
121     TcDumpOneScanFragRec = 2501,
122     TcDumpAllScanRec = 2502,
123     TcDumpAllActiveScanRec = 2503,
124     TcDumpOneScanRec = 2504,
125     TcDumpOneApiConnectRec = 2505,
126     TcDumpAllApiConnectRec = 2506,
127     TcSetTransactionTimeout = 2507,
128     TcSetApplTransactionTimeout = 2508,
129     TcStartDumpIndexOpCount = 2512,
130     TcDumpIndexOpCount = 2513,
131     CmvmiDumpConnections = 2600,
132     CmvmiDumpLongSignalMemory = 2601,
133     CmvmiSetRestartOnErrorInsert = 2602,
134     CmvmiTestLongSigWithDelay = 2603,
135     CmvmiDumpSubscriptions = 2604, /* note: done to respective outfile
136                                       to be able to debug if events
137                                       for some reason does not end up
138                                       in clusterlog */
139     CmvmiTestLongSig = 2605,  /* Long signal testing trigger */
140     DumpEventLog = 2606,
141     LCPContinue = 5900,
142     // 7000 DIH
143     // 7001 DIH
144     // 7002 DIH
145     // 7003 DIH
146     // 7004 DIH
147     // 7005 DIH
148     // 7006 DIH
149     // 7006 DIH
150     // 7007 DIH
151     // 7008 DIH
152     // 7009 DIH
153     // 7010 DIH
154     // 7011 DIH
155     // 7012 DIH
156     DihDumpLCPState= 7013,
157     DihDumpLCPMasterTakeOver = 7014,
158     // 7015 DIH
159     DihAllAllowNodeStart = 7016,
160     DihMinTimeBetweenLCP = 7017,
161     DihMaxTimeBetweenLCP = 7018,
162     // 7019
163     // 7020
164     // 7021
165     EnableUndoDelayDataWrite = 7080, // DIH+ACC+TUP
166     DihSetTimeBetweenGcp = 7090,
167     DihStartLcpImmediately = 7099,
168     // 8000 Suma
169     // 12000 Tux
170     TuxLogToFile = 12001,
171     TuxSetLogFlags = 12002,
172     TuxMetaDataJunk = 12009,
173 
174     DumpTsman = 9800,
175     DumpLgman = 10000,
176     DumpPgman = 11000,
177     DumpBackup = 13000,
178     DumpBackupSetCompressed = 13001,
179     DumpBackupSetCompressedLCP = 13002,
180     BackupErrorInsert = 13003,
181 
182     DumpDbinfo = 14000,
183     DbinfoListTables = 14001,
184     DbinfoListColumns = 14002,
185     DbinfoScanTable = 14003,
186 
187     SchemaResourceSnapshot = 4000, // Save resource consumption
188     SchemaResourceCheckLeak = 4001 // check same as snapshot
189   };
190 public:
191 
192   Uint32 args[25];          // Generic argument
193 };
194 
195 #endif
196