summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <tomas@whalegate.ndb.mysql.com>2007-06-11 17:19:20 +0200
committerunknown <tomas@whalegate.ndb.mysql.com>2007-06-11 17:19:20 +0200
commit2821723e0fc9738b33c188a8d3729586935186e1 (patch)
tree9827d2053cfe8a46df58bef5dd082e7e3d4c7d4c
parent9e692d86f83c672aef54218a80bd277524491bba (diff)
downloadmariadb-git-2821723e0fc9738b33c188a8d3729586935186e1.tar.gz
internal interface to ndb (to be used by e.g. ndb_restore)
storage/ndb/src/ndbapi/ndb_internal.hpp: New BitKeeper file ``storage/ndb/src/ndbapi/ndb_internal.hpp''
-rw-r--r--storage/ndb/include/ndbapi/Ndb.hpp1
-rw-r--r--storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp3
-rw-r--r--storage/ndb/src/ndbapi/ndb_internal.hpp27
3 files changed, 30 insertions, 1 deletions
diff --git a/storage/ndb/include/ndbapi/Ndb.hpp b/storage/ndb/include/ndbapi/Ndb.hpp
index 5f96408ea30..e677616f43b 100644
--- a/storage/ndb/include/ndbapi/Ndb.hpp
+++ b/storage/ndb/include/ndbapi/Ndb.hpp
@@ -1055,6 +1055,7 @@ class Ndb
friend class NdbDictInterface;
friend class NdbBlob;
friend class NdbImpl;
+ friend class Ndb_internal;
#endif
public:
diff --git a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
index 00acfe62ad9..bfedf30d201 100644
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
@@ -41,6 +41,7 @@
#include <NdbEventOperation.hpp>
#include "NdbEventOperationImpl.hpp"
#include <signaldata/AlterTable.hpp>
+#include "ndb_internal.hpp"
#include <EventLogger.hpp>
extern EventLogger g_eventLogger;
@@ -2838,7 +2839,7 @@ send_report:
data[5]= apply_gci >> 32;
data[6]= latest_gci & ~(Uint32)0;
data[7]= latest_gci >> 32;
- m_ndb->theImpl->send_event_report(data,8);
+ Ndb_internal().send_event_report(m_ndb, data,8);
#ifdef VM_TRACE
assert(m_total_alloc >= m_free_data_sz);
#endif
diff --git a/storage/ndb/src/ndbapi/ndb_internal.hpp b/storage/ndb/src/ndbapi/ndb_internal.hpp
new file mode 100644
index 00000000000..488946dec83
--- /dev/null
+++ b/storage/ndb/src/ndbapi/ndb_internal.hpp
@@ -0,0 +1,27 @@
+/* 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.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#include <ndb_global.h>
+#include <Ndb.hpp>
+
+class Ndb_internal
+{
+private:
+ friend class NdbEventBuffer;
+ Ndb_internal() {}
+ virtual ~Ndb_internal() {}
+ int send_event_report(Ndb *ndb, Uint32 *data, Uint32 length)
+ { return ndb->theImpl->send_event_report(data, length); }
+};