The world's most popular open source database
Description. This method locks the current tuple.
Signature.
NdbOperation* lockCurrentTuple
(
void
)
or
NdbOperation* lockCurrentTuple
(
NdbTransaction* lockTrans
)
Beginning with MySQL Cluster NDB 6.2.3, the following
signature is also supported for this method, when using
NdbRecord:
NdbOperation *lockCurrentTuple
(
NdbTransaction* takeOverTrans,
const NdbRecord* record,
char* row = 0,
const unsigned char* mask = 0
)
Parameters. This method takes a single, optional parameter — the transaction that should perform the lock. If this is omitted, the transaction is the current one.
Parameters when using NdbRecord.
When using the NdbRecord interface (see
Section 4.25, “The NdbRecord Interface”), this method takes
these parameters, as described in the following list:
The transaction
(takeOverTrans) that should
perform the lock; when using
NdbRecord with scans, this parameter
is not optional.
The NdbRecord referenced by the scan.
This is required, even if no records are being read.
The row from which to read.
Set this to NULL if no read is to
occur.
The mask pointer is optional.
If it is present, then only columns for which the
corresponding bit in the mask is set are retrieved by
the scan.
Calling an NdbRecord scan lock takeover on
an NdbRecAttr-style scan is not valid, nor
is calling an NdbRecAttr-style scan lock
takeover on an NdbRecord-style scan.
Return Value.
This method returns a pointer to an
NdbOperation object, or
NULL. (See
Section 4.15, “The NdbOperation Class”.)

