From: Jonas Oreland Date: October 19 2011 12:21pm Subject: bzr push into mysql-5.5-cluster branch (jonas.oreland:3600 to 3602) List-Archive: http://lists.mysql.com/commits/141506 Message-Id: <20111019122142.BD232CBACE6@perch.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3602 Jonas Oreland 2011-10-19 ndb - kill compiler warnings - misc ndbapi tests warnings... modified: storage/ndb/test/include/NdbMgmd.hpp storage/ndb/test/ndbapi/testMgm.cpp storage/ndb/tools/ndb_index_stat.cpp 3601 Jonas Oreland 2011-10-19 ndb - kill compiler warnings - "fix" various things in NdbScanOperation wrt to c++ overloading Should be ABI compatible, as no public methods has changed (and nothing accessed from inlines) modified: storage/ndb/include/ndbapi/NdbScanOperation.hpp storage/ndb/src/ndbapi/NdbScanOperation.cpp 3600 Jonas Oreland 2011-10-19 [merge] ndb - merge 72-tip modified: mysql-test/suite/funcs_1/r/is_columns_is.result mysql-test/suite/funcs_1/r/is_tables_is.result mysql-test/suite/funcs_1/t/is_columns_is.test mysql-test/suite/funcs_1/t/is_tables_is.test === modified file 'storage/ndb/include/ndbapi/NdbScanOperation.hpp' --- a/storage/ndb/include/ndbapi/NdbScanOperation.hpp 2011-09-29 09:23:04 +0000 +++ b/storage/ndb/include/ndbapi/NdbScanOperation.hpp 2011-10-19 12:19:45 +0000 @@ -252,12 +252,8 @@ public: #endif #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL - NdbBlob* getBlobHandle(const char* anAttrName); - NdbBlob* getBlobHandle(Uint32 anAttrId); - /* Const variants not overloaded - underlying - * const NdbOperation::getBlobHandle implementation - * only returns existing Blob operations - */ + virtual NdbBlob* getBlobHandle(const char* anAttrName); + virtual NdbBlob* getBlobHandle(Uint32 anAttrId); /** * setInterpretedCode @@ -530,12 +526,13 @@ protected: // Overloaded private methods from NdbOperation int init(const NdbTableImpl* tab, NdbTransaction*); - int prepareSend(Uint32 TC_ConnectPtr, Uint64 TransactionId); + int prepareSend(Uint32 TC_ConnectPtr, Uint64 TransactionId, + NdbOperation::AbortOption); int doSend(int ProcessorId); virtual void setReadLockMode(LockMode lockMode); - virtual void setErrorCode(int aErrorCode); - virtual void setErrorCodeAbort(int aErrorCode); + virtual void setErrorCode(int aErrorCode) const; + virtual void setErrorCodeAbort(int aErrorCode) const; /* This is the transaction which defined this scan * The transaction(connection) used for the scan is @@ -678,6 +675,17 @@ protected: private: NdbScanOperation(const NdbScanOperation&); // Not impl. NdbScanOperation&operator=(const NdbScanOperation&); + + /** + * Const variants overloaded...calling NdbOperation::getBlobHandle() + * (const NdbOperation::getBlobHandle implementation + * only returns existing Blob operations) + * + * I'm not sure...but these doesn't seem to be an users of this... + * so I make them private... + */ + virtual NdbBlob* getBlobHandle(const char* anAttrName) const; + virtual NdbBlob* getBlobHandle(Uint32 anAttrId) const; }; inline === modified file 'storage/ndb/src/ndbapi/NdbScanOperation.cpp' --- a/storage/ndb/src/ndbapi/NdbScanOperation.cpp 2011-05-20 05:54:20 +0000 +++ b/storage/ndb/src/ndbapi/NdbScanOperation.cpp 2011-10-19 12:19:45 +0000 @@ -57,22 +57,27 @@ NdbScanOperation::~NdbScanOperation() } void -NdbScanOperation::setErrorCode(int aErrorCode){ +NdbScanOperation::setErrorCode(int aErrorCode) const +{ + NdbScanOperation *pnonConstThis=const_cast(this); + NdbTransaction* tmp = theNdbCon; - theNdbCon = m_transConnection; + pnonConstThis->theNdbCon = m_transConnection; NdbOperation::setErrorCode(aErrorCode); - theNdbCon = tmp; + pnonConstThis->theNdbCon = tmp; } void -NdbScanOperation::setErrorCodeAbort(int aErrorCode){ +NdbScanOperation::setErrorCodeAbort(int aErrorCode) const +{ + NdbScanOperation *pnonConstThis=const_cast(this); + NdbTransaction* tmp = theNdbCon; - theNdbCon = m_transConnection; + pnonConstThis->theNdbCon = m_transConnection; NdbOperation::setErrorCodeAbort(aErrorCode); - theNdbCon = tmp; + pnonConstThis->theNdbCon = tmp; } - /***************************************************************************** * int init(); * @@ -2028,7 +2033,9 @@ NdbScanOperation::send_next_scan(Uint32 } int -NdbScanOperation::prepareSend(Uint32 TC_ConnectPtr, Uint64 TransactionId) +NdbScanOperation::prepareSend(Uint32 TC_ConnectPtr, + Uint64 TransactionId, + NdbOperation::AbortOption) { abort(); return 0; @@ -4064,3 +4071,14 @@ NdbScanOperation::getPruned() const (m_pruneState == SPS_FIXED)); } +NdbBlob* +NdbScanOperation::getBlobHandle(const char* anAttrName) const +{ + return NdbOperation::getBlobHandle(anAttrName); +} + +NdbBlob* +NdbScanOperation::getBlobHandle(Uint32 anAttrId) const +{ + return NdbOperation::getBlobHandle(anAttrId); +} === modified file 'storage/ndb/test/include/NdbMgmd.hpp' --- a/storage/ndb/test/include/NdbMgmd.hpp 2011-09-14 13:49:19 +0000 +++ b/storage/ndb/test/include/NdbMgmd.hpp 2011-10-19 12:20:58 +0000 @@ -227,7 +227,7 @@ public: SocketOutputStream out(socket()); - if (out.println(cmd)){ + if (out.println("%s", cmd)){ error("call: println failed at line %d", __LINE__); return false; } @@ -278,7 +278,7 @@ public: } // Send any bulk data - if (bulk && out.println(bulk)){ + if (bulk && out.println("%s", bulk)){ error("call: print('') failed at line %d", __LINE__); return false; } === modified file 'storage/ndb/test/ndbapi/testMgm.cpp' --- a/storage/ndb/test/ndbapi/testMgm.cpp 2011-09-19 20:03:43 +0000 +++ b/storage/ndb/test/ndbapi/testMgm.cpp 2011-10-19 12:20:58 +0000 @@ -736,8 +736,8 @@ get_nodeid_of_type(NdbMgmd& mgmd, ndb_mg int noOfNodes = cs->no_of_nodes; int randomnode = myRandom48(noOfNodes); ndb_mgm_node_state *ns = cs->node_states + randomnode; - assert(ns->node_type == (Uint32)type); - assert(ns->node_id); + assert((Uint32)ns->node_type == (Uint32)type); + assert(ns->node_id != 0); *nodeId = ns->node_id; g_info << "Got node id " << *nodeId << " of type " << type << endl; === modified file 'storage/ndb/tools/ndb_index_stat.cpp' --- a/storage/ndb/tools/ndb_index_stat.cpp 2011-08-17 10:36:01 +0000 +++ b/storage/ndb/tools/ndb_index_stat.cpp 2011-10-19 12:20:58 +0000 @@ -211,7 +211,6 @@ doquery() { NdbIndexStat::Bound& b = (i == 0 ? b_lo : b_hi); - bool strict = false; if (ndb_rand() % 3 != 0) { if (ndb_rand() % 3 != 0) No bundle (reason: useless for push emails).