summaryrefslogtreecommitdiff
path: root/ndb/include
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/include')
-rw-r--r--ndb/include/mgmcommon/ConfigRetriever.hpp8
-rw-r--r--ndb/include/ndbapi/Ndb.hpp5
-rw-r--r--ndb/include/ndbapi/NdbIndexOperation.hpp9
-rw-r--r--ndb/include/ndbapi/NdbOperation.hpp22
-rw-r--r--ndb/include/ndbapi/NdbScanOperation.hpp12
-rw-r--r--ndb/include/util/NdbAutoPtr.hpp10
6 files changed, 45 insertions, 21 deletions
diff --git a/ndb/include/mgmcommon/ConfigRetriever.hpp b/ndb/include/mgmcommon/ConfigRetriever.hpp
index 938f4c19071..6c32255e921 100644
--- a/ndb/include/mgmcommon/ConfigRetriever.hpp
+++ b/ndb/include/mgmcommon/ConfigRetriever.hpp
@@ -31,16 +31,10 @@ public:
ConfigRetriever(LocalConfig &local_config, Uint32 version, Uint32 nodeType);
~ConfigRetriever();
- /**
- * Read local config
- * @return Own node id, -1 means fail
- */
- int init();
-
int do_connect(int exit_on_connect_failure= false);
/**
- * Get configuration for current (nodeId given in local config file) node.
+ * Get configuration for current node.
*
* Configuration is fetched from one MGM server configured in local config
* file. The method loops over all the configured MGM servers and tries
diff --git a/ndb/include/ndbapi/Ndb.hpp b/ndb/include/ndbapi/Ndb.hpp
index 9d0e9714eef..550d0c0931a 100644
--- a/ndb/include/ndbapi/Ndb.hpp
+++ b/ndb/include/ndbapi/Ndb.hpp
@@ -1087,8 +1087,6 @@ public:
int waitUntilReady(int timeout = 60);
- void connected(Uint32 block_reference);
-
/** @} *********************************************************************/
/**
@@ -1447,6 +1445,9 @@ private:
void setup(Ndb_cluster_connection *ndb_cluster_connection,
const char* aCatalogName, const char* aSchemaName);
+ void connected(Uint32 block_reference);
+
+
NdbConnection* startTransactionLocal(Uint32 aPrio, Uint32 aFragmentId);
// Connect the connection object to the Database.
diff --git a/ndb/include/ndbapi/NdbIndexOperation.hpp b/ndb/include/ndbapi/NdbIndexOperation.hpp
index 36c3c73db2d..7612fe54d1b 100644
--- a/ndb/include/ndbapi/NdbIndexOperation.hpp
+++ b/ndb/include/ndbapi/NdbIndexOperation.hpp
@@ -56,6 +56,15 @@ public:
*
* @return 0 if successful otherwise -1.
*/
+ int readTuple(LockMode);
+
+ /**
+ * Define the NdbIndexOperation to be a standard operation of type readTuple.
+ * When calling NdbConnection::execute, this operation
+ * reads a tuple.
+ *
+ * @return 0 if successful otherwise -1.
+ */
int readTuple();
/**
diff --git a/ndb/include/ndbapi/NdbOperation.hpp b/ndb/include/ndbapi/NdbOperation.hpp
index 316fc2e116b..b2acdf26a85 100644
--- a/ndb/include/ndbapi/NdbOperation.hpp
+++ b/ndb/include/ndbapi/NdbOperation.hpp
@@ -52,6 +52,19 @@ public:
*/
/**
+ * Lock when performing read
+ */
+
+ enum LockMode {
+ LM_Read = 0,
+ LM_Exclusive = 1,
+ LM_CommittedRead = 2,
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
+ LM_Dirty = 2
+#endif
+ };
+
+ /**
* Define the NdbOperation to be a standard operation of type insertTuple.
* When calling NdbConnection::execute, this operation
* adds a new tuple to the table.
@@ -94,6 +107,15 @@ public:
* reads a tuple.
*
* @return 0 if successful otherwise -1.
+ */
+ virtual int readTuple(LockMode);
+
+ /**
+ * Define the NdbOperation to be a standard operation of type readTuple.
+ * When calling NdbConnection::execute, this operation
+ * reads a tuple.
+ *
+ * @return 0 if successful otherwise -1.
*/
virtual int readTuple();
diff --git a/ndb/include/ndbapi/NdbScanOperation.hpp b/ndb/include/ndbapi/NdbScanOperation.hpp
index 955b4f48d75..a93c087138a 100644
--- a/ndb/include/ndbapi/NdbScanOperation.hpp
+++ b/ndb/include/ndbapi/NdbScanOperation.hpp
@@ -54,18 +54,6 @@ public:
};
/**
- * Lock when performing scan
- */
- enum LockMode {
- LM_Read = 0,
- LM_Exclusive = 1,
- LM_CommittedRead = 2,
-#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
- LM_Dirty = 2
-#endif
- };
-
- /**
* Type of cursor
*/
CursorType get_cursor_type() const;
diff --git a/ndb/include/util/NdbAutoPtr.hpp b/ndb/include/util/NdbAutoPtr.hpp
index c01650ffc7e..ff747e3de68 100644
--- a/ndb/include/util/NdbAutoPtr.hpp
+++ b/ndb/include/util/NdbAutoPtr.hpp
@@ -18,6 +18,7 @@
#define __NDB_AUTO_PTR_HPP
#include <ndb_global.h>
+#include <my_sys.h>
template<typename T>
class NdbAutoPtr {
@@ -46,4 +47,13 @@ public:
~NdbAutoObjArrayPtr() { if (m_obj) delete[] m_obj;}
};
+template<typename T>
+class My_auto_ptr {
+ T * m_obj;
+public:
+ My_auto_ptr(T * obj = 0){ m_obj = obj;}
+ void reset(T * obj = 0) { if (m_obj) my_free(m_obj,MYF(0)); m_obj = obj; }
+ ~My_auto_ptr() { if (m_obj) my_free(m_obj,MYF(0));}
+};
+
#endif