Commit 9108d3bd authored by unknown's avatar unknown

ndb - no bugs number

  1) Make sure not to read uninitialized data in unique index code
      harmless (atleast before dynattr)
  2) Dont update p_latest_trans_gci
      for dirty unique index lookup
  


storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp:
  Make sure not to read uninitialized data in unique index code
    harmless (atleast before dynattr)
storage/ndb/src/ndbapi/NdbTransaction.cpp:
  Dont update p_latest_trans_gci
    for dirty unique index lookup
parent 2e14b58a
......@@ -833,6 +833,15 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr,
//--------------------------------------------------------------------
// Read Primary Key Values
//--------------------------------------------------------------------
Tuple_header *save0= req_struct->m_tuple_ptr;
if (regOperPtr->op_struct.op_type == ZDELETE &&
!regOperPtr->is_first_operation())
{
jam();
req_struct->m_tuple_ptr= (Tuple_header*)
c_undo_buffer.get_ptr(&req_struct->prevOpPtr.p->m_copy_tuple_location);
}
if (regTabPtr->need_expand())
prepare_read(req_struct, regTabPtr, true);
......@@ -844,6 +853,9 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr,
false);
ndbrequire(ret != -1);
noPrimKey= ret;
req_struct->m_tuple_ptr = save0;
Uint32 numAttrsToRead;
if ((regOperPtr->op_struct.op_type == ZUPDATE) &&
(trigPtr->sendOnlyChangedAttributes)) {
......
......@@ -1970,8 +1970,10 @@ NdbTransaction::receiveTCINDXCONF(const TcIndxConf * indxConf,
if (tCommitFlag == 1) {
theCommitStatus = Committed;
theGlobalCheckpointId = tGCI;
assert(tGCI);
*p_latest_trans_gci = tGCI;
if (tGCI) // Read(dirty) only transaction doesnt get GCI
{
*p_latest_trans_gci = tGCI;
}
} else if ((tNoComp >= tNoSent) &&
(theLastExecOpInList->theCommitIndicator == 1)){
/**********************************************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment