summaryrefslogtreecommitdiff
path: root/ndb/src/rep/rep_version.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/src/rep/rep_version.hpp')
-rw-r--r--ndb/src/rep/rep_version.hpp86
1 files changed, 86 insertions, 0 deletions
diff --git a/ndb/src/rep/rep_version.hpp b/ndb/src/rep/rep_version.hpp
new file mode 100644
index 00000000000..a6af131f4ef
--- /dev/null
+++ b/ndb/src/rep/rep_version.hpp
@@ -0,0 +1,86 @@
+/* Copyright (C) 2003 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; either version 2 of the License, or
+ (at your option) any later version.
+
+ 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 */
+
+#ifndef REP_VERSION_HPP
+#define REP_VERSION_HPP
+
+/**
+ * Block number for REP
+ */
+#define SSREPBLOCKNO 1
+#define PSREPBLOCKNO 2
+
+#define DBUG
+
+extern "C"
+void
+DBUG_PRINT(const char * fmt, ...);
+
+extern "C"
+void
+replog(const char * fmt, ...);
+
+extern "C"
+void
+rlog(const char * fmt, ...);
+
+#define RLOG(ARGS) \
+ do { if (replogEnabled) { \
+ rlog ARGS; \
+ ndbout << " (" << __FILE__ << ":" << __LINE__ << ")" << endl; \
+ } \
+ } while (0)
+
+/**
+ * Replication logging on or off
+ */
+extern int replogEnabled;
+
+/**
+ * Used for config id
+ */
+#define REP_VERSION_ID 0
+
+#define MAX_NODE_GROUPS 6
+
+#define REPABORT(string) \
+ { \
+ ndbout_c("\nInternal error in %s:%d: %s", __FILE__, __LINE__, string); \
+ abort(); \
+ }
+#define REPABORT1(string, data1) \
+ { \
+ ndbout_c("\nInternal error in %s:%d: %s" \
+ "\n (data1: %d)", \
+ __FILE__, __LINE__, string, data1); \
+ abort(); \
+ }
+#define REPABORT2(string, data1, data2) \
+ { \
+ ndbout_c("\nInternal error in %s:%d: %s" \
+ "\n (data1: %d, data2: %d)", \
+ __FILE__, __LINE__, string, data1, data2); \
+ abort(); \
+ }
+#define REPABORT3(string, data1, data2, data3) \
+ { \
+ ndbout_c("\nInternal error in %s:%d: %s" \
+ "\n (data1: %d, data2: %d data3: %d)", \
+ __FILE__, __LINE__, string, data1, data2, data3); \
+ abort(); \
+ }
+
+#endif