Commit 5ebc648e authored by unknown's avatar unknown
Browse files

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb

into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-ndb

parents 9bb36aa3 58f8f9b3
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@
 */

#include <NdbApi.hpp>
#include <ndberror.h>

// Used for cout
#include <stdio.h>
@@ -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) {
@@ -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());
+2 −1
Original line number Diff line number Diff line
@@ -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>
@@ -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,
+7 −0
Original line number Diff line number Diff line
@@ -199,6 +199,13 @@ public:
   */
  Uint32 getLatestGCI();

  /**
   * Get the latest error
   *
   * @return   Error object.
   */			     
  const struct NdbError & getNdbError() const;

#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
  /*
   *
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@
#ifndef NDBERROR_H
#define NDBERROR_H

#define NDBERR_EVENT_NAME_ALEADY_EXISTS 746

#ifdef __cplusplus
extern "C" {
#endif
+1 −1
Original line number Diff line number Diff line
@@ -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