Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual NdbInterpretedCode::add_reg()

Description.  This method sums the values stored in any two given registers and stores the result in a third register.


int add_reg
      Uint32 RegDest,
      Uint32 RegSource1,
      Uint32 RegSource2

Parameters.  This method takes three parameters. The first of these is the register in which the result is to be stored (RegDest). The second and third parameters (RegSource1 and RegSource2) are the registers whose values are to be summed.


It is possible to re-use for storing the result one of the registers whose values are summed; that is, RegDest can be the same as RegSource1 or RegSource2.

Return value.  Returns 0 on success, -1 on failure.