summaryrefslogtreecommitdiff
path: root/ndb/include
diff options
context:
space:
mode:
authorunknown <jonas@perch.ndb.mysql.com>2005-09-20 10:46:33 +0200
committerunknown <jonas@perch.ndb.mysql.com>2005-09-20 10:46:33 +0200
commit130e902cf1ed280fd2b3c635c080709a8fab7908 (patch)
tree60995e94c892ece45bee712856f8b9becfb7d1df /ndb/include
parent8e2d318bb1491cb4e22fa2e6aed6a867c2ccec2d (diff)
parentb390a1a4000d15588162cddc445fb9663ae3c089 (diff)
downloadmariadb-git-130e902cf1ed280fd2b3c635c080709a8fab7908.tar.gz
Merge perch.ndb.mysql.com:/home/jonas/src/mysql-4.1
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.0 ndb/include/ndbapi/NdbBlob.hpp: Auto merged ndb/include/ndbapi/NdbOperation.hpp: Auto merged ndb/include/ndbapi/NdbRecAttr.hpp: Auto merged ndb/src/ndbapi/NdbApiSignal.cpp: Auto merged ndb/src/ndbapi/NdbApiSignal.hpp: Auto merged ndb/src/ndbapi/NdbBlob.cpp: Auto merged ndb/src/ndbapi/NdbRecAttr.cpp: Auto merged ndb/src/ndbapi/Ndbif.cpp: Auto merged ndb/src/ndbapi/Ndbinit.cpp: Auto merged ndb/test/include/NDBT_Test.hpp: Auto merged ndb/test/ndbapi/bank/BankLoad.cpp: Auto merged ndb/test/ndbapi/testOIBasic.cpp: Auto merged ndb/test/src/NdbBackup.cpp: Auto merged ndb/test/src/NdbRestarts.cpp: Auto merged ndb/tools/restore/Restore.cpp: Auto merged sql/ha_ndbcluster.h: Auto merged sql/sql_yacc.yy: Auto merged ndb/include/ndbapi/Ndb.hpp: merge ndb/include/ndbapi/NdbIndexOperation.hpp: merge ndb/include/ndbapi/NdbIndexScanOperation.hpp: merge ndb/include/ndbapi/NdbTransaction.hpp: merge ndb/src/ndbapi/NdbImpl.hpp: merge ndb/src/ndbapi/Ndblist.cpp: merge ndb/test/src/HugoCalculator.cpp: merge ndb/test/src/NDBT_Test.cpp: merge sql/ha_ndbcluster.cc: merge sql/mysqld.cc: merge sql/sql_lex.h: merge sql/sql_parse.cc: merge
Diffstat (limited to 'ndb/include')
-rw-r--r--ndb/include/ndbapi/Ndb.hpp28
-rw-r--r--ndb/include/ndbapi/NdbBlob.hpp6
-rw-r--r--ndb/include/ndbapi/NdbIndexOperation.hpp1
-rw-r--r--ndb/include/ndbapi/NdbIndexScanOperation.hpp3
-rw-r--r--ndb/include/ndbapi/NdbOperation.hpp7
-rw-r--r--ndb/include/ndbapi/NdbRecAttr.hpp7
-rw-r--r--ndb/include/ndbapi/NdbTransaction.hpp8
7 files changed, 35 insertions, 25 deletions
diff --git a/ndb/include/ndbapi/Ndb.hpp b/ndb/include/ndbapi/Ndb.hpp
index db2212075e8..7e2e9037a34 100644
--- a/ndb/include/ndbapi/Ndb.hpp
+++ b/ndb/include/ndbapi/Ndb.hpp
@@ -984,10 +984,10 @@ class BaseString;
class NdbEventOperation;
class NdbBlob;
class NdbReceiver;
+template <class T> struct Ndb_free_list_t;
typedef void (* NdbEventCallback)(NdbEventOperation*, Ndb*, void*);
-
#if defined NDB_OSE
/**
* Default time to wait for response after request has been sent to
@@ -1457,8 +1457,20 @@ public:
*/
NdbTransaction* hupp( NdbTransaction* );
Uint32 getReference() const { return theMyRef;}
+
+ struct Free_list_usage
+ {
+ const char * m_name;
+ Uint32 m_created;
+ Uint32 m_free;
+ Uint32 m_sizeof;
+ };
+
+ Free_list_usage * get_free_list_usage(Free_list_usage*);
#endif
+
+
/*****************************************************************************
* These are service routines used by the other classes in the NDBAPI.
****************************************************************************/
@@ -1630,22 +1642,8 @@ private:
class NdbDictionaryImpl* theDictionary;
class NdbGlobalEventBufferHandle* theGlobalEventBufferHandle;
- NdbTransaction* theConIdleList; // First connection in idle list.
-
- NdbOperation* theOpIdleList; // First operation in the idle list.
-
- NdbIndexScanOperation* theScanOpIdleList; // First scan operation in the idle list.
- NdbIndexOperation* theIndexOpIdleList; // First index operation in the idle list.
NdbTransaction* theTransactionList;
NdbTransaction** theConnectionArray;
- NdbRecAttr* theRecAttrIdleList;
- NdbApiSignal* theSignalIdleList; // First signal in idlelist.
- NdbLabel* theLabelList; // First label descriptor in list
- NdbBranch* theBranchList; // First branch descriptor in list
- NdbSubroutine* theSubroutineList; // First subroutine descriptor in
- NdbCall* theCallList; // First call descriptor in list
- NdbReceiver* theScanList;
- NdbBlob* theNdbBlobIdleList;
Uint32 theMyRef; // My block reference
Uint32 theNode; // The node number of our node
diff --git a/ndb/include/ndbapi/NdbBlob.hpp b/ndb/include/ndbapi/NdbBlob.hpp
index 271287b765c..cb0caafe34f 100644
--- a/ndb/include/ndbapi/NdbBlob.hpp
+++ b/ndb/include/ndbapi/NdbBlob.hpp
@@ -277,7 +277,7 @@ private:
// for keeping in lists
NdbBlob* theNext;
// initialization
- NdbBlob();
+ NdbBlob(Ndb*);
void init();
void release();
// classify operations
@@ -329,6 +329,10 @@ private:
int getOperationType() const;
friend class NdbOut& operator<<(NdbOut&, const NdbBlob&);
#endif
+
+ void next(NdbBlob* obj) { theNext= obj;}
+ NdbBlob* next() { return theNext;}
+ friend struct Ndb_free_list_t<NdbBlob>;
};
#endif
diff --git a/ndb/include/ndbapi/NdbIndexOperation.hpp b/ndb/include/ndbapi/NdbIndexOperation.hpp
index 3de6835238e..a8a15978568 100644
--- a/ndb/include/ndbapi/NdbIndexOperation.hpp
+++ b/ndb/include/ndbapi/NdbIndexOperation.hpp
@@ -181,6 +181,7 @@ private:
// Private attributes
const NdbIndexImpl* m_theIndex;
+ friend struct Ndb_free_list_t<NdbIndexOperation>;
};
#endif
diff --git a/ndb/include/ndbapi/NdbIndexScanOperation.hpp b/ndb/include/ndbapi/NdbIndexScanOperation.hpp
index 0a31f228921..e9f92d84d1c 100644
--- a/ndb/include/ndbapi/NdbIndexScanOperation.hpp
+++ b/ndb/include/ndbapi/NdbIndexScanOperation.hpp
@@ -165,9 +165,10 @@ private:
int compare(Uint32 key, Uint32 cols, const NdbReceiver*, const NdbReceiver*);
Uint32 m_sort_columns;
-
Uint32 m_this_bound_start;
Uint32 * m_first_bound_word;
+
+ friend struct Ndb_free_list_t<NdbIndexScanOperation>;
};
#endif
diff --git a/ndb/include/ndbapi/NdbOperation.hpp b/ndb/include/ndbapi/NdbOperation.hpp
index fca610772cc..1035c642c97 100644
--- a/ndb/include/ndbapi/NdbOperation.hpp
+++ b/ndb/include/ndbapi/NdbOperation.hpp
@@ -22,6 +22,7 @@
#include "NdbError.hpp"
#include "NdbReceiver.hpp"
#include "NdbDictionary.hpp"
+#include "Ndb.hpp"
class Ndb;
class NdbApiSignal;
@@ -756,8 +757,6 @@ protected:
/******************************************************************************
* These are the methods used to create and delete the NdbOperation objects.
*****************************************************************************/
- NdbOperation(Ndb* aNdb);
- virtual ~NdbOperation();
bool needReply();
/******************************************************************************
@@ -769,6 +768,8 @@ protected:
int init(const class NdbTableImpl*, NdbTransaction* aCon);
void initInterpreter();
+ NdbOperation(Ndb* aNdb);
+ virtual ~NdbOperation();
void next(NdbOperation*); // Set next pointer
NdbOperation* next(); // Get next pointer
public:
@@ -965,6 +966,8 @@ protected:
* IgnoreError on connection level.
*/
Int8 m_abortOption;
+
+ friend struct Ndb_free_list_t<NdbOperation>;
};
#ifdef NDB_NO_DROPPED_SIGNAL
diff --git a/ndb/include/ndbapi/NdbRecAttr.hpp b/ndb/include/ndbapi/NdbRecAttr.hpp
index 50de4f3277e..3607a64f3b3 100644
--- a/ndb/include/ndbapi/NdbRecAttr.hpp
+++ b/ndb/include/ndbapi/NdbRecAttr.hpp
@@ -17,7 +17,8 @@
#ifndef NdbRecAttr_H
#define NdbRecAttr_H
-#include <NdbDictionary.hpp>
+#include "NdbDictionary.hpp"
+#include "Ndb.hpp"
class NdbOperation;
@@ -248,7 +249,6 @@ public:
const NdbRecAttr* next() const;
#endif
private:
- NdbRecAttr();
Uint32 attrId() const; /* Get attribute id */
bool setNULL(); /* Set NULL indicator */
@@ -258,6 +258,7 @@ private:
void release(); /* Release memory if allocated */
void init(); /* Initialise object when allocated */
+ NdbRecAttr(Ndb*);
void next(NdbRecAttr* aRecAttr);
NdbRecAttr* next();
@@ -280,6 +281,8 @@ private:
Uint32 theAttrSize;
Uint32 theArraySize;
const NdbDictionary::Column* m_column;
+
+ friend struct Ndb_free_list_t<NdbRecAttr>;
};
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
diff --git a/ndb/include/ndbapi/NdbTransaction.hpp b/ndb/include/ndbapi/NdbTransaction.hpp
index 2e102b104d8..4b12b0acbf3 100644
--- a/ndb/include/ndbapi/NdbTransaction.hpp
+++ b/ndb/include/ndbapi/NdbTransaction.hpp
@@ -18,8 +18,9 @@
#define NdbTransaction_H
#include <ndb_types.h>
-#include <NdbError.hpp>
-#include <NdbDictionary.hpp>
+#include "NdbError.hpp"
+#include "NdbDictionary.hpp"
+#include "Ndb.hpp"
class NdbTransaction;
class NdbOperation;
@@ -581,9 +582,7 @@ private:
/**************************************************************************
* These are the create and delete methods of this class. *
**************************************************************************/
-
NdbTransaction(Ndb* aNdb);
-
~NdbTransaction();
void init(); // Initialize connection object for new transaction
@@ -807,6 +806,7 @@ private:
void define_scan_op(NdbIndexScanOperation*);
friend class HugoOperations;
+ friend struct Ndb_free_list_t<NdbConnection>;
};
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL