21 #include <ndb_limits.h>
22 #include <SimulatedBlock.hpp>
23 #include <NodeBitmask.hpp>
25 #include <ArrayPool.hpp>
28 #include <DLFifoList.hpp>
29 #include <DataBuffer.hpp>
30 #include <KeyTable.hpp>
32 #include <signaldata/KeyInfo.hpp>
33 #include <signaldata/AttrInfo.hpp>
34 #include <signaldata/TcKeyReq.hpp>
35 #include <signaldata/UtilPrepare.hpp>
36 #include <signaldata/UtilExecute.hpp>
37 #include <signaldata/UtilLock.hpp>
38 #include <SimpleProperties.hpp>
41 #include <LockQueue.hpp>
43 #define UTIL_WORDS_PER_PAGE 1023
77 void execNDB_STTOR(
Signal* signal);
78 void execDUMP_STATE_ORD(
Signal* signal);
79 void execDBINFO_SCANREQ(
Signal* signal);
80 void execCONTINUEB(
Signal* signal);
81 void execNODE_FAILREP(
Signal* signal);
87 void execUTIL_SEQUENCE_REF(
Signal* signal);
88 void execUTIL_SEQUENCE_CONF(
Signal* signal);
94 void execUTIL_PREPARE_CONF(
Signal* signal);
95 void execUTIL_PREPARE_REF(
Signal* signal);
101 void execUTIL_DELETE_REF(
Signal* signal);
102 void execUTIL_DELETE_CONF(
Signal* signal);
108 void execUTIL_EXECUTE_REF(
Signal* signal);
109 void execUTIL_EXECUTE_CONF(
Signal* signal);
115 void execUTIL_RELEASE_CONF(
Signal* signal);
116 void execUTIL_RELEASE_REF(
Signal* signal);
123 void execTCKEYREF(
Signal* signal);
124 void execTCROLLBACKREP(
Signal* signal);
125 void execTCKEY_FAILCONF(
Signal* signal);
126 void execTCKEY_FAILREF(
Signal* signal);
141 typedef KeyInfoBuffer::ConstDataBufferIterator KeyInfoIterator;
143 typedef AttrInfoBuffer::ConstDataBufferIterator AttrInfoIterator;
154 Uint32 data[UTIL_WORDS_PER_PAGE];
176 Uint32 schemaTransId;
200 ndbout <<
"[-Prepare-" << endl
201 <<
" clientRef: " << clientRef
202 <<
", clientData: " << clientData
218 releaseFlag(
false),
attrMapping(am), attrInfo(ai), rsInfo(rs)
265 ndbout <<
"[-PreparedOperation-" << endl
266 <<
", rsLen: " << rsLen
267 <<
", noOfKeyAttr: " << noOfKeyAttr
268 <<
", noOfAttr: " << noOfAttr
269 <<
", tckeyLen: " << tckeyLen
270 <<
", keyDataPos: " << keyDataPos << endl
271 <<
"-AttrMapping- (AttrId, KeyPos)-pairs "
272 <<
"(Pos=3fff if non-key attr):" << endl;
274 ndbout <<
"[-tckey- ";
275 printTCKEYREQ(stdout, (Uint32*)&tckey, 8, 0);
276 ndbout <<
"[-attrInfo- ";
277 attrInfo.print(stdout);
278 ndbout <<
"[-rsInfo- ";
279 rsInfo.print(stdout);
280 ndbout <<
"]]]]" << endl;
292 prepOp_i(RNIL), keyInfo(ki), attrInfo(ai), rs(_rs) {}
302 Uint32 m_scanTakeOver;
305 inline bool complete()
const {
return rsRecv == rsExpect; }
313 ndbout <<
"[-Operation-" << endl
314 <<
" transPtrI: " << transPtrI
315 <<
", rsRecv: " << rsRecv;
316 ndbout <<
"[-PreparedOperation-" << endl;
318 ndbout <<
"[-keyInfo-" << endl;
319 keyInfo.print(stdout);
320 ndbout <<
"[-attrInfo-" << endl;
321 attrInfo.print(stdout);
322 ndbout <<
"]]" << endl;
332 executePages(ap), operations(op) {}
360 inline bool complete()
const {
return sent == recv; };
369 ndbout <<
"[-Transaction-" << endl
370 <<
" clientRef: " << clientRef
371 <<
", clientData: " << clientData
373 <<
", errorCode: " << errorCode
375 <<
" sent: " << sent <<
" operations"
376 <<
", recv: " << recv <<
" completed operations";
378 this->operations.first(opPtr);
379 while(opPtr.i != RNIL){
380 ndbout <<
"[-Operation-" << endl;
382 this->operations.next(opPtr);
384 ndbout <<
"]" << endl;
411 void sendKeyInfo(
Signal* signal, Uint32 ref,
414 KeyInfoIterator & kit);
415 void sendAttrInfo(
Signal*, Uint32 ref,
418 AttrInfoIterator & ait);
423 void get_systab_tableid(
Signal*);
425 void connectTc(
Signal* signal);
427 void readPrepareProps(
Signal* signal,
431 void sendUtilPrepareRef(
Signal*, UtilPrepareRef::ErrorCode, Uint32, Uint32,
432 Uint32 extraError = 0);
433 void sendUtilExecuteRef(
Signal*, UtilExecuteRef::ErrorCode,
434 Uint32, Uint32, Uint32);
456 Uint32 hashValue()
const {
460 return m_lockId == rec.m_lockId;
469 void execUTIL_CREATE_LOCK_REQ(
Signal* signal);
471 void execUTIL_LOCK_REQ(
Signal* signal);
480 void mutex_created(
Signal* signal, Uint32 mutexId, Uint32 retVal);
481 void mutex_destroyed(
Signal* signal, Uint32 mutexId, Uint32 retVal);
482 void mutex_locked(
Signal* signal, Uint32 mutexId, Uint32 retVal);
483 void mutex_unlocked(
Signal* signal, Uint32 mutexId, Uint32 retVal);