Commit a32f231f authored by tomas@poseidon.ndb.mysql.com's avatar tomas@poseidon.ndb.mysql.com

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb

into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
parents e19d0e5a a39926ff
...@@ -98,10 +98,12 @@ ...@@ -98,10 +98,12 @@
@section secNdbOperations Operations @section secNdbOperations Operations
Each transaction (NdbTransaction object) consist of a list of Each transaction (NdbTransaction object) consist of a list of
operations (Ndb*Operation objects). operations (Ndb*Operation objects).
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
Operations are of two different kinds: Operations are of two different kinds:
-# standard operations, and -# standard operations, and
-# interpreted program operations. -# interpreted program operations.
#endif
<h3>Single row operations</h3> <h3>Single row operations</h3>
After the operation is created using NdbTransaction::getNdbOperation After the operation is created using NdbTransaction::getNdbOperation
...@@ -205,8 +207,7 @@ ...@@ -205,8 +207,7 @@
The result of reading data from an NdbRecAttr object before The result of reading data from an NdbRecAttr object before
calling NdbTransaction::execute is undefined. calling NdbTransaction::execute is undefined.
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
<h3>Interpreted Program Operations</h3> <h3>Interpreted Program Operations</h3>
The following types of interpreted program operations exist: The following types of interpreted program operations exist:
-# NdbOperation::interpretedUpdateTuple : -# NdbOperation::interpretedUpdateTuple :
...@@ -267,7 +268,7 @@ ...@@ -267,7 +268,7 @@
There might be zero NdbOperation::getValue calls. There might be zero NdbOperation::getValue calls.
-# The fifth step is possible subroutine definitions using -# The fifth step is possible subroutine definitions using
NdbOperation::def_subroutine and NdbOperation::ret_sub. NdbOperation::def_subroutine and NdbOperation::ret_sub.
#endif
@subsection secScan Scanning @subsection secScan Scanning
The most common use of interpreted programs is for scanning The most common use of interpreted programs is for scanning
...@@ -361,7 +362,7 @@ ...@@ -361,7 +362,7 @@
but is of the following form: but is of the following form:
-# Start transaction -# Start transaction
-# Get NdbScanOperation for the table to be scanned -# Get NdbScanOperation for the table to be scanned
-# NdbScanOperation::readTuplesExclusive returns a handle to a -# NdbScanOperation::readTuples(NdbOperation::LM_Exclusive) returns a handle to a
NdbResultSet. NdbResultSet.
-# Search conditions are defined by NdbScanFilter -# Search conditions are defined by NdbScanFilter
-# Call NdbTransaction::execute(NoCommit) to start the scan. -# Call NdbTransaction::execute(NoCommit) to start the scan.
...@@ -384,7 +385,7 @@ ...@@ -384,7 +385,7 @@
See the scan example program in @ref ndbapi_scan.cppn for example See the scan example program in @ref ndbapi_scan.cppn for example
usage of the new scan api. usage of the new scan api.
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
<h3>Interpreted Programs</h3> <h3>Interpreted Programs</h3>
Interpretation programs are executed in a Interpretation programs are executed in a
register-based virtual machine. register-based virtual machine.
...@@ -455,6 +456,7 @@ ...@@ -455,6 +456,7 @@
The parameter used by NdbOperation::def_subroutine The parameter used by NdbOperation::def_subroutine
should match the automatic numbering to make it easier to should match the automatic numbering to make it easier to
debug the interpreted program. debug the interpreted program.
#endif
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
@section secAsync Asynchronous Transactions @section secAsync Asynchronous Transactions
...@@ -587,7 +589,7 @@ ...@@ -587,7 +589,7 @@
theTransaction = theNdb->startTransaction(); theTransaction = theNdb->startTransaction();
theOperation = theTransaction->getNdbOperation("TEST_TABLE"); theOperation = theTransaction->getNdbOperation("TEST_TABLE");
if (theOperation == NULL) goto error; if (theOperation == NULL) goto error;
theOperation->readTuple(); theOperation->readTuple(NdbOperation::LM_Read);
theOperation->setValue("ATTR_1", at1); theOperation->setValue("ATTR_1", at1);
theOperation->setValue("ATTR_2", at1); //Here an error occurs theOperation->setValue("ATTR_2", at1); //Here an error occurs
theOperation->setValue("ATTR_3", at1); theOperation->setValue("ATTR_3", at1);
......
...@@ -168,7 +168,6 @@ public: ...@@ -168,7 +168,6 @@ public:
* @depricated * @depricated
*/ */
virtual int dirtyRead(); virtual int dirtyRead();
#endif
/** /**
* Define the NdbOperation to be a standard operation of type committedRead. * Define the NdbOperation to be a standard operation of type committedRead.
...@@ -201,7 +200,9 @@ public: ...@@ -201,7 +200,9 @@ public:
* @return 0 if successful otherwise -1. * @return 0 if successful otherwise -1.
*/ */
virtual int dirtyWrite(); virtual int dirtyWrite();
#endif
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
/** @} *********************************************************************/ /** @} *********************************************************************/
/** /**
* @name Define Interpreted Program Operation Type * @name Define Interpreted Program Operation Type
...@@ -221,6 +222,7 @@ public: ...@@ -221,6 +222,7 @@ public:
* @return 0 if successful otherwise -1. * @return 0 if successful otherwise -1.
*/ */
virtual int interpretedDeleteTuple(); virtual int interpretedDeleteTuple();
#endif
/** @} *********************************************************************/ /** @} *********************************************************************/
...@@ -377,6 +379,7 @@ public: ...@@ -377,6 +379,7 @@ public:
virtual NdbBlob* getBlobHandle(const char* anAttrName); virtual NdbBlob* getBlobHandle(const char* anAttrName);
virtual NdbBlob* getBlobHandle(Uint32 anAttrId); virtual NdbBlob* getBlobHandle(Uint32 anAttrId);
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
/** @} *********************************************************************/ /** @} *********************************************************************/
/** /**
* @name Specify Interpreted Program Instructions * @name Specify Interpreted Program Instructions
...@@ -675,6 +678,7 @@ public: ...@@ -675,6 +678,7 @@ public:
* @return -1 if unsuccessful. * @return -1 if unsuccessful.
*/ */
int ret_sub(); int ret_sub();
#endif
/** @} *********************************************************************/ /** @} *********************************************************************/
...@@ -723,6 +727,7 @@ public: ...@@ -723,6 +727,7 @@ public:
LockMode getLockMode() const { return theLockMode; } LockMode getLockMode() const { return theLockMode; }
void setAbortOption(Int8 ao) { m_abortOption = ao; } void setAbortOption(Int8 ao) { m_abortOption = ao; }
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
/** /**
* Set/get distribution/partition key * Set/get distribution/partition key
*/ */
...@@ -730,6 +735,7 @@ public: ...@@ -730,6 +735,7 @@ public:
void setPartitionHash(Uint32 key); void setPartitionHash(Uint32 key);
void setPartitionHash(const Uint64 *, Uint32 len); void setPartitionHash(const Uint64 *, Uint32 len);
Uint32 getPartitionId() const; Uint32 getPartitionId() const;
#endif
protected: protected:
int handle_distribution_key(const Uint64 *, Uint32 len); int handle_distribution_key(const Uint64 *, Uint32 len);
protected: protected:
......
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