Commit 3d3ad211 authored by unknown's avatar unknown
Browse files

aligned backup errorcodes with rest of ndb error codes giving it range from 1300

    added new error type "configuration or application error"
    Added check if backup is issued during diskless mode, backup refuse returned
    added possibility to get error code as a result from management client
    addded possibility to set connecstring with CONNECT command
    changed to use strcasecmp instead of strcmp
    added possibility to run one command on cammand client to ndb_mgm and get an errorcode of command fails
    made thread safe veriosn of getErrorText in management server
    aligned backup errorcodes with rest of ndb error codes giving it range from 1300
    print error message from regular ndberror struct
    added new arrer type "cofiguration or application error"
    commented on allocaded ranges for errors


ndb/include/kernel/signaldata/BackupImpl.hpp:
  aligned backup errorcodes with rest of ndb error codes giving it range from 1300
ndb/include/kernel/signaldata/BackupSignalData.hpp:
  aligned backup errorcodes with rest of ndb error codes giving it range from 1300
ndb/include/ndbapi/ndberror.h:
  added new error type "configuration or application error"
ndb/src/kernel/blocks/backup/Backup.cpp:
  Added check if backup is issued during diskless mode, backup refuse returned
ndb/src/kernel/blocks/backup/Backup.hpp:
  member variable in backup block to indicate diskless or not
ndb/src/kernel/blocks/backup/BackupInit.cpp:
  Added check if backup is issued during diskless mode, backup refuse returned
ndb/src/mgmclient/CommandInterpreter.cpp:
  added possibility to get error code as a result from management client
  addded possibility to set connecstring with CONNECT command
  changed to use strcasecmp instead of strcmp
ndb/src/mgmclient/main.cpp:
  added possibility to run one command on cammand client to ndb_mgm and get an errorcode of command fails
ndb/src/mgmclient/ndb_mgmclient.hpp:
  added possibility to get error code as a result from management client
ndb/src/mgmsrv/CommandInterpreter.cpp:
  made thread safe veriosn of getErrorText in management server
ndb/src/mgmsrv/CommandInterpreter.hpp:
  made thread safe veriosn of getErrorText in management server
ndb/src/mgmsrv/MgmtSrvr.cpp:
  aligned backup errorcodes with rest of ndb error codes giving it range from 1300
  print error message from regular ndberror struct
ndb/src/mgmsrv/MgmtSrvr.hpp:
  made thread safe veriosn of getErrorText in management server
ndb/src/mgmsrv/Services.cpp:
  made thread safe veriosn of getErrorText in management server
ndb/src/mgmsrv/Services.hpp:
  made thread safe veriosn of getErrorText in management server
ndb/src/ndbapi/ndberror.c:
  added new arrer type "cofiguration or application error"
  commented on allocaded ranges for errors
  aligned backup errors with rest of errors
parent ada600e8
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -78,15 +78,15 @@ public:
  STATIC_CONST( SignalLength = 3 );
  
  enum ErrorCode {
    Undefined = 200,
    FailedToAllocateBuffers = 202,
    FailedToSetupFsBuffers = 203,
    FailedToAllocateTables = 204,
    FailedInsertFileHeader = 205,
    FailedInsertTableList = 206,
    FailedAllocateTableMem = 207,
    FailedToAllocateFileRecord = 208,
    FailedToAllocateAttributeRecord = 209
    Undefined = 1340,
    FailedToAllocateBuffers = 1342,
    FailedToSetupFsBuffers = 1343,
    FailedToAllocateTables = 1344,
    FailedInsertFileHeader = 1345,
    FailedInsertTableList = 1346,
    FailedAllocateTableMem = 1347,
    FailedToAllocateFileRecord = 1348,
    FailedToAllocateAttributeRecord = 1349
  };
private:
  Uint32 backupId;
+14 −13
Original line number Diff line number Diff line
@@ -119,12 +119,13 @@ public:

private:
  enum ErrorCodes {
    Undefined = 100,
    IAmNotMaster  = 101,
    OutOfBackupRecord = 102,
    OutOfResources = 103,
    SequenceFailure = 104,
    BackupDefinitionNotImplemented = 105
    Undefined = 1300,
    IAmNotMaster  = 1301,
    OutOfBackupRecord = 1302,
    OutOfResources = 1303,
    SequenceFailure = 1304,
    BackupDefinitionNotImplemented = 1305,
    CannotBackupDiskless = 1306
  };
  Uint32 senderData;
  Uint32 errorCode;
@@ -232,13 +233,13 @@ public:
  STATIC_CONST( SignalLength = 3 );
  
  enum RequestType {
    ClientAbort = 1,
    BackupComplete = 2,
    BackupFailure = 3,  // General backup failure coordinator -> slave
    LogBufferFull = 4,  //                        slave -> coordinator
    FileOrScanError = 5, //                       slave -> coordinator
    BackupFailureDueToNodeFail = 6, //             slave -> slave
    OkToClean = 7                  //             master -> slave
    ClientAbort = 1321,
    BackupComplete = 1322,
    BackupFailure = 1323,  // General backup failure coordinator -> slave
    LogBufferFull = 1324,  //                        slave -> coordinator
    FileOrScanError = 1325, //                       slave -> coordinator
    BackupFailureDueToNodeFail = 1326, //             slave -> slave
    OkToClean = 1327                  //             master -> slave
  };
private:
  Uint32 requestType;
+2 −1
Original line number Diff line number Diff line
@@ -46,7 +46,8 @@ typedef enum
  ndberror_cl_internal_error = 12,
  ndberror_cl_function_not_implemented = 13,
  ndberror_cl_unknown_error_code = 14,
  ndberror_cl_node_shutdown = 15
  ndberror_cl_node_shutdown = 15,
  ndberror_cl_configuration = 16  
} ndberror_classification_enum;


+7 −0
Original line number Diff line number Diff line
@@ -864,6 +864,13 @@ Backup::execBACKUP_REQ(Signal* signal)
    return;
  }//if

  if (m_diskless)
  {
    sendBackupRef(senderRef, signal, senderData, 
		  BackupRef::CannotBackupDiskless);
    return;
  }
  
  if(dataLen32 != 0) {
    jam();
    sendBackupRef(senderRef, signal, senderData, 
+1 −0
Original line number Diff line number Diff line
@@ -526,6 +526,7 @@ public:
  NdbNodeBitmask c_aliveNodes;
  DLList<BackupRecord> c_backups;
  Config c_defaults;
  Uint32 m_diskless;

  STATIC_CONST(NO_OF_PAGES_META_FILE = 2);

Loading