From: magnus.blaudd Date: November 2 2012 8:49pm Subject: bzr push into mysql-5.1-telco-7.0 branch (magnus.blaudd:5018 to 5022) List-Archive: http://lists.mysql.com/commits/145152 Message-Id: <20121102204940.4904.16747.5022@peek02.se.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 5022 magnus.blaudd@stripped 2012-11-02 ndbinfo - fix .result file after adding a new table modified: mysql-test/suite/ndb/r/ndbinfo.result 5021 magnus.blaudd@stripped 2012-11-02 ndb - add missing break - fix style modified: storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 5020 magnus.blaudd@stripped 2012-11-02 ndb - add scope around variables used to calculate successor - fix style - rename tfrMinDynamicId to minDynamicId modified: storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 5019 magnus.blaudd@stripped 2012-11-02 ndb - fix compiler warning modified: storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 5018 Maitrayi Sabaratnam 2012-11-02 Bug#13336549 - ADDITIONAL LOGGING OF PRESIDENT ATTEMPTS FOR ARBITRATOR ELECTION modified: scripts/mysql_system_tables.sql storage/ndb/src/kernel/blocks/dbinfo/Dbinfo.cpp storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp storage/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp storage/ndb/src/kernel/vm/Ndbinfo.hpp storage/ndb/src/kernel/vm/NdbinfoTables.cpp storage/ndb/tools/ndbinfo_sql.cpp === modified file 'mysql-test/suite/ndb/r/ndbinfo.result' --- a/mysql-test/suite/ndb/r/ndbinfo.result 2011-12-13 15:24:44 +0000 +++ b/mysql-test/suite/ndb/r/ndbinfo.result 2012-11-02 20:31:40 +0000 @@ -41,9 +41,10 @@ table_id table_name comment 12 threadstat Statistics on execution threads 13 transactions transactions 14 operations operations +15 membership membership SELECT COUNT(*) FROM ndb$tables; COUNT(*) -15 +16 SELECT * FROM ndb$tables WHERE table_id = 2; table_id table_name comment 2 test for testing @@ -58,11 +59,12 @@ table_id table_name comment 12 threadstat Statistics on execution threads 13 transactions transactions 14 operations operations +15 membership membership SELECT * FROM ndb$tables WHERE table_name = 'LOGDESTINATION'; table_id table_name comment SELECT COUNT(*) FROM ndb$tables t1, ndb$tables t2 WHERE t1.table_id = t1.table_id; COUNT(*) -225 +256 SELECT table_id, table_name, comment from ndb$tables WHERE table_id > 2 AND table_id <= 5 ORDER BY table_id; @@ -80,6 +82,7 @@ table_id table_name 10 diskpagebuffer 6 logbuffers 5 logspaces +15 membership 9 nodes 14 operations 3 pools @@ -140,6 +143,7 @@ table_id 12 13 14 +15 TRUNCATE ndb$tables; ERROR HY000: Table 'ndb$tables' is read only === modified file 'storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp' --- a/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2012-11-02 16:51:46 +0000 +++ b/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2012-11-02 20:18:42 +0000 @@ -7178,23 +7178,29 @@ Qmgr::execDBINFO_SCANREQ(Signal *signal) row.write_uint32(cneighbourh); row.write_uint32(cpresident); - Uint32 successor = 0; // President sucessor. - NodeRecPtr nodePtr; - UintR tfrMinDynamicId = (UintR)-1; - for (nodePtr.i = 1; nodePtr.i < MAX_NDB_NODES; nodePtr.i++) { - jam(); - ptrAss(nodePtr, nodeRec); - if (nodePtr.p->phase == ZRUNNING) { - if ((nodePtr.p->ndynamicId & 0xFFFF) < tfrMinDynamicId) { - jam(); - if (cpresident != nodePtr.i) + // President successor + Uint32 successor = 0; + { + NodeRecPtr nodePtr; + UintR minDynamicId = (UintR)-1; + for (nodePtr.i = 1; nodePtr.i < MAX_NDB_NODES; nodePtr.i++) + { + jam(); + ptrAss(nodePtr, nodeRec); + if (nodePtr.p->phase == ZRUNNING) + { + if ((nodePtr.p->ndynamicId & 0xFFFF) < minDynamicId) { - tfrMinDynamicId = (nodePtr.p->ndynamicId & 0xFFFF); - successor = nodePtr.i; + jam(); + if (cpresident != nodePtr.i) + { + minDynamicId = (nodePtr.p->ndynamicId & 0xFFFF); + successor = nodePtr.i; + } } } } - }//for + } row.write_uint32(successor); NodeRecPtr myNodePtr; @@ -7213,7 +7219,7 @@ Qmgr::execDBINFO_SCANREQ(Signal *signal) // arbitrator connected row.write_uint32(c_connectedNodes.get(arbitRec.node)); - // Find the potential (rank1 and rank2) arbitrators that are connected. + // Find potential (rank1 and rank2) arbitrators that are connected. NodeRecPtr aPtr; // buf_size: Node nr (max 3 chars) and ', ' + trailing '\0' const int buf_size = 5 * MAX_NODES + 1; @@ -7225,7 +7231,7 @@ Qmgr::execDBINFO_SCANREQ(Signal *signal) aPtr.i = 0; const unsigned stop = NodeBitmask::NotFound; int buf_offset = 0; - char* delimiter = ""; + const char* delimiter = ""; while ((aPtr.i = arbitRec.apiMask[rank].find(aPtr.i + 1)) != stop) { @@ -7238,18 +7244,19 @@ Qmgr::execDBINFO_SCANREQ(Signal *signal) "%s%u", delimiter, aPtr.i); delimiter = ", "; } - } // while + } if (buf_offset == 0) row.write_string("-"); else row.write_string(buf); - } // for + } ndbinfo_send_row(signal, req, row, rl); - } // case ARBITRATION_TABLEID + break; + } default: break; - } // switch + } ndbinfo_send_scan_conf(signal, req, rl); } No bundle (reason: useless for push emails).