MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DblqhInit.cpp
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 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 St, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 
19 #include <pc.hpp>
20 #define DBLQH_C
21 #include "Dblqh.hpp"
22 #include <ndb_limits.h>
23 #include "DblqhCommon.hpp"
24 
25 #define DEBUG(x) { ndbout << "LQH::" << x << endl; }
26 
27 void Dblqh::initData()
28 {
29 #ifdef ERROR_INSERT
30  c_master_node_id = RNIL;
31 #endif
32 
33  caddfragrecFileSize = ZADDFRAGREC_FILE_SIZE;
34  cgcprecFileSize = ZGCPREC_FILE_SIZE;
35  chostFileSize = MAX_NDB_NODES;
36  clcpFileSize = ZNO_CONCURRENT_LCP;
37  clfoFileSize = 0;
38  clogFileFileSize = 0;
39 
40  NdbLogPartInfo lpinfo(instance());
41  clogPartFileSize = lpinfo.partCount;
42 
43  cpageRefFileSize = ZPAGE_REF_FILE_SIZE;
44  cscanrecFileSize = 0;
45  ctabrecFileSize = 0;
46  ctcConnectrecFileSize = 0;
47  ctcNodeFailrecFileSize = MAX_NDB_NODES;
48  cTransactionDeadlockDetectionTimeout = 100;
49 
50  addFragRecord = 0;
51  gcpRecord = 0;
52  hostRecord = 0;
53  lcpRecord = 0;
54  logPartRecord = 0;
55  logFileRecord = 0;
56  logFileOperationRecord = 0;
57  logPageRecord = 0;
58  pageRefRecord = 0;
59  tablerec = 0;
60  tcConnectionrec = 0;
61  tcNodeFailRecord = 0;
62 
63  // Records with constant sizes
64 
65  cLqhTimeOutCount = 0;
66  cLqhTimeOutCheckCount = 0;
67  cbookedAccOps = 0;
68  cpackedListIndex = 0;
69  m_backup_ptr = RNIL;
70  clogFileSize = 16;
71  cmaxLogFilesInPageZero = 40;
72 
73  totalLogFiles = 0;
74  logFileInitDone = 0;
75  totallogMBytes = 0;
76  logMBytesInitDone = 0;
77  m_startup_report_frequency = 0;
78 
79  c_active_add_frag_ptr_i = RNIL;
80  for (Uint32 i = 0; i < 1024; i++) {
81  ctransidHash[i] = RNIL;
82  }//for
83 
84  c_last_force_lcp_time = 0;
85  c_free_mb_force_lcp_limit = 16;
86  c_free_mb_tail_problem_limit = 4;
87 
88  cTotalLqhKeyReqCount = 0;
89  c_max_redo_lag = 30; // seconds
90  c_max_redo_lag_counter = 3; // 3 strikes and you're out
91 
92  c_max_parallel_scans_per_frag = 32;
93 }//Dblqh::initData()
94 
95 void Dblqh::initRecords()
96 {
97  // Records with dynamic sizes
98  addFragRecord = (AddFragRecord*)allocRecord("AddFragRecord",
99  sizeof(AddFragRecord),
100  caddfragrecFileSize);
101 
102  gcpRecord = (GcpRecord*)allocRecord("GcpRecord",
103  sizeof(GcpRecord),
104  cgcprecFileSize);
105 
106  hostRecord = (HostRecord*)allocRecord("HostRecord",
107  sizeof(HostRecord),
108  chostFileSize);
109 
110  lcpRecord = (LcpRecord*)allocRecord("LcpRecord",
111  sizeof(LcpRecord),
112  clcpFileSize);
113 
114  for(Uint32 i = 0; i<clcpFileSize; i++){
115  new (&lcpRecord[i])LcpRecord();
116  }
117 
118  logPartRecord = (LogPartRecord*)allocRecord("LogPartRecord",
119  sizeof(LogPartRecord),
120  clogPartFileSize);
121 
122  logFileRecord = (LogFileRecord*)allocRecord("LogFileRecord",
123  sizeof(LogFileRecord),
124  clogFileFileSize);
125 
126  logFileOperationRecord = (LogFileOperationRecord*)
127  allocRecord("LogFileOperationRecord",
128  sizeof(LogFileOperationRecord),
129  clfoFileSize);
130 
131  {
132  AllocChunk chunks[16];
133  const Uint32 chunkcnt = allocChunks(chunks, 16, RG_FILE_BUFFERS,
134  clogPageFileSize, CFG_DB_REDO_BUFFER);
135 
136  {
137  Ptr<GlobalPage> pagePtr;
138  m_shared_page_pool.getPtr(pagePtr, chunks[0].ptrI);
139  logPageRecord = (LogPageRecord*)pagePtr.p;
140  }
141 
142  cfirstfreeLogPage = RNIL;
143  clogPageFileSize = 0;
144  clogPageCount = 0;
145  for (Int32 i = chunkcnt - 1; i >= 0; i--)
146  {
147  const Uint32 cnt = chunks[i].cnt;
148  ndbrequire(cnt != 0);
149 
150  Ptr<GlobalPage> pagePtr;
151  m_shared_page_pool.getPtr(pagePtr, chunks[i].ptrI);
152  LogPageRecord * base = (LogPageRecord*)pagePtr.p;
153  ndbrequire(base >= logPageRecord);
154  const Uint32 ptrI = Uint32(base - logPageRecord);
155 
156  for (Uint32 j = 0; j<cnt; j++)
157  {
159  base[j].logPageWord[ZNEXT_PAGE] = ptrI + j + 1;
160  base[j].logPageWord[ZPOS_IN_FREE_LIST]= 1;
161  base[j].logPageWord[ZPOS_IN_WRITING]= 0;
162  }
163 
164  base[cnt-1].logPageWord[ZNEXT_PAGE] = cfirstfreeLogPage;
165  cfirstfreeLogPage = ptrI;
166 
167  clogPageCount += cnt;
168  if (ptrI + cnt > clogPageFileSize)
169  clogPageFileSize = ptrI + cnt;
170  }
171  cnoOfLogPages = clogPageCount;
172  }
173 
174 #ifndef NO_REDO_PAGE_CACHE
175  m_redo_page_cache.m_pool.set((RedoCacheLogPageRecord*)logPageRecord,
176  clogPageFileSize);
177  m_redo_page_cache.m_hash.setSize(63);
178 
179  const Uint32 * base = (Uint32*)logPageRecord;
180  const RedoCacheLogPageRecord* tmp1 = (RedoCacheLogPageRecord*)logPageRecord;
181  ndbrequire(&base[ZPOS_PAGE_NO] == &tmp1->m_page_no);
182  ndbrequire(&base[ZPOS_PAGE_FILE_NO] == &tmp1->m_file_no);
183 #endif
184 
185 #ifndef NO_REDO_OPEN_FILE_CACHE
186  m_redo_open_file_cache.m_pool.set(logFileRecord, clogFileFileSize);
187 #endif
188 
189  pageRefRecord = (PageRefRecord*)allocRecord("PageRefRecord",
190  sizeof(PageRefRecord),
191  cpageRefFileSize);
192 
193  c_scanRecordPool.setSize(cscanrecFileSize);
194  c_scanTakeOverHash.setSize(64);
195 
196  tablerec = (Tablerec*)allocRecord("Tablerec",
197  sizeof(Tablerec),
198  ctabrecFileSize);
199 
200  tcConnectionrec = (TcConnectionrec*)allocRecord("TcConnectionrec",
201  sizeof(TcConnectionrec),
202  ctcConnectrecFileSize);
203 
204  m_commitAckMarkerPool.setSize(ctcConnectrecFileSize);
205  m_commitAckMarkerHash.setSize(1024);
206 
207  tcNodeFailRecord = (TcNodeFailRecord*)allocRecord("TcNodeFailRecord",
208  sizeof(TcNodeFailRecord),
209  ctcNodeFailrecFileSize);
210 
211  /*
212  ndbout << "FRAGREC SIZE = " << sizeof(Fragrecord) << endl;
213  ndbout << "TAB SIZE = " << sizeof(Tablerec) << endl;
214  ndbout << "GCP SIZE = " << sizeof(GcpRecord) << endl;
215  ndbout << "LCP SIZE = " << sizeof(LcpRecord) << endl;
216  ndbout << "LCPLOC SIZE = " << sizeof(LcpLocRecord) << endl;
217  ndbout << "LOGPART SIZE = " << sizeof(LogPartRecord) << endl;
218  ndbout << "LOGFILE SIZE = " << sizeof(LogFileRecord) << endl;
219  ndbout << "TC SIZE = " << sizeof(TcConnectionrec) << endl;
220  ndbout << "HOST SIZE = " << sizeof(HostRecord) << endl;
221  ndbout << "LFO SIZE = " << sizeof(LogFileOperationRecord) << endl;
222  ndbout << "PR SIZE = " << sizeof(PageRefRecord) << endl;
223  ndbout << "SCAN SIZE = " << sizeof(ScanRecord) << endl;
224 */
225 
226  // Initialize BAT for interface to file system
227  NewVARIABLE* bat = allocateBat(2);
228  bat[1].WA = &logPageRecord->logPageWord[0];
229  bat[1].nrr = clogPageFileSize;
230  bat[1].ClusterSize = sizeof(LogPageRecord);
231  bat[1].bits.q = ZTWOLOG_PAGE_SIZE;
232  bat[1].bits.v = 5;
233 }//Dblqh::initRecords()
234 
235 bool
236 Dblqh::getParam(const char* name, Uint32* count)
237 {
238  if (name != NULL && count != NULL)
239  {
240  /* FragmentInfoPool
241  * We increase the size of the fragment info pool
242  * to handle fragmented SCANFRAGREQ signals from
243  * TC
244  */
245  if (strcmp(name, "FragmentInfoPool") == 0)
246  {
247  /* Worst case is every TC block sending
248  * a single fragmented request concurrently
249  * This could change in future if TCs can
250  * interleave fragments from different
251  * requests
252  */
253  const Uint32 TC_BLOCKS_PER_NODE = 1;
254  *count= ((MAX_NDB_NODES -1) * TC_BLOCKS_PER_NODE) + 10;
255  return true;
256  }
257  }
258  return false;
259 }
260 
261 Dblqh::Dblqh(Block_context& ctx, Uint32 instanceNumber):
262  SimulatedBlock(DBLQH, ctx, instanceNumber),
263  m_reserved_scans(c_scanRecordPool),
264  c_lcp_waiting_fragments(c_fragment_pool),
265  c_lcp_restoring_fragments(c_fragment_pool),
266  c_lcp_complete_fragments(c_fragment_pool),
267  m_commitAckMarkerHash(m_commitAckMarkerPool),
268  c_scanTakeOverHash(c_scanRecordPool)
269 {
270  BLOCK_CONSTRUCTOR(Dblqh);
271 
272  addRecSignal(GSN_PACKED_SIGNAL, &Dblqh::execPACKED_SIGNAL);
273  addRecSignal(GSN_DEBUG_SIG, &Dblqh::execDEBUG_SIG);
274  addRecSignal(GSN_ATTRINFO, &Dblqh::execATTRINFO);
275  addRecSignal(GSN_KEYINFO, &Dblqh::execKEYINFO);
276  addRecSignal(GSN_LQHKEYREQ, &Dblqh::execLQHKEYREQ);
277  addRecSignal(GSN_LQHKEYREF, &Dblqh::execLQHKEYREF);
278  addRecSignal(GSN_COMMIT, &Dblqh::execCOMMIT);
279  addRecSignal(GSN_COMPLETE, &Dblqh::execCOMPLETE);
280  addRecSignal(GSN_LQHKEYCONF, &Dblqh::execLQHKEYCONF);
281 #ifdef VM_TRACE
282  addRecSignal(GSN_TESTSIG, &Dblqh::execTESTSIG);
283 #endif
284  addRecSignal(GSN_CONTINUEB, &Dblqh::execCONTINUEB);
285  addRecSignal(GSN_START_RECREQ, &Dblqh::execSTART_RECREQ);
286  addRecSignal(GSN_START_RECCONF, &Dblqh::execSTART_RECCONF);
287  addRecSignal(GSN_EXEC_FRAGREQ, &Dblqh::execEXEC_FRAGREQ);
288  addRecSignal(GSN_EXEC_FRAGCONF, &Dblqh::execEXEC_FRAGCONF);
289  addRecSignal(GSN_EXEC_FRAGREF, &Dblqh::execEXEC_FRAGREF);
290  addRecSignal(GSN_START_EXEC_SR, &Dblqh::execSTART_EXEC_SR);
291  addRecSignal(GSN_EXEC_SRREQ, &Dblqh::execEXEC_SRREQ);
292  addRecSignal(GSN_EXEC_SRCONF, &Dblqh::execEXEC_SRCONF);
293 
294  addRecSignal(GSN_ALTER_TAB_REQ, &Dblqh::execALTER_TAB_REQ);
295 
296  addRecSignal(GSN_SIGNAL_DROPPED_REP, &Dblqh::execSIGNAL_DROPPED_REP, true);
297 
298  // Trigger signals, transit to from TUP
299  addRecSignal(GSN_CREATE_TRIG_IMPL_REQ, &Dblqh::execCREATE_TRIG_IMPL_REQ);
300  addRecSignal(GSN_CREATE_TRIG_IMPL_CONF, &Dblqh::execCREATE_TRIG_IMPL_CONF);
301  addRecSignal(GSN_CREATE_TRIG_IMPL_REF, &Dblqh::execCREATE_TRIG_IMPL_REF);
302 
303  addRecSignal(GSN_DROP_TRIG_IMPL_REQ, &Dblqh::execDROP_TRIG_IMPL_REQ);
304  addRecSignal(GSN_DROP_TRIG_IMPL_CONF, &Dblqh::execDROP_TRIG_IMPL_CONF);
305  addRecSignal(GSN_DROP_TRIG_IMPL_REF, &Dblqh::execDROP_TRIG_IMPL_REF);
306 
307  addRecSignal(GSN_BUILD_INDX_IMPL_REF, &Dblqh::execBUILD_INDX_IMPL_REF);
308  addRecSignal(GSN_BUILD_INDX_IMPL_CONF, &Dblqh::execBUILD_INDX_IMPL_CONF);
309 
310  addRecSignal(GSN_DUMP_STATE_ORD, &Dblqh::execDUMP_STATE_ORD);
311  addRecSignal(GSN_NODE_FAILREP, &Dblqh::execNODE_FAILREP);
312  addRecSignal(GSN_CHECK_LCP_STOP, &Dblqh::execCHECK_LCP_STOP);
313  addRecSignal(GSN_SEND_PACKED, &Dblqh::execSEND_PACKED, true);
314  addRecSignal(GSN_TUP_ATTRINFO, &Dblqh::execTUP_ATTRINFO);
315  addRecSignal(GSN_READ_CONFIG_REQ, &Dblqh::execREAD_CONFIG_REQ, true);
316  addRecSignal(GSN_LQHFRAGREQ, &Dblqh::execLQHFRAGREQ);
317  addRecSignal(GSN_LQHADDATTREQ, &Dblqh::execLQHADDATTREQ);
318  addRecSignal(GSN_TUP_ADD_ATTCONF, &Dblqh::execTUP_ADD_ATTCONF);
319  addRecSignal(GSN_TUP_ADD_ATTRREF, &Dblqh::execTUP_ADD_ATTRREF);
320  addRecSignal(GSN_ACCFRAGCONF, &Dblqh::execACCFRAGCONF);
321  addRecSignal(GSN_ACCFRAGREF, &Dblqh::execACCFRAGREF);
322  addRecSignal(GSN_TUPFRAGCONF, &Dblqh::execTUPFRAGCONF);
323  addRecSignal(GSN_TUPFRAGREF, &Dblqh::execTUPFRAGREF);
324  addRecSignal(GSN_TAB_COMMITREQ, &Dblqh::execTAB_COMMITREQ);
325  addRecSignal(GSN_ACCSEIZECONF, &Dblqh::execACCSEIZECONF);
326  addRecSignal(GSN_ACCSEIZEREF, &Dblqh::execACCSEIZEREF);
327  addRecSignal(GSN_READ_NODESCONF, &Dblqh::execREAD_NODESCONF);
328  addRecSignal(GSN_READ_NODESREF, &Dblqh::execREAD_NODESREF);
329  addRecSignal(GSN_STTOR, &Dblqh::execSTTOR);
330  addRecSignal(GSN_NDB_STTOR, &Dblqh::execNDB_STTOR);
331  addRecSignal(GSN_TUPSEIZECONF, &Dblqh::execTUPSEIZECONF);
332  addRecSignal(GSN_TUPSEIZEREF, &Dblqh::execTUPSEIZEREF);
333  addRecSignal(GSN_ACCKEYCONF, &Dblqh::execACCKEYCONF);
334  addRecSignal(GSN_ACCKEYREF, &Dblqh::execACCKEYREF);
335  addRecSignal(GSN_TUPKEYCONF, &Dblqh::execTUPKEYCONF);
336  addRecSignal(GSN_TUPKEYREF, &Dblqh::execTUPKEYREF);
337  addRecSignal(GSN_ABORT, &Dblqh::execABORT);
338  addRecSignal(GSN_ABORTREQ, &Dblqh::execABORTREQ);
339  addRecSignal(GSN_COMMITREQ, &Dblqh::execCOMMITREQ);
340  addRecSignal(GSN_COMPLETEREQ, &Dblqh::execCOMPLETEREQ);
341 #ifdef VM_TRACE
342  addRecSignal(GSN_MEMCHECKREQ, &Dblqh::execMEMCHECKREQ);
343 #endif
344  addRecSignal(GSN_SCAN_FRAGREQ, &Dblqh::execSCAN_FRAGREQ);
345  addRecSignal(GSN_SCAN_NEXTREQ, &Dblqh::execSCAN_NEXTREQ);
346  addRecSignal(GSN_ACC_SCANCONF, &Dblqh::execACC_SCANCONF);
347  addRecSignal(GSN_ACC_SCANREF, &Dblqh::execACC_SCANREF);
348  addRecSignal(GSN_NEXT_SCANCONF, &Dblqh::execNEXT_SCANCONF);
349  addRecSignal(GSN_NEXT_SCANREF, &Dblqh::execNEXT_SCANREF);
350  addRecSignal(GSN_STORED_PROCCONF, &Dblqh::execSTORED_PROCCONF);
351  addRecSignal(GSN_STORED_PROCREF, &Dblqh::execSTORED_PROCREF);
352  addRecSignal(GSN_COPY_FRAGREQ, &Dblqh::execCOPY_FRAGREQ);
353  addRecSignal(GSN_COPY_FRAGREF, &Dblqh::execCOPY_FRAGREF);
354  addRecSignal(GSN_COPY_FRAGCONF, &Dblqh::execCOPY_FRAGCONF);
355  addRecSignal(GSN_COPY_ACTIVEREQ, &Dblqh::execCOPY_ACTIVEREQ);
356  addRecSignal(GSN_COPY_STATEREQ, &Dblqh::execCOPY_STATEREQ);
357  addRecSignal(GSN_LQH_TRANSREQ, &Dblqh::execLQH_TRANSREQ);
358  addRecSignal(GSN_TRANSID_AI, &Dblqh::execTRANSID_AI);
359  addRecSignal(GSN_INCL_NODEREQ, &Dblqh::execINCL_NODEREQ);
360  addRecSignal(GSN_LCP_PREPARE_REF, &Dblqh::execLCP_PREPARE_REF);
361  addRecSignal(GSN_LCP_PREPARE_CONF, &Dblqh::execLCP_PREPARE_CONF);
362  addRecSignal(GSN_END_LCPCONF, &Dblqh::execEND_LCPCONF);
363 
364  addRecSignal(GSN_EMPTY_LCP_REQ, &Dblqh::execEMPTY_LCP_REQ);
365  addRecSignal(GSN_LCP_FRAG_ORD, &Dblqh::execLCP_FRAG_ORD);
366 
367  addRecSignal(GSN_START_FRAGREQ, &Dblqh::execSTART_FRAGREQ);
368  addRecSignal(GSN_START_RECREF, &Dblqh::execSTART_RECREF);
369  addRecSignal(GSN_GCP_SAVEREQ, &Dblqh::execGCP_SAVEREQ);
370  addRecSignal(GSN_FSOPENREF, &Dblqh::execFSOPENREF, true);
371  addRecSignal(GSN_FSOPENCONF, &Dblqh::execFSOPENCONF);
372  addRecSignal(GSN_FSCLOSECONF, &Dblqh::execFSCLOSECONF);
373  addRecSignal(GSN_FSWRITECONF, &Dblqh::execFSWRITECONF);
374  addRecSignal(GSN_FSWRITEREF, &Dblqh::execFSWRITEREF, true);
375  addRecSignal(GSN_FSREADCONF, &Dblqh::execFSREADCONF);
376  addRecSignal(GSN_FSREADREF, &Dblqh::execFSREADREF, true);
377  addRecSignal(GSN_ACC_ABORTCONF, &Dblqh::execACC_ABORTCONF);
378  addRecSignal(GSN_TIME_SIGNAL, &Dblqh::execTIME_SIGNAL);
379  addRecSignal(GSN_FSSYNCCONF, &Dblqh::execFSSYNCCONF);
380  addRecSignal(GSN_REMOVE_MARKER_ORD, &Dblqh::execREMOVE_MARKER_ORD);
381 
382  addRecSignal(GSN_CREATE_TAB_REQ, &Dblqh::execCREATE_TAB_REQ);
383  addRecSignal(GSN_CREATE_TAB_REF, &Dblqh::execCREATE_TAB_REF);
384  addRecSignal(GSN_CREATE_TAB_CONF, &Dblqh::execCREATE_TAB_CONF);
385 
386  addRecSignal(GSN_PREP_DROP_TAB_REQ, &Dblqh::execPREP_DROP_TAB_REQ);
387  addRecSignal(GSN_DROP_TAB_REQ, &Dblqh::execDROP_TAB_REQ);
388  addRecSignal(GSN_DROP_TAB_REF, &Dblqh::execDROP_TAB_REF);
389  addRecSignal(GSN_DROP_TAB_CONF, &Dblqh::execDROP_TAB_CONF);
390 
391  addRecSignal(GSN_LQH_ALLOCREQ, &Dblqh::execLQH_ALLOCREQ);
392  addRecSignal(GSN_LQH_WRITELOG_REQ, &Dblqh::execLQH_WRITELOG_REQ);
393  addRecSignal(GSN_TUP_DEALLOCREQ, &Dblqh::execTUP_DEALLOCREQ);
394 
395  // TUX
396  addRecSignal(GSN_TUXFRAGCONF, &Dblqh::execTUXFRAGCONF);
397  addRecSignal(GSN_TUXFRAGREF, &Dblqh::execTUXFRAGREF);
398  addRecSignal(GSN_TUX_ADD_ATTRCONF, &Dblqh::execTUX_ADD_ATTRCONF);
399  addRecSignal(GSN_TUX_ADD_ATTRREF, &Dblqh::execTUX_ADD_ATTRREF);
400 
401  addRecSignal(GSN_READ_PSEUDO_REQ, &Dblqh::execREAD_PSEUDO_REQ);
402 
403  addRecSignal(GSN_DEFINE_BACKUP_REF, &Dblqh::execDEFINE_BACKUP_REF);
404  addRecSignal(GSN_DEFINE_BACKUP_CONF, &Dblqh::execDEFINE_BACKUP_CONF);
405 
406  addRecSignal(GSN_BACKUP_FRAGMENT_REF, &Dblqh::execBACKUP_FRAGMENT_REF);
407  addRecSignal(GSN_BACKUP_FRAGMENT_CONF, &Dblqh::execBACKUP_FRAGMENT_CONF);
408 
409  addRecSignal(GSN_RESTORE_LCP_REF, &Dblqh::execRESTORE_LCP_REF);
410  addRecSignal(GSN_RESTORE_LCP_CONF, &Dblqh::execRESTORE_LCP_CONF);
411 
412  addRecSignal(GSN_UPDATE_FRAG_DIST_KEY_ORD,
413  &Dblqh::execUPDATE_FRAG_DIST_KEY_ORD);
414 
415  addRecSignal(GSN_PREPARE_COPY_FRAG_REQ,
416  &Dblqh::execPREPARE_COPY_FRAG_REQ);
417 
418  addRecSignal(GSN_DROP_FRAG_REQ, &Dblqh::execDROP_FRAG_REQ);
419  addRecSignal(GSN_DROP_FRAG_REF, &Dblqh::execDROP_FRAG_REF);
420  addRecSignal(GSN_DROP_FRAG_CONF, &Dblqh::execDROP_FRAG_CONF);
421 
422  addRecSignal(GSN_SUB_GCP_COMPLETE_REP, &Dblqh::execSUB_GCP_COMPLETE_REP);
423  addRecSignal(GSN_FSWRITEREQ,
424  &Dblqh::execFSWRITEREQ);
425  addRecSignal(GSN_DBINFO_SCANREQ, &Dblqh::execDBINFO_SCANREQ);
426 
427  addRecSignal(GSN_FIRE_TRIG_REQ, &Dblqh::execFIRE_TRIG_REQ);
428 
429  initData();
430 
431 #ifdef VM_TRACE
432  {
433  void* tmp[] = {
434  &addfragptr,
435  &fragptr,
436  &gcpPtr,
437  &lcpPtr,
438  &logPartPtr,
439  &logFilePtr,
440  &lfoPtr,
441  &logPagePtr,
442  &pageRefPtr,
443  &scanptr,
444  &tabptr,
445  &tcConnectptr,
446  &tcNodeFailptr,
447  };
448  init_globals_list(tmp, sizeof(tmp)/sizeof(tmp[0]));
449  }
450 #endif
451 
452 }//Dblqh::Dblqh()
453 
454 Dblqh::~Dblqh()
455 {
456 #ifndef NO_REDO_PAGE_CACHE
457  m_redo_page_cache.m_pool.clear();
458 #endif
459 
460 #ifndef NO_REDO_OPEN_FILE_CACHE
461  m_redo_open_file_cache.m_pool.clear();
462 #endif
463 
464  // Records with dynamic sizes
465  deallocRecord((void **)&addFragRecord, "AddFragRecord",
466  sizeof(AddFragRecord),
467  caddfragrecFileSize);
468 
469  deallocRecord((void**)&gcpRecord,
470  "GcpRecord",
471  sizeof(GcpRecord),
472  cgcprecFileSize);
473 
474  deallocRecord((void**)&hostRecord,
475  "HostRecord",
476  sizeof(HostRecord),
477  chostFileSize);
478 
479  deallocRecord((void**)&lcpRecord,
480  "LcpRecord",
481  sizeof(LcpRecord),
482  clcpFileSize);
483 
484  deallocRecord((void**)&logPartRecord,
485  "LogPartRecord",
486  sizeof(LogPartRecord),
487  clogPartFileSize);
488 
489  deallocRecord((void**)&logFileRecord,
490  "LogFileRecord",
491  sizeof(LogFileRecord),
492  clogFileFileSize);
493 
494  deallocRecord((void**)&logFileOperationRecord,
495  "LogFileOperationRecord",
496  sizeof(LogFileOperationRecord),
497  clfoFileSize);
498 
499  deallocRecord((void**)&pageRefRecord,
500  "PageRefRecord",
501  sizeof(PageRefRecord),
502  cpageRefFileSize);
503 
504 
505  deallocRecord((void**)&tablerec,
506  "Tablerec",
507  sizeof(Tablerec),
508  ctabrecFileSize);
509 
510  deallocRecord((void**)&tcConnectionrec,
511  "TcConnectionrec",
512  sizeof(TcConnectionrec),
513  ctcConnectrecFileSize);
514 
515  deallocRecord((void**)&tcNodeFailRecord,
516  "TcNodeFailRecord",
517  sizeof(TcNodeFailRecord),
518  ctcNodeFailrecFileSize);
519 }//Dblqh::~Dblqh()
520 
521 BLOCK_FUNCTIONS(Dblqh)
522