Bug #22261 remove global_mgmt_server_check from ClusterMgr
Submitted: 12 Sep 2006 10:40 Modified: 7 Feb 2007 17:59
Reporter: Stewart Smith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:5.0 OS:
Assigned to: li zhou CPU Architecture:Any

[12 Sep 2006 10:40] Stewart Smith
Description:
in ClusterMgr, there's a gloabl variable: int global_mgmt_server_check = 0; // set to one in mgmtsrvr main;

which is used in

 ClusterMgr::execAPI_REGCONF(const Uint32 * theData){

like this:
00395   if(node.m_info.m_version != apiRegConf->version){
00396     node.m_info.m_version = apiRegConf->version;
00397     if (global_mgmt_server_check == 1)
00398       node.compatible = ndbCompatible_mgmt_ndb(NDB_VERSION,
00399                            node.m_info.m_version);
00400     else
00401       node.compatible = ndbCompatible_api_ndb(NDB_VERSION,
00402                           node.m_info.m_version);
00403   }

We don't need the global and this can be done a better way

How to repeat:
code cleanup bug, not 'repeat'.

Suggested fix:
remove the global var.
[21 Nov 2006 5:26] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/15597

ChangeSet@1.2259, 2006-11-21 13:28:43+00:00, lzhou@dev3-138.dev.cn.tlan +2 -0
  BUG#22261 remove global variable global_mgmt_server_check from ClusterMgr
[13 Dec 2006 5:49] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/16866

ChangeSet@1.2259, 2006-12-13 13:46:40+00:00, lzhou@dev3-63.dev.cn.tlan +2 -0
  BUG#22261 remove global variable global_mgmt_server_check from ClusterMgr
[15 Dec 2006 5:54] Stewart Smith
looks okay. since mainly cleanup, should only go into 5.1

also make sure it gets through an autotest run before hitting the main trees - i think i remember all the semantics of the involved structures...
[15 Dec 2006 9:50] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/17032

ChangeSet@1.2342, 2006-12-15 17:49:13+00:00, lzhou@dev3-63.dev.cn.tlan +2 -0
  BUG#22261 remove global variable global_mgmt_server_check from ClusterMgr
[7 Feb 2007 17:07] Tomas Ulin
pushed to 5.1.16