MySQL NDB Cluster API Developer Guide

2.3.29.6 NdbScanOperation::nextResult()

Description.  This method is used to fetch the next tuple in a scan transaction. Following each call to nextResult(), the buffers and NdbRecAttr objects defined in NdbOperation::getValue() are updated with values from the scanned tuple.

When nextResult() is executed following end-of-file, NDB returns error code 4210 (Ndb sent more info than length specified) and the extra transaction object is freed by returning it to the idle list for the right TC node.

Signature.  This method can be invoked in one of two ways. The first of these, shown here, is available beginning in MySQL 5.1:

int nextResult
    (
      bool fetchAllowed = true,
      bool forceSend = false
    )

It is also possible to use this method as shown here:

int nextResult
    (
      const char*& outRow,
      bool fetchAllowed = true,
      bool forceSend = false
    )

Parameters (2-parameter version).  This method takes the following two parameters:

Parameters (3-parameter version).  This method can also be called with the following three parameters:

Return value.  This method returns one of the following 4 integer values, interpreted as shown in the following list:

Example.  See Section 2.5.4, “NDB API Basic Scanning Example”.