Loading ndb/examples/ndbapi_event_example/ndbapi_event.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ */ #include <NdbApi.hpp> #include <ndberror.h> // Used for cout #include <stdio.h> Loading Loading @@ -160,10 +161,9 @@ int main() // set up the callbacks printf("execute\n"); if (op->execute()) { // This starts changes to "start flowing" printf("operation execution failed\n"); exit(-1); } // This starts changes to "start flowing" if (op->execute()) APIERROR(op->getNdbError()); int i= 0; while(i < 40) { Loading Loading @@ -251,7 +251,7 @@ int myCreateEvent(Ndb* myNdb, // Add event to database if (myDict->createEvent(myEvent) == 0) myEvent.print(); else if (myDict->getNdbError().code == 4709) { else if (myDict->getNdbError().code == NDBERR_EVENT_NAME_ALEADY_EXISTS) { printf("Event creation failed, event exists\n"); printf("dropping Event...\n"); if (myDict->dropEvent(eventName)) APIERROR(myDict->getNdbError()); Loading ndb/include/kernel/signaldata/CreateEvnt.hpp +2 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #ifndef CREATE_EVNT_HPP #define CREATE_EVNT_HPP #include <ndberror.h> #include "SignalData.hpp" #include <NodeBitmask.hpp> #include <signaldata/DictTabInfo.hpp> Loading Loading @@ -365,7 +366,7 @@ struct CreateEvntRef { SeizeError = 703, TooManyEvents = 4707, EventNameTooLong = 4708, EventExists = 4709, EventNameExists = NDBERR_EVENT_NAME_ALEADY_EXISTS, EventNotFound = 4731, AttributeNotStored = 4245, AttributeNullable = 4246, Loading ndb/include/ndbapi/NdbEventOperation.hpp +7 −0 Original line number Diff line number Diff line Loading @@ -199,6 +199,13 @@ public: */ Uint32 getLatestGCI(); /** * Get the latest error * * @return Error object. */ const struct NdbError & getNdbError() const; #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL /* * Loading ndb/include/ndbapi/ndberror.h +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ #ifndef NDBERROR_H #define NDBERROR_H #define NDBERR_EVENT_NAME_ALEADY_EXISTS 746 #ifdef __cplusplus extern "C" { #endif Loading ndb/src/kernel/blocks/dbdict/Dbdict.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -7849,7 +7849,7 @@ void Dbdict::createEventUTIL_EXECUTE(Signal *signal, break; case ZALREADYEXIST: jam(); evntRecPtr.p->m_errorCode = CreateEvntRef::EventExists; evntRecPtr.p->m_errorCode = CreateEvntRef::EventNameExists; break; default: jam(); Loading Loading
ndb/examples/ndbapi_event_example/ndbapi_event.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ */ #include <NdbApi.hpp> #include <ndberror.h> // Used for cout #include <stdio.h> Loading Loading @@ -160,10 +161,9 @@ int main() // set up the callbacks printf("execute\n"); if (op->execute()) { // This starts changes to "start flowing" printf("operation execution failed\n"); exit(-1); } // This starts changes to "start flowing" if (op->execute()) APIERROR(op->getNdbError()); int i= 0; while(i < 40) { Loading Loading @@ -251,7 +251,7 @@ int myCreateEvent(Ndb* myNdb, // Add event to database if (myDict->createEvent(myEvent) == 0) myEvent.print(); else if (myDict->getNdbError().code == 4709) { else if (myDict->getNdbError().code == NDBERR_EVENT_NAME_ALEADY_EXISTS) { printf("Event creation failed, event exists\n"); printf("dropping Event...\n"); if (myDict->dropEvent(eventName)) APIERROR(myDict->getNdbError()); Loading
ndb/include/kernel/signaldata/CreateEvnt.hpp +2 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #ifndef CREATE_EVNT_HPP #define CREATE_EVNT_HPP #include <ndberror.h> #include "SignalData.hpp" #include <NodeBitmask.hpp> #include <signaldata/DictTabInfo.hpp> Loading Loading @@ -365,7 +366,7 @@ struct CreateEvntRef { SeizeError = 703, TooManyEvents = 4707, EventNameTooLong = 4708, EventExists = 4709, EventNameExists = NDBERR_EVENT_NAME_ALEADY_EXISTS, EventNotFound = 4731, AttributeNotStored = 4245, AttributeNullable = 4246, Loading
ndb/include/ndbapi/NdbEventOperation.hpp +7 −0 Original line number Diff line number Diff line Loading @@ -199,6 +199,13 @@ public: */ Uint32 getLatestGCI(); /** * Get the latest error * * @return Error object. */ const struct NdbError & getNdbError() const; #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL /* * Loading
ndb/include/ndbapi/ndberror.h +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ #ifndef NDBERROR_H #define NDBERROR_H #define NDBERR_EVENT_NAME_ALEADY_EXISTS 746 #ifdef __cplusplus extern "C" { #endif Loading
ndb/src/kernel/blocks/dbdict/Dbdict.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -7849,7 +7849,7 @@ void Dbdict::createEventUTIL_EXECUTE(Signal *signal, break; case ZALREADYEXIST: jam(); evntRecPtr.p->m_errorCode = CreateEvntRef::EventExists; evntRecPtr.p->m_errorCode = CreateEvntRef::EventNameExists; break; default: jam(); Loading