diff options
author | unknown <joreland@mysql.com> | 2004-10-08 09:43:38 +0200 |
---|---|---|
committer | unknown <joreland@mysql.com> | 2004-10-08 09:43:38 +0200 |
commit | c74e8a62625a2f8fdd9fb2ce36486c5a91fe2e13 (patch) | |
tree | 2bd760dff60db50b431aa70af4e2a9293cd02f09 /ndb/include/ndbapi | |
parent | 809d52d179feb45a10894b4e1e18e5a6ed06b662 (diff) | |
download | mariadb-git-c74e8a62625a2f8fdd9fb2ce36486c5a91fe2e13.tar.gz |
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
Diffstat (limited to 'ndb/include/ndbapi')
-rw-r--r-- | ndb/include/ndbapi/Ndb.hpp | 4 | ||||
-rw-r--r-- | ndb/include/ndbapi/NdbConnection.hpp | 15 | ||||
-rw-r--r-- | ndb/include/ndbapi/NdbOperation.hpp | 7 | ||||
-rw-r--r-- | ndb/include/ndbapi/NdbReceiver.hpp | 4 |
4 files changed, 18 insertions, 12 deletions
diff --git a/ndb/include/ndbapi/Ndb.hpp b/ndb/include/ndbapi/Ndb.hpp index 550d0c0931a..134a48e1d6d 100644 --- a/ndb/include/ndbapi/Ndb.hpp +++ b/ndb/include/ndbapi/Ndb.hpp @@ -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]); diff --git a/ndb/include/ndbapi/NdbConnection.hpp b/ndb/include/ndbapi/NdbConnection.hpp index d23a2e7cc0d..53ebffb69f3 100644 --- a/ndb/include/ndbapi/NdbConnection.hpp +++ b/ndb/include/ndbapi/NdbConnection.hpp @@ -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; diff --git a/ndb/include/ndbapi/NdbOperation.hpp b/ndb/include/ndbapi/NdbOperation.hpp index d35fea0e995..8e0294e41e6 100644 --- a/ndb/include/ndbapi/NdbOperation.hpp +++ b/ndb/include/ndbapi/NdbOperation.hpp @@ -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); diff --git a/ndb/include/ndbapi/NdbReceiver.hpp b/ndb/include/ndbapi/NdbReceiver.hpp index b7f73bb618d..e08e349b4fd 100644 --- a/ndb/include/ndbapi/NdbReceiver.hpp +++ b/ndb/include/ndbapi/NdbReceiver.hpp @@ -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 |