Commit f22b3a75 authored by joreland@mysql.com's avatar joreland@mysql.com

Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1

into mysql.com:/home/jonas/src/mysql-4.1
parents 60b79f2b 8aa60fdd
...@@ -204,14 +204,6 @@ Ndb::~Ndb() ...@@ -204,14 +204,6 @@ Ndb::~Ndb()
TransporterFacade::instance()->close(theNdbBlockNumber, theFirstTransId); TransporterFacade::instance()->close(theNdbBlockNumber, theFirstTransId);
} }
if (global_ndb_cluster_connection != 0) {
theNoOfNdbObjects--;
if(theNoOfNdbObjects == 0){
delete global_ndb_cluster_connection;
global_ndb_cluster_connection= 0;
}
}//if
// if (theSchemaConToNdbList != NULL) // if (theSchemaConToNdbList != NULL)
// closeSchemaTransaction(theSchemaConToNdbList); // closeSchemaTransaction(theSchemaConToNdbList);
while ( theConIdleList != NULL ) while ( theConIdleList != NULL )
...@@ -249,6 +241,19 @@ Ndb::~Ndb() ...@@ -249,6 +241,19 @@ Ndb::~Ndb()
delete theImpl; delete theImpl;
/**
* This needs to be put after delete theImpl
* as TransporterFacade::instance is delete by global_ndb_cluster_connection
* and used by theImpl
*/
if (global_ndb_cluster_connection != 0) {
theNoOfNdbObjects--;
if(theNoOfNdbObjects == 0){
delete global_ndb_cluster_connection;
global_ndb_cluster_connection= 0;
}
}//if
/** /**
* This sleep is to make sure that the transporter * This sleep is to make sure that the transporter
* send thread will come in and send any * send thread will come in and send any
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment