2.3.31 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.

Note

Most NdbTransaction::*Tuple() methods (see Section 2.3.29.2, “NdbTransaction Methods”) 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 makeup of this structure is shown here:

NdbOperation::OperationOptions structure

The individual members are described in more detail in the following table:

NameTypeDescription
optionsPresentUint64Which flags are present.
[...]Flags:

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

  • OO_ABORTOPTION: 0x01

  • OO_GETVALUE: 0x02

  • OO_SETVALUE: 0x04

  • OO_PARTITION_ID: 0x08

  • OO_INTERPRETED: 0x10

  • OO_ANYVALUE: 0x20

  • OO_CUSTOMDATA: 0x40

  • OO_LOCKHANDLE: 0x80

Type of flags.
abortOptionAbortOptionAn operation-specific abort option; necessary only if the default abortoption behavior is not satisfactory.
extraGetValuesGetValueSpecExtra column values to be read.
numExtraGetValuesUint32Number of extra column values to be read.
extraSetValuesSetValueSpecExtra column values to be set.
numExtraSetValuesUint32Number of extra column values to be set.
partitionIdUint32Limit 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.
interpretedCodeNdbInterpretedCodeInterpeted code to execute as part of the scan.
anyValueUint32An anyValue to be used with this operation. This is used by MySQL Cluster Replication to store the SQL node's server ID. Beginning with MySQL Cluster NDB 7.0.17 and MySQL Cluster NDB 7.1.6, it is possible to start 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; if this option is set to less than 32, the remaining bits can be used to store user data
customDatavoid*Data pointer to associate with this operation.
partitionInfoPartitionSpecPartition information for bounding this scan.
sizeOfPartInfoUint32Size of the bounding partition information.

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