From: magnus.blaudd Date: November 2 2012 8:50pm Subject: bzr push into mysql-5.1-telco-7.1 branch (magnus.blaudd:4645 to 4646) List-Archive: http://lists.mysql.com/commits/145151 Message-Id: <20121102205056.4917.89853.4646@peek02.se.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 4646 magnus.blaudd@stripped 2012-11-02 [merge] Merge 7.0 -> 7.1 modified: mysql-test/suite/ndb/r/ndbinfo.result storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 4645 Maitrayi Sabaratnam 2012-11-02 [merge] Merge 7.0->7.1 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 18:32:26 +0000 +++ b/mysql-test/suite/ndb/r/ndbinfo.result 2012-11-02 20:49:23 +0000 @@ -40,9 +40,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 @@ -57,11 +58,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; @@ -79,6 +81,7 @@ table_id table_name 10 diskpagebuffer 6 logbuffers 5 logspaces +15 membership 9 nodes 14 operations 3 pools @@ -139,6 +142,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 17:37:09 +0000 +++ b/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2012-11-02 20:49:23 +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).