List:Commits« Previous MessageNext Message »
From:Martin Zaun Date:October 7 2009 3:25am
Subject:bzr push into mysql-5.1-telco-6.2 branch (martin.zaun:3015 to 3016)
View as plain text  
 3016 Martin Zaun	2009-10-06
      ndb - bug44798 - fixed unnecessary non-const overloaded member functions causing Java name clashes.

    modified:
      storage/ndb/include/ndbapi/NdbDictionary.hpp
      storage/ndb/include/ndbapi/NdbOperation.hpp
      storage/ndb/src/ndbapi/NdbDictionary.cpp
      storage/ndb/src/ndbapi/NdbOperation.cpp
 3015 Jonas Oreland	2009-10-06
      ndb - bug#47816 - handle api-fail-req with nodeid > 49

    modified:
      storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
=== modified file 'storage/ndb/include/ndbapi/NdbDictionary.hpp'
--- a/storage/ndb/include/ndbapi/NdbDictionary.hpp	2009-06-13 18:56:08 +0000
+++ b/storage/ndb/include/ndbapi/NdbDictionary.hpp	2009-10-07 02:21:54 +0000
@@ -1920,7 +1920,9 @@ public:
      * @return       -1 if error.
      *
      */
+#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
     int listObjects(List & list, Object::Type type = Object::TypeUndefined);
+#endif
     int listObjects(List & list,
 		    Object::Type type = Object::TypeUndefined) const;
 
@@ -1974,7 +1976,9 @@ public:
      * @param tableName  Name of table that index belongs to.
      * @return  0 if successful, otherwise -1
      */
+#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
     int listIndexes(List & list, const char * tableName);
+#endif
     int listIndexes(List & list, const char * tableName) const;
 
 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
@@ -2019,7 +2023,9 @@ public:
      * @param list   List of events returned in the dictionary
      * @return 0 if successful otherwise -1.
      */
+#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
     int listEvents(List & list);
+#endif
     int listEvents(List & list) const;
 
     /** @} *******************************************************************/

=== modified file 'storage/ndb/include/ndbapi/NdbOperation.hpp'
--- a/storage/ndb/include/ndbapi/NdbOperation.hpp	2009-06-13 18:56:08 +0000
+++ b/storage/ndb/include/ndbapi/NdbOperation.hpp	2009-10-07 02:21:54 +0000
@@ -839,7 +839,9 @@ public:
    * 
    * @return method number where the error occured.
    */
+#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
   int getNdbErrorLine();
+#endif
   int getNdbErrorLine() const;
 
   /**
@@ -1482,7 +1484,9 @@ inline
 int
 NdbOperation::getNdbErrorLine()
 {
-  return theErrorLine;
+  // delegate to overloaded const function for same semantics
+  const NdbOperation * const cthis = this;
+  return cthis->NdbOperation::getNdbErrorLine();
 }
 
 inline

=== modified file 'storage/ndb/src/ndbapi/NdbDictionary.cpp'
--- a/storage/ndb/src/ndbapi/NdbDictionary.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/ndbapi/NdbDictionary.cpp	2009-10-07 02:21:54 +0000
@@ -2054,7 +2054,9 @@ NdbDictionary::Dictionary::getEvent(cons
 int
 NdbDictionary::Dictionary::listEvents(List& list)
 {
-  return m_impl.listEvents(list);
+  // delegate to overloaded const function for same semantics
+  const NdbDictionary::Dictionary * const cthis = this;
+  return cthis->NdbDictionary::Dictionary::listEvents(list);
 }
 
 int
@@ -2066,7 +2068,9 @@ NdbDictionary::Dictionary::listEvents(Li
 int
 NdbDictionary::Dictionary::listObjects(List& list, Object::Type type)
 {
-  return m_impl.listObjects(list, type);
+  // delegate to overloaded const function for same semantics
+  const NdbDictionary::Dictionary * const cthis = this;
+  return cthis->NdbDictionary::Dictionary::listObjects(list, type);
 }
 
 int
@@ -2078,12 +2082,9 @@ NdbDictionary::Dictionary::listObjects(L
 int
 NdbDictionary::Dictionary::listIndexes(List& list, const char * tableName)
 {
-  const NdbDictionary::Table* tab= getTable(tableName);
-  if(tab == 0)
-  {
-    return -1;
-  }
-  return m_impl.listIndexes(list, tab->getTableId());
+  // delegate to overloaded const function for same semantics
+  const NdbDictionary::Dictionary * const cthis = this;
+  return cthis->NdbDictionary::Dictionary::listIndexes(list, tableName);
 }
 
 int

=== modified file 'storage/ndb/src/ndbapi/NdbOperation.cpp'
--- a/storage/ndb/src/ndbapi/NdbOperation.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/ndbapi/NdbOperation.cpp	2009-10-07 02:21:54 +0000
@@ -377,6 +377,9 @@ NdbOperation::setValue(Uint32 anAttrId, 
 NdbBlob*
 NdbOperation::getBlobHandle(const char* anAttrName)
 {
+  // semantics differs from overloaded 'getBlobHandle(const char*) const'
+  // by delegating to the non-const variant of internal getBlobHandle(...),
+  // which may create a new BlobHandle
   const NdbColumnImpl* col = m_currentTable->getColumn(anAttrName);
   if (col == NULL)
   {
@@ -392,6 +395,9 @@ NdbOperation::getBlobHandle(const char* 
 NdbBlob*
 NdbOperation::getBlobHandle(Uint32 anAttrId)
 {
+  // semantics differs from overloaded 'getBlobHandle(Uint32) const'
+  // by delegating to the non-const variant of internal getBlobHandle(...),
+  // which may create a new BlobHandle
   const NdbColumnImpl* col = m_currentTable->getColumn(anAttrId);
   if (col == NULL)
   {


Attachment: [text/bzr-bundle] bzr/martin.zaun@sun.com-20091007022154-48unh0lq4a17uakd.bundle
Thread
bzr push into mysql-5.1-telco-6.2 branch (martin.zaun:3015 to 3016)Martin Zaun7 Oct