Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

2.3.16.21 Ndb::init()

Description.  This method is used to initialize an Ndb object.

Signature. 

int init
    (
      int maxNoOfTransactions = 4
    )

Parameters.  The init() method takes a single parameter maxNoOfTransactions of type integer. This parameter specifies the maximum number of parallel NdbTransaction objects that can be handled by this instance of Ndb. The maximum permitted value for maxNoOfTransactions is 1024; if not specified, it defaults to 4.

Note

Each scan or index operation uses an extra NdbTransaction object.

Return value.  This method returns an int, which can be either of the following two values:

  • 0: indicates that the Ndb object was initialized successfully.

  • -1: indicates failure.