summaryrefslogtreecommitdiff
path: root/ndb/include/ndbapi/Ndb.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/include/ndbapi/Ndb.hpp')
-rw-r--r--ndb/include/ndbapi/Ndb.hpp72
1 files changed, 35 insertions, 37 deletions
diff --git a/ndb/include/ndbapi/Ndb.hpp b/ndb/include/ndbapi/Ndb.hpp
index fd6e827ceb4..27da5c3fa39 100644
--- a/ndb/include/ndbapi/Ndb.hpp
+++ b/ndb/include/ndbapi/Ndb.hpp
@@ -860,7 +860,6 @@
#include <ndb_types.h>
#include <ndbapi_limits.h>
-#include <AttrType.hpp>
#include <NdbError.hpp>
#include <NdbDictionary.hpp>
@@ -870,8 +869,6 @@ class NdbEventOperationImpl;
class NdbScanOperation;
class NdbIndexOperation;
class NdbConnection;
-class NdbSchemaOp;
-class NdbSchemaCon;
class NdbApiSignal;
class NdbRecAttr;
class NdbLabel;
@@ -882,6 +879,7 @@ class NdbScanReceiver;
class Table;
class BaseString;
class NdbEventOperation;
+class NdbBlob;
typedef void (* NdbEventCallback)(NdbEventOperation*, Ndb*, void*);
@@ -961,14 +959,13 @@ class Ndb
friend class NdbOperation;
friend class NdbEventOperationImpl;
friend class NdbConnection;
- friend class NdbSchemaOp;
- friend class NdbSchemaCon;
friend class Table;
friend class NdbApiSignal;
friend class NdbScanReceiver;
friend class NdbIndexOperation;
friend class NdbDictionaryImpl;
friend class NdbDictInterface;
+ friend class NdbBlob;
public:
/**
@@ -1064,8 +1061,6 @@ public:
* A value larger than 1024 will be downgraded to 1024.
* This means that one Ndb object can handle at most 1024 parallel
* transactions.
- * There is a maximum of 128 simultaneous
- * Ndb object within one application process.
* @return 0 if successful, -1 otherwise.
*
* @note The internal implementation multiplies this value
@@ -1245,22 +1240,6 @@ public:
*/
void closeTransaction(NdbConnection* aConnection);
-#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
- /**
- * To create a table it is necessary to obtain a schema transaction
- * object.
- * All schema transactions need to closed when they are
- * completed.
- *
- * @return NdbSchemaCon
- */
- NdbSchemaCon* startSchemaTransaction();
-
- /**
- * Close schema transaction when finished.
- */
- void closeSchemaTransaction(NdbSchemaCon* aSchemaCon);
-#endif
/** @} *********************************************************************/
@@ -1384,13 +1363,27 @@ public:
* index names as DATABASENAME/SCHEMANAME/TABLENAME/INDEXNAME
* @param turnNamingOn bool true - turn naming on, false - turn naming off
*/
- static void useFullyQualifiedNames(bool turnNamingOn = true);
+ void useFullyQualifiedNames(bool turnNamingOn = true);
- static bool usingFullyQualifiedNames();
+ bool usingFullyQualifiedNames();
/** @} *********************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
+
+ /**
+ * Different types of tampering with the NDB Cluster.
+ * <b>Only for debugging purposes only.</b>
+ */
+ enum TamperType {
+ LockGlbChp = 1, ///< Lock GCP
+ UnlockGlbChp, ///< Unlock GCP
+ CrashNode, ///< Crash an NDB node
+ ReadRestartGCI, ///< Request the restart GCI id from NDB Cluster
+ InsertError ///< Execute an error in NDB Cluster
+ ///< (may crash system)
+ };
+
/**
* For testing purposes it is possible to tamper with the NDB Cluster
* (i.e. send a special signal to DBDIH, the NDB distribution handler).
@@ -1398,14 +1391,7 @@ public:
* In a release versions of NDB Cluster,
* this call always return -1 and does nothing.
*
- * @param aAction Action to be taken
- * - 1: Lock global checkpointing
- * (Can only be sent to master DIH,
- * Parameter aNode ignored).
- * - 2: UnLock global checkpointing
- * (Can only be sent to master DIH,
- * Parameter aNode ignored).
- * - 3: Crash node.
+ * @param aAction Action to be taken according to TamperType above
*
* @param aNode Which node the action will be taken
* -1: Master DIH.
@@ -1468,6 +1454,7 @@ private:
NdbIndexOperation* getIndexOperation();// Get an index operation from idle
class NdbGlobalEventBufferHandle* getGlobalEventBufferHandle();
+ NdbBlob* getNdbBlob();// Get a blob handle etc
void releaseSignal(NdbApiSignal* anApiSignal);
void releaseSignalsInList(NdbApiSignal** pList);
@@ -1479,6 +1466,7 @@ private:
void releaseRecAttr (NdbRecAttr* aRecAttr);
void releaseOperation(NdbOperation* anOperation);
void releaseScanOperation(NdbScanOperation* aScanOperation);
+ void releaseNdbBlob(NdbBlob* aBlob);
void check_send_timeout();
void remove_sent_list(Uint32);
@@ -1521,6 +1509,7 @@ private:
void freeNdbSubroutine();// Free the first idle NdbSubroutine obj
void freeNdbCall(); // Free the first idle NdbCall obj
void freeNdbScanRec(); // Free the first idle NdbScanRec obj
+ void freeNdbBlob(); // Free the first etc
NdbConnection* getNdbCon(); // Get a connection from idle list
@@ -1558,10 +1547,12 @@ private:
void abortTransactionsAfterNodeFailure(Uint16 aNodeId);
static
+ const char * externalizeTableName(const char * internalTableName, bool fullyQualifiedNames);
const char * externalizeTableName(const char * internalTableName);
const char * internalizeTableName(const char * externalTableName);
static
+ const char * externalizeIndexName(const char * internalIndexName, bool fullyQualifiedNames);
const char * externalizeIndexName(const char * internalIndexName);
const char * internalizeIndexName(const NdbTableImpl * table,
const char * externalIndexName);
@@ -1598,6 +1589,8 @@ private:
NdbWaiter theWaiter;
+ bool fullyQualifiedNames;
+
// Ndb database name.
char theDataBase[NDB_MAX_DATABASE_NAME_SIZE];
// Ndb database schema name.
@@ -1616,9 +1609,6 @@ private:
NdbScanOperation* theScanOpIdleList; // First scan operation in the idle list.
NdbIndexOperation* theIndexOpIdleList; // First index operation in the idle list.
- NdbSchemaCon* theSchemaConIdleList; // First schemaCon in idle list.
-
- NdbSchemaCon* theSchemaConToNdbList; // Connected schemaCon object.
NdbConnection* theTransactionList;
NdbConnection** theConnectionArray;
NdbRecAttr* theRecAttrIdleList;
@@ -1628,6 +1618,7 @@ private:
NdbSubroutine* theSubroutineList; // First subroutine descriptor in
NdbCall* theCallList; // First call descriptor in list
NdbScanReceiver* theScanList;
+ NdbBlob* theNdbBlobIdleList;
Uint32 theMyRef; // My block reference
Uint32 theNode; // The node number of our node
@@ -1649,7 +1640,14 @@ private:
NdbError theError;
Int32 theNdbBlockNumber;
- InitType theInitState;
+
+ enum InitType {
+ NotConstructed,
+ NotInitialised,
+ StartingInit,
+ Initialised,
+ InitConfigError
+ } theInitState;
// Ensure good distribution of connects
Uint32 theCurrentConnectIndex;