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