summaryrefslogtreecommitdiff
path: root/storage/ndb/include
diff options
context:
space:
mode:
authorunknown <tomas@whalegate.ndb.mysql.com>2007-06-17 17:21:27 +0200
committerunknown <tomas@whalegate.ndb.mysql.com>2007-06-17 17:21:27 +0200
commit8f7696d26657be40ef99d4d4cb8d64115b9eae95 (patch)
treeeb368394fe534c806714f0b0c11713445314fd77 /storage/ndb/include
parentce28c41eb7b42bc02a471aa43eee1d1bee94a330 (diff)
parente2380b98afafc67021bfa0db0171c320b02c25e9 (diff)
downloadmariadb-git-8f7696d26657be40ef99d4d4cb8d64115b9eae95.tar.gz
Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-engines extra/perror.c: Auto merged mysql-test/t/ndb_basic.test: Auto merged mysql-test/t/ndb_insert.test: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/mysqld.cc: Auto merged storage/ndb/src/common/transporter/Packer.cpp: Auto merged storage/ndb/src/common/transporter/TCP_Transporter.hpp: Auto merged storage/ndb/src/common/transporter/TransporterRegistry.cpp: Auto merged storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp: Auto merged storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Auto merged storage/ndb/src/mgmclient/main.cpp: Auto merged storage/ndb/src/ndbapi/NdbBlob.cpp: Auto merged storage/ndb/test/ndbapi/testNdbApi.cpp: Auto merged storage/ndb/test/run-test/daily-basic-tests.txt: Auto merged storage/ndb/tools/restore/consumer_restore.cpp: Auto merged mysql-test/t/disabled.def: manual merge
Diffstat (limited to 'storage/ndb/include')
-rw-r--r--storage/ndb/include/Makefile.am1
-rw-r--r--storage/ndb/include/debugger/EventLogger.hpp2
-rw-r--r--storage/ndb/include/mgmapi/mgmapi.h100
-rw-r--r--storage/ndb/include/mgmapi/mgmapi_config_parameters.h2
-rw-r--r--storage/ndb/include/mgmapi/mgmapi_error.h121
-rw-r--r--storage/ndb/include/ndbapi/Ndb.hpp12
-rw-r--r--storage/ndb/include/ndbapi/NdbOperation.hpp7
7 files changed, 141 insertions, 104 deletions
diff --git a/storage/ndb/include/Makefile.am b/storage/ndb/include/Makefile.am
index bf8fe392072..9e6ad016d75 100644
--- a/storage/ndb/include/Makefile.am
+++ b/storage/ndb/include/Makefile.am
@@ -45,6 +45,7 @@ ndbapi/ndberror.h
mgmapiinclude_HEADERS = \
mgmapi/mgmapi.h \
+mgmapi/mgmapi_error.h \
mgmapi/mgmapi_debug.h \
mgmapi/mgmapi_config_parameters.h \
mgmapi/mgmapi_config_parameters_debug.h \
diff --git a/storage/ndb/include/debugger/EventLogger.hpp b/storage/ndb/include/debugger/EventLogger.hpp
index 7e47dbf59db..8ae96162a48 100644
--- a/storage/ndb/include/debugger/EventLogger.hpp
+++ b/storage/ndb/include/debugger/EventLogger.hpp
@@ -173,5 +173,5 @@ private:
STATIC_CONST(MAX_TEXT_LENGTH = 256);
};
-
+extern void getRestartAction(Uint32 action, BaseString &str);
#endif
diff --git a/storage/ndb/include/mgmapi/mgmapi.h b/storage/ndb/include/mgmapi/mgmapi.h
index ffed44c7da1..0853f5a4422 100644
--- a/storage/ndb/include/mgmapi/mgmapi.h
+++ b/storage/ndb/include/mgmapi/mgmapi.h
@@ -18,6 +18,7 @@
#include "mgmapi_config_parameters.h"
#include "ndb_logevent.h"
+#include "mgmapi_error.h"
#define MGM_LOGLEVELS CFG_MAX_LOGLEVEL - CFG_MIN_LOGLEVEL + 1
#define NDB_MGM_MAX_LOGLEVEL 15
@@ -212,105 +213,6 @@ extern "C" {
};
/**
- * Error codes
- */
- enum ndb_mgm_error {
- /** Not an error */
- NDB_MGM_NO_ERROR = 0,
-
- /* Request for service errors */
- /** Supplied connectstring is illegal */
- NDB_MGM_ILLEGAL_CONNECT_STRING = 1001,
- /** Supplied NdbMgmHandle is illegal */
- NDB_MGM_ILLEGAL_SERVER_HANDLE = 1005,
- /** Illegal reply from server */
- NDB_MGM_ILLEGAL_SERVER_REPLY = 1006,
- /** Illegal number of nodes */
- NDB_MGM_ILLEGAL_NUMBER_OF_NODES = 1007,
- /** Illegal node status */
- NDB_MGM_ILLEGAL_NODE_STATUS = 1008,
- /** Memory allocation error */
- NDB_MGM_OUT_OF_MEMORY = 1009,
- /** Management server not connected */
- NDB_MGM_SERVER_NOT_CONNECTED = 1010,
- /** Could not connect to socker */
- NDB_MGM_COULD_NOT_CONNECT_TO_SOCKET = 1011,
- /** Could not bind local address */
- NDB_MGM_BIND_ADDRESS = 1012,
-
- /* Alloc node id failures */
- /** Generic error, retry may succeed */
- NDB_MGM_ALLOCID_ERROR = 1101,
- /** Non retriable error */
- NDB_MGM_ALLOCID_CONFIG_MISMATCH = 1102,
-
- /* Service errors - Start/Stop Node or System */
- /** Start failed */
- NDB_MGM_START_FAILED = 2001,
- /** Stop failed */
- NDB_MGM_STOP_FAILED = 2002,
- /** Restart failed */
- NDB_MGM_RESTART_FAILED = 2003,
-
- /* Service errors - Backup */
- /** Unable to start backup */
- NDB_MGM_COULD_NOT_START_BACKUP = 3001,
- /** Unable to abort backup */
- NDB_MGM_COULD_NOT_ABORT_BACKUP = 3002,
-
- /* Service errors - Single User Mode */
- /** Unable to enter single user mode */
- NDB_MGM_COULD_NOT_ENTER_SINGLE_USER_MODE = 4001,
- /** Unable to exit single user mode */
- NDB_MGM_COULD_NOT_EXIT_SINGLE_USER_MODE = 4002,
-
- /* Usage errors */
- /** Usage error */
- NDB_MGM_USAGE_ERROR = 5001
- };
-
-#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
- struct Ndb_Mgm_Error_Msg {
- enum ndb_mgm_error code;
- const char * msg;
- };
- const struct Ndb_Mgm_Error_Msg ndb_mgm_error_msgs[] = {
- { NDB_MGM_NO_ERROR, "No error" },
-
- /* Request for service errors */
- { NDB_MGM_ILLEGAL_CONNECT_STRING, "Illegal connect string" },
- { NDB_MGM_ILLEGAL_SERVER_HANDLE, "Illegal server handle" },
- { NDB_MGM_ILLEGAL_SERVER_REPLY, "Illegal reply from server" },
- { NDB_MGM_ILLEGAL_NUMBER_OF_NODES, "Illegal number of nodes" },
- { NDB_MGM_ILLEGAL_NODE_STATUS, "Illegal node status" },
- { NDB_MGM_OUT_OF_MEMORY, "Out of memory" },
- { NDB_MGM_SERVER_NOT_CONNECTED, "Management server not connected" },
- { NDB_MGM_COULD_NOT_CONNECT_TO_SOCKET, "Could not connect to socket" },
-
- /* Service errors - Start/Stop Node or System */
- { NDB_MGM_START_FAILED, "Start failed" },
- { NDB_MGM_STOP_FAILED, "Stop failed" },
- { NDB_MGM_RESTART_FAILED, "Restart failed" },
-
- /* Service errors - Backup */
- { NDB_MGM_COULD_NOT_START_BACKUP, "Could not start backup" },
- { NDB_MGM_COULD_NOT_ABORT_BACKUP, "Could not abort backup" },
-
- /* Service errors - Single User Mode */
- { NDB_MGM_COULD_NOT_ENTER_SINGLE_USER_MODE,
- "Could not enter single user mode" },
- { NDB_MGM_COULD_NOT_EXIT_SINGLE_USER_MODE,
- "Could not exit single user mode" },
-
- /* Usage errors */
- { NDB_MGM_USAGE_ERROR,
- "Usage error" }
- };
- const int ndb_mgm_noOfErrorMsgs =
- sizeof(ndb_mgm_error_msgs)/sizeof(struct Ndb_Mgm_Error_Msg);
-#endif
-
- /**
* Status of a node in the cluster.
*
* Sub-structure in enum ndb_mgm_cluster_state
diff --git a/storage/ndb/include/mgmapi/mgmapi_config_parameters.h b/storage/ndb/include/mgmapi/mgmapi_config_parameters.h
index d0bd8be16a3..ac2cbf060fd 100644
--- a/storage/ndb/include/mgmapi/mgmapi_config_parameters.h
+++ b/storage/ndb/include/mgmapi/mgmapi_config_parameters.h
@@ -118,6 +118,8 @@
#define CFG_DB_O_DIRECT 168
+#define CFG_DB_MAX_ALLOCATE 169
+
#define CFG_DB_SGA 198 /* super pool mem */
#define CFG_DB_DATA_MEM_2 199 /* used in special build in 5.1 */
diff --git a/storage/ndb/include/mgmapi/mgmapi_error.h b/storage/ndb/include/mgmapi/mgmapi_error.h
new file mode 100644
index 00000000000..2d0aa1ded0f
--- /dev/null
+++ b/storage/ndb/include/mgmapi/mgmapi_error.h
@@ -0,0 +1,121 @@
+/* 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; 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 */
+
+#ifndef MGMAPI_ERROR_H
+#define MGMAPI_ERROR_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ /**
+ * Error codes
+ */
+ enum ndb_mgm_error {
+ /** Not an error */
+ NDB_MGM_NO_ERROR = 0,
+
+ /* Request for service errors */
+ /** Supplied connectstring is illegal */
+ NDB_MGM_ILLEGAL_CONNECT_STRING = 1001,
+ /** Supplied NdbMgmHandle is illegal */
+ NDB_MGM_ILLEGAL_SERVER_HANDLE = 1005,
+ /** Illegal reply from server */
+ NDB_MGM_ILLEGAL_SERVER_REPLY = 1006,
+ /** Illegal number of nodes */
+ NDB_MGM_ILLEGAL_NUMBER_OF_NODES = 1007,
+ /** Illegal node status */
+ NDB_MGM_ILLEGAL_NODE_STATUS = 1008,
+ /** Memory allocation error */
+ NDB_MGM_OUT_OF_MEMORY = 1009,
+ /** Management server not connected */
+ NDB_MGM_SERVER_NOT_CONNECTED = 1010,
+ /** Could not connect to socker */
+ NDB_MGM_COULD_NOT_CONNECT_TO_SOCKET = 1011,
+ /** Could not bind local address */
+ NDB_MGM_BIND_ADDRESS = 1012,
+
+ /* Alloc node id failures */
+ /** Generic error, retry may succeed */
+ NDB_MGM_ALLOCID_ERROR = 1101,
+ /** Non retriable error */
+ NDB_MGM_ALLOCID_CONFIG_MISMATCH = 1102,
+
+ /* Service errors - Start/Stop Node or System */
+ /** Start failed */
+ NDB_MGM_START_FAILED = 2001,
+ /** Stop failed */
+ NDB_MGM_STOP_FAILED = 2002,
+ /** Restart failed */
+ NDB_MGM_RESTART_FAILED = 2003,
+
+ /* Service errors - Backup */
+ /** Unable to start backup */
+ NDB_MGM_COULD_NOT_START_BACKUP = 3001,
+ /** Unable to abort backup */
+ NDB_MGM_COULD_NOT_ABORT_BACKUP = 3002,
+
+ /* Service errors - Single User Mode */
+ /** Unable to enter single user mode */
+ NDB_MGM_COULD_NOT_ENTER_SINGLE_USER_MODE = 4001,
+ /** Unable to exit single user mode */
+ NDB_MGM_COULD_NOT_EXIT_SINGLE_USER_MODE = 4002,
+
+ /* Usage errors */
+ /** Usage error */
+ NDB_MGM_USAGE_ERROR = 5001
+ };
+ struct Ndb_Mgm_Error_Msg {
+ enum ndb_mgm_error code;
+ const char * msg;
+ };
+ const struct Ndb_Mgm_Error_Msg ndb_mgm_error_msgs[] = {
+ { NDB_MGM_NO_ERROR, "No error" },
+
+ /* Request for service errors */
+ { NDB_MGM_ILLEGAL_CONNECT_STRING, "Illegal connect string" },
+ { NDB_MGM_ILLEGAL_SERVER_HANDLE, "Illegal server handle" },
+ { NDB_MGM_ILLEGAL_SERVER_REPLY, "Illegal reply from server" },
+ { NDB_MGM_ILLEGAL_NUMBER_OF_NODES, "Illegal number of nodes" },
+ { NDB_MGM_ILLEGAL_NODE_STATUS, "Illegal node status" },
+ { NDB_MGM_OUT_OF_MEMORY, "Out of memory" },
+ { NDB_MGM_SERVER_NOT_CONNECTED, "Management server not connected" },
+ { NDB_MGM_COULD_NOT_CONNECT_TO_SOCKET, "Could not connect to socket" },
+
+ /* Service errors - Start/Stop Node or System */
+ { NDB_MGM_START_FAILED, "Start failed" },
+ { NDB_MGM_STOP_FAILED, "Stop failed" },
+ { NDB_MGM_RESTART_FAILED, "Restart failed" },
+
+ /* Service errors - Backup */
+ { NDB_MGM_COULD_NOT_START_BACKUP, "Could not start backup" },
+ { NDB_MGM_COULD_NOT_ABORT_BACKUP, "Could not abort backup" },
+
+ /* Service errors - Single User Mode */
+ { NDB_MGM_COULD_NOT_ENTER_SINGLE_USER_MODE,
+ "Could not enter single user mode" },
+ { NDB_MGM_COULD_NOT_EXIT_SINGLE_USER_MODE,
+ "Could not exit single user mode" },
+
+ /* Usage errors */
+ { NDB_MGM_USAGE_ERROR,
+ "Usage error" }
+ };
+ const int ndb_mgm_noOfErrorMsgs =
+ sizeof(ndb_mgm_error_msgs)/sizeof(struct Ndb_Mgm_Error_Msg);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/storage/ndb/include/ndbapi/Ndb.hpp b/storage/ndb/include/ndbapi/Ndb.hpp
index 5f96408ea30..a6a3df92ddb 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:
@@ -1488,12 +1489,15 @@ public:
int initAutoIncrement();
int getAutoIncrementValue(const char* aTableName,
- Uint64 & tupleId, Uint32 cacheSize);
+ Uint64 & tupleId, Uint32 cacheSize,
+ Uint64 step = 1, Uint64 start = 1);
int getAutoIncrementValue(const NdbDictionary::Table * aTable,
- Uint64 & tupleId, Uint32 cacheSize);
+ Uint64 & tupleId, Uint32 cacheSize,
+ Uint64 step = 1, Uint64 start = 1);
int getAutoIncrementValue(const NdbDictionary::Table * aTable,
TupleIdRange & range, Uint64 & tupleId,
- Uint32 cacheSize);
+ Uint32 cacheSize,
+ Uint64 step = 1, Uint64 start = 1);
int readAutoIncrementValue(const char* aTableName,
Uint64 & tupleId);
int readAutoIncrementValue(const NdbDictionary::Table * aTable,
@@ -1510,7 +1514,7 @@ public:
private:
int getTupleIdFromNdb(const NdbTableImpl* table,
TupleIdRange & range, Uint64 & tupleId,
- Uint32 cacheSize);
+ Uint32 cacheSize, Uint64 step = 1, Uint64 start = 1);
int readTupleIdFromNdb(const NdbTableImpl* table,
TupleIdRange & range, Uint64 & tupleId);
int setTupleIdInNdb(const NdbTableImpl* table,
diff --git a/storage/ndb/include/ndbapi/NdbOperation.hpp b/storage/ndb/include/ndbapi/NdbOperation.hpp
index 0fa2cac0a32..06111941df4 100644
--- a/storage/ndb/include/ndbapi/NdbOperation.hpp
+++ b/storage/ndb/include/ndbapi/NdbOperation.hpp
@@ -1042,6 +1042,13 @@ protected:
*/
Int8 m_abortOption;
+ /*
+ * For blob impl, option to not propagate error to trans level.
+ * Could be AO_IgnoreError variant if we want it public.
+ * Ignored unless AO_IgnoreError is also set.
+ */
+ Int8 m_noErrorPropagation;
+
friend struct Ndb_free_list_t<NdbOperation>;
};