Why does NDBAPI Function nextResult() Return Strange Errors and Cause Crashes?

(Doc ID 2080998.1)

Last updated on MARCH 08, 2017

Applies to:

MySQL Cluster - Version 7.2 and later
Information in this document applies to any platform.


The ndbapi manual states:

  Implicit NdbTransaction::execute() calls in scan and BLOB methods. Scan operations are executed in the same way as other operations,
  and also have implicit execute() calls within the NdbScanOperation::nextResult() method. When NdbScanOperation::nextResult()
  indicates failure (that is, if the method returns -1), the transaction object should be checked for an error.
  The NdbScanOperation may also contain the error, but only if the error is not operation-specific.

However, the following is occurring in the application:

Extract from ndbtransaction (code=4012):
theError = { status = NdbError::Success, classification = NdbError::NoError, code = 4012, mysql_code = 0, message = 0x... "No error", details = 0x0}

Extract from ndboperation (code=0), which a few function calls later caused a segfault:
theError = {status = NdbError::Success, classification = NdbError::NoError, code = 0, mysql_code = 0,  message = 0x... "No error", details = 0x0}

Why does the status show "No error" and return the 4012 error code and how does nextResult(true,true) work?


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms