Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

2.3.32 The OperationOptions Structure

Parent class.  NdbOperation

Description.  These options are passed to the NdbRecord-based primary key and scan takeover operation methods defined in the NdbTransaction and NdbScanOperation classes.


Most NdbTransaction::*Tuple() methods (see Section 2.3.30, “The NdbTransaction Class”) take a supplementary sizeOfOptions parameter. This is optional, and is intended to permit the interface implementation to remain backward compatible with older un-recompiled clients that may pass an older (smaller) version of the OperationOptions structure. This effect is achieved by passing sizeof(OperationOptions) into this parameter.

Each option type is marked as present by setting the corresponding bit in optionsPresent. (Only the option types marked in optionsPresent need have sensible data.) All data is copied out of the OperationOptions structure (and any subtended structures) at operation definition time. If no options are required, then NULL may be passed instead.

Members.  The elements making up this structure are shown in the following table:

Table 2.74 NdbOperation::OperationOptions structure member names, types, and description

Name Type Description
optionsPresent Uint64 Which flags are present.
[...] Flags:

The accepted names and values are shown in the following list:


  • OO_GETVALUE: 0x02

  • OO_SETVALUE: 0x04



  • OO_ANYVALUE: 0x20



Type of flags.
abortOption AbortOption An operation-specific abort option; necessary only if the default abortoption behavior is not satisfactory.
extraGetValues GetValueSpec Extra column values to be read.
numExtraGetValues Uint32 Number of extra column values to be read.
extraSetValues SetValueSpec Extra column values to be set.
numExtraSetValues Uint32 Number of extra column values to be set.
partitionId Uint32 Limit the scan to the partition having this ID; alternatively, you can supply an PartitionSpec here. For index scans, partitioning information can be supplied for each range.
interpretedCode NdbInterpretedCode Interpeted code to execute as part of the scan.
anyValue Uint32 An anyValue to be used with this operation. This is used by NDB Cluster Replication to store the SQL node's server ID. By starting the SQL node with the --server-id-bits option (which causes only some of the server_id's bits to be used for uniquely identifying it) set to less than 32, the remaining bits can be used to store user data.
customData void* Data pointer to associate with this operation.
partitionInfo PartitionSpec Partition information for bounding this scan.
sizeOfPartInfo Uint32 Size of the bounding partition information.

For more information, see Section 2.3.27, “The NdbRecord Interface”.