summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <joerg@trift-lap.fambruehe>2007-04-26 16:48:53 +0200
committerunknown <joerg@trift-lap.fambruehe>2007-04-26 16:48:53 +0200
commit11a36eb5ecbb495c32a26be6e075e617bdfb5c27 (patch)
treed7702bc7b9c02ac6d8a86dad5b682eaf7a988df0 /ndb
parent7115585f27362ae2c74f7c4998f1937d225705ca (diff)
parent0d3c4483530469670b05acc77b853aad6b78a6e7 (diff)
downloadmariadb-git-11a36eb5ecbb495c32a26be6e075e617bdfb5c27.tar.gz
Merge trift-lap.fambruehe:/MySQL/M50/clone-5.0
into trift-lap.fambruehe:/MySQL/M50/push-5.0 Makefile.am: Auto merged scripts/mysql_install_db.sh: Auto merged scripts/mysql_system_tables.sql: Auto merged scripts/mysql_system_tables_data.sql: Auto merged sql/item_subselect.h: Auto merged ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Manual merge: Use the symbolic constant. ndb/test/ndbapi/testScanFilter.cpp: Manual merge: Use the standard text.
Diffstat (limited to 'ndb')
-rw-r--r--ndb/include/ndbapi/Ndb.hpp13
-rw-r--r--ndb/src/ndbapi/NdbImpl.hpp15
-rw-r--r--ndb/test/ndbapi/testScanFilter.cpp4
3 files changed, 15 insertions, 17 deletions
diff --git a/ndb/include/ndbapi/Ndb.hpp b/ndb/include/ndbapi/Ndb.hpp
index 5af86cd09a8..b3c9acd4e20 100644
--- a/ndb/include/ndbapi/Ndb.hpp
+++ b/ndb/include/ndbapi/Ndb.hpp
@@ -1051,18 +1051,7 @@ class Ndb
friend class NdbDictionaryImpl;
friend class NdbDictInterface;
friend class NdbBlob;
- friend class Ndb_free_list_t<NdbRecAttr>;
- friend class Ndb_free_list_t<NdbApiSignal>;
- friend class Ndb_free_list_t<NdbLabel>;
- friend class Ndb_free_list_t<NdbBranch>;
- friend class Ndb_free_list_t<NdbSubroutine>;
- friend class Ndb_free_list_t<NdbCall>;
- friend class Ndb_free_list_t<NdbBlob>;
- friend class Ndb_free_list_t<NdbReceiver>;
- friend class Ndb_free_list_t<NdbIndexScanOperation>;
- friend class Ndb_free_list_t<NdbOperation>;
- friend class Ndb_free_list_t<NdbIndexOperation>;
- friend class Ndb_free_list_t<NdbTransaction>;
+ friend class NdbImpl;
#endif
public:
diff --git a/ndb/src/ndbapi/NdbImpl.hpp b/ndb/src/ndbapi/NdbImpl.hpp
index ec386074692..dc0a057619f 100644
--- a/ndb/src/ndbapi/NdbImpl.hpp
+++ b/ndb/src/ndbapi/NdbImpl.hpp
@@ -89,6 +89,15 @@ public:
return 0;
}
+/*
+ We need this friend accessor function to work around a HP compiler problem,
+ where template class friends are not working.
+*/
+ static inline void setNdbError(Ndb &ndb,int code){
+ ndb.theError.code = code;
+ return;
+ }
+
/**
* NOTE free lists must be _after_ theNdbObjectIdMap take
* assure that destructors are run in correct order
@@ -208,7 +217,7 @@ Ndb_free_list_t<T>::fill(Ndb* ndb, Uint32 cnt)
m_free_list = new T(ndb);
if (m_free_list == 0)
{
- ndb->theError.code = 4000;
+ NdbImpl::setNdbError(*ndb, 4000);
assert(false);
return -1;
}
@@ -218,7 +227,7 @@ Ndb_free_list_t<T>::fill(Ndb* ndb, Uint32 cnt)
T* obj= new T(ndb);
if(obj == 0)
{
- ndb->theError.code = 4000;
+ NdbImpl::setNdbError(*ndb, 4000);
assert(false);
return -1;
}
@@ -250,7 +259,7 @@ Ndb_free_list_t<T>::seize(Ndb* ndb)
}
else
{
- ndb->theError.code = 4000;
+ NdbImpl::setNdbError(*ndb, 4000);
assert(false);
}
return tmp;
diff --git a/ndb/test/ndbapi/testScanFilter.cpp b/ndb/test/ndbapi/testScanFilter.cpp
index 4ce9145bc1e..5098d83745b 100644
--- a/ndb/test/ndbapi/testScanFilter.cpp
+++ b/ndb/test/ndbapi/testScanFilter.cpp
@@ -1,8 +1,8 @@
-/* Copyright (C) 2007, Justin He, MySQL AB
+/* Copyright (C) 2007 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License only.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of