Commit c74e8a62 authored by unknown's avatar unknown
Browse files

Fix simple/dirty read handling


ndb/include/kernel/signaldata/TcKeyConf.hpp:
  A bit for differenciating between "real" tckey conf and simple read conf
ndb/include/ndbapi/Ndb.hpp:
  Removed/ifdef's unused stuff
ndb/include/ndbapi/NdbConnection.hpp:
  Added bitmask that keeps track of used nodes when
    a transaction can be dependant on several nodes
ndb/include/ndbapi/NdbOperation.hpp:
  removed unused methods
ndb/include/ndbapi/NdbReceiver.hpp:
  Tween execTCOPCONF to handle TcKeyConf::SimpleReadBit
ndb/src/common/debugger/signaldata/TcKeyConf.cpp:
  Update printer
ndb/src/kernel/blocks/dblqh/Dblqh.hpp:
  removed unused define
ndb/src/ndbapi/NdbApiSignal.cpp:
  Fix length of TC_COMMITREQ
ndb/test/ndbapi/testOperations.cpp:
  fix simple/dirty read
parent 809d52d1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ public:
   */
  STATIC_CONST( StaticLength = 5 );
  STATIC_CONST( OperationLength = 2 );
  STATIC_CONST( SimpleReadBit = (((Uint32)1) << 31) );
  
private:

+3 −1
Original line number Diff line number Diff line
@@ -1612,7 +1612,6 @@ private:
  char                  prefixName[NDB_MAX_INTERNAL_TABLE_LENGTH];
  char *                prefixEnd;		

  //Table*       		theTable;	// The table object		
  class NdbImpl * theImpl;
  class NdbDictionaryImpl* theDictionary;
  class NdbGlobalEventBufferHandle* theGlobalEventBufferHandle;
@@ -1698,10 +1697,13 @@ private:
  
  NdbApiSignal* theCommitAckSignal;


#ifdef POORMANSPURIFY
  int cfreeSignals;
  int cnewSignals;
  int cgetSignals;
  int creleaseSignals;
#endif

  static void executeMessage(void*, NdbApiSignal *, 
			     struct LinearSectionPtr ptr[3]);
+12 −3
Original line number Diff line number Diff line
@@ -526,9 +526,8 @@ private:
  int 	sendCOMMIT();                   // Send a TC_COMMITREQ signal;
  void	setGCI(int GCI);		// Set the global checkpoint identity
 
  int	OpCompleteFailure();		// Operation Completed with success  
  int	OpCompleteSuccess();		// Operation Completed with success  

  int	OpCompleteFailure(Uint8 abortoption);
  int	OpCompleteSuccess();
  void	CompletedOperations();	        // Move active ops to list of completed
 
  void	OpSent();			// Operation Sent with success
@@ -649,6 +648,16 @@ private:
  Uint32 theNodeSequence; // The sequence no of the db node
  bool theReleaseOnClose;

  /**
   * handle transaction spanning
   *   multiple TC/db nodes
   *
   * 1) Bitmask with used nodes
   * 2) Bitmask with nodes failed during op
   */
  Uint32 m_db_nodes[2];
  Uint32 m_failed_db_nodes[2];
  
  // Scan operations
  bool m_waitForReply;     
  NdbIndexScanOperation* m_theFirstScanOperation;
+0 −7
Original line number Diff line number Diff line
@@ -787,11 +787,6 @@ protected:
   
  int	 receiveTCKEYREF(NdbApiSignal*); 


  int    receiveTRANSID_AI(const Uint32* aDataPtr, Uint32 aDataLength); 
  int    receiveREAD_CONF(const Uint32* aDataPtr, Uint32 aDataLength); 


  int	 checkMagicNumber(bool b = true); // Verify correct object

  int    checkState_TransId(NdbApiSignal* aSignal);
@@ -815,8 +810,6 @@ protected:
  int branch_col_null(Uint32 type, Uint32 col, Uint32 Label);
  
  // Handle ATTRINFO signals   
  int         receiveREAD_AI(Uint32* aDataPtr, Uint32 aLength); 
				
  int 	      insertATTRINFO(Uint32 aData);
  int         insertATTRINFOloop(const Uint32* aDataPtr, Uint32 aLength);

+3 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL  // Not part of public interface

#include <ndb_types.h>
#include <ndb_global.h>

class Ndb;
class NdbReceiver
@@ -127,7 +128,8 @@ int
NdbReceiver::execTCOPCONF(Uint32 len){
  Uint32 tmp = m_received_result_length;
  m_expected_result_length = len;
  return (tmp == len ? 1 : 0);
  assert(!(tmp && !len));
  return ((bool)len ^ (bool)tmp ? 0 : 1);
}

inline
Loading