diff options
author | unknown <pekka@mysql.com> | 2004-07-22 12:33:14 +0200 |
---|---|---|
committer | unknown <pekka@mysql.com> | 2004-07-22 12:33:14 +0200 |
commit | 9864327a61c5756c6ce00bd8e8b7d347cf2b3938 (patch) | |
tree | 0a0dcd6a363ba58ac5410e3333585a1ecf97947c /ndb/include/ndbapi/NdbConnection.hpp | |
parent | 149b70dc5784af6142c7aa2043dccccceff97430 (diff) | |
download | mariadb-git-9864327a61c5756c6ce00bd8e8b7d347cf2b3938.tar.gz |
ha_ndb blobs
Diffstat (limited to 'ndb/include/ndbapi/NdbConnection.hpp')
-rw-r--r-- | ndb/include/ndbapi/NdbConnection.hpp | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/ndb/include/ndbapi/NdbConnection.hpp b/ndb/include/ndbapi/NdbConnection.hpp index 5d73058cc24..4e0330e3fda 100644 --- a/ndb/include/ndbapi/NdbConnection.hpp +++ b/ndb/include/ndbapi/NdbConnection.hpp @@ -431,6 +431,15 @@ public: /** @} *********************************************************************/ + /** + * Execute the transaction in NoCommit mode if there are any not-yet + * executed blob part operations of given types. Otherwise do + * nothing. The flags argument is bitwise OR of (1 << optype) where + * optype comes from NdbOperation::OperationType. Only the basic PK + * ops are used (read, insert, update, delete). + */ + int executePendingBlobOps(Uint8 flags = 0xFF); + private: /** * Release completed operations @@ -642,6 +651,7 @@ private: Uint32 theBuddyConPtr; // optim: any blobs bool theBlobFlag; + Uint8 thePendingBlobOps; static void sendTC_COMMIT_ACK(NdbApiSignal *, Uint32 transId1, Uint32 transId2, @@ -869,6 +879,21 @@ NdbConnection::OpSent() theNoOfOpSent++; } +/****************************************************************************** +void executePendingBlobOps(); +******************************************************************************/ +#include <stdlib.h> +inline +int +NdbConnection::executePendingBlobOps(Uint8 flags) +{ + if (thePendingBlobOps & flags) { + // not executeNoBlobs because there can be new ops with blobs + return execute(NoCommit); + } + return 0; +} + inline Uint32 NdbConnection::ptr2int(){ @@ -876,5 +901,3 @@ NdbConnection::ptr2int(){ } #endif - - |