#At file:///Users/mz/mysql/ndb-6.3/ based on revid:jonas@stripped
3090 Martin Zaun 2009-10-06 [merge]
Merged from ndb-6.2 to ndb-6.3
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
=== modified file 'storage/ndb/include/ndbapi/NdbDictionary.hpp'
--- a/storage/ndb/include/ndbapi/NdbDictionary.hpp 2009-09-04 11:01:23 +0000
+++ b/storage/ndb/include/ndbapi/NdbDictionary.hpp 2009-10-07 02:41:41 +0000
@@ -1993,7 +1993,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;
@@ -2047,7 +2049,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
@@ -2092,7 +2096,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 19:06:06 +0000
+++ b/storage/ndb/include/ndbapi/NdbOperation.hpp 2009-10-07 02:41:41 +0000
@@ -878,7 +878,9 @@ public:
*
* @return method number where the error occured.
*/
+#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
int getNdbErrorLine();
+#endif
int getNdbErrorLine() const;
/**
@@ -1528,7 +1530,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-27 12:11:46 +0000
+++ b/storage/ndb/src/ndbapi/NdbDictionary.cpp 2009-10-07 02:41:41 +0000
@@ -2145,7 +2145,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
@@ -2157,7 +2159,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
@@ -2169,12 +2173,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-27 12:11:46 +0000
+++ b/storage/ndb/src/ndbapi/NdbOperation.cpp 2009-10-07 02:41:41 +0000
@@ -379,6 +379,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)
{
@@ -394,6 +397,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-20091007024141-rxk6fipy3sn8xyxe.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-6.3 branch (martin.zaun:3090) | Martin Zaun | 7 Oct |