Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual Ndb_cluster_connection::set_auto_reconnect()

Description.  An API node that is disconnected from the cluster is forced to use a new connection object to reconnect, unless this behavior is overridden by setting AutoReconnect = 1 in the config.ini file or calling this method with 1 as the input value. Calling the method with 0 for the value has the same effect as setting the AutoReconnect configuration parameter (also introduced in those NDB Cluster versions) to 0; that is, API nodes are forced to create new connections.


When called, this method overrides any setting for AutoReconnect made in the config.ini file.

For more information, see Defining SQL and Other API Nodes in an NDB Cluster.


void set_auto_reconnect
      int value

Parameters.  A value of 0 or 1 which determines API node reconnection behavior. 0 forces API nodes to use new connections (Ndb_cluster_connection objects); 1 permits API nodes to re-use existing connections to the cluster.

Return value.  None.