Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1820 05/03/21 21:59:49 tomas@stripped +31 -0
some more tests for ndb events and replication
removed usage of grep error
removed usage of internal signaldata error
removed usage of "temporary"
changed error/ref handling of events
added dropping state for tables, as not to allow cretion of triggers during drop
removed limitation as not to drop events with subscribers
removed the wait for sending until gci if not handover
saved memory by using bitmask for tables instedad of array
dbname needed for create_event_ops
drop ops and event _after_ drop table
drop events on failing create table to enable recovering from shutdown errors
keep refcount on share until event op is dropped, since it is otherwise freed and the pointer to the evop is lost
sql/ha_ndbcluster.cc
1.179 05/03/21 21:59:42 tomas@stripped +96 -44
dbname needed for create_event_ops
drop ops and event _after_ drop table
drop events on failing create table to enable recovering from shutdown errors
keep refcount on share until event op is dropped, since it is otherwise freed and the pointer to the evop is lost
ndb/src/ndbapi/ndberror.c
1.31 05/03/21 21:59:42 tomas@stripped +12 -0
changed errorcode/ref handling of events
ndb/src/ndbapi/Ndbif.cpp
1.31 05/03/21 21:59:42 tomas@stripped +12 -9
changed errorcode/ref handling of events
ndb/src/ndbapi/NdbEventOperationImpl.cpp
1.24 05/03/21 21:59:42 tomas@stripped +3 -0
changed errorcode/ref handling of events
ndb/src/ndbapi/NdbDictionaryImpl.hpp
1.32 05/03/21 21:59:42 tomas@stripped +1 -5
changed errorcode/ref handling of events
ndb/src/ndbapi/NdbDictionaryImpl.cpp
1.75 05/03/21 21:59:42 tomas@stripped +65 -71
changed errorcode/ref handling of events
ndb/src/ndbapi/Ndb.cpp
1.52 05/03/21 21:59:42 tomas@stripped +1 -1
assert to check list of event operations
ndb/src/mgmsrv/MgmtSrvr.cpp
1.74 05/03/21 21:59:42 tomas@stripped +2 -2
removed usage of grep error
ndb/src/mgmclient/CommandInterpreter.cpp
1.50 05/03/21 21:59:42 tomas@stripped +0 -1
removed usage of grep error
ndb/src/kernel/blocks/suma/Suma.hpp
1.4 05/03/21 21:59:42 tomas@stripped +8 -10
changed errorcode/ref handling
saved memory by using bitmask for tables instedad of array
ndb/src/kernel/blocks/suma/Suma.cpp
1.20 05/03/21 21:59:42 tomas@stripped +167 -99
changed errorcode/ref handling
removed limitation as not to drop events with subscribers
removed the wait for sending until gci if not handover
ndb/src/kernel/blocks/grep/RepImpl.hpp
1.4 05/03/21 21:59:42 tomas@stripped +2 -2
removed usage of grep error
ndb/src/kernel/blocks/grep/Makefile.am
1.4 05/03/21 21:59:42 tomas@stripped +1 -1
removed usage of grep error
ndb/src/kernel/blocks/grep/GrepImpl.hpp
1.3 05/03/21 21:59:42 tomas@stripped +2 -2
removed usage of grep error
ndb/src/kernel/blocks/grep/GrepError.hpp
1.5 05/03/21 21:59:42 tomas@stripped +1 -1
removed usage of grep error
ndb/src/kernel/blocks/grep/GrepError.cpp
1.4 05/03/21 21:59:42 tomas@stripped +2 -1
removed usage of grep error
ndb/src/kernel/blocks/grep/Grep.cpp
1.7 05/03/21 21:59:42 tomas@stripped +2 -2
removed usage of grep error
ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp
1.7 05/03/21 21:59:41 tomas@stripped +26 -14
added dropping state for tables, as not to allow cretion of triggers during drop
ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
1.13 05/03/21 21:59:41 tomas@stripped +1 -0
added dropping state for tables, as not to allow cretion of triggers during drop
ndb/src/kernel/blocks/dbtup/Dbtup.hpp
1.21 05/03/21 21:59:41 tomas@stripped +2 -1
added dropping state for tables, as not to allow cretion of triggers during drop
ndb/src/kernel/blocks/dbdict/Dbdict.hpp
1.10 05/03/21 21:59:41 tomas@stripped +5 -5
removed usage of grep error
changed error/ref handling of events
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
1.40 05/03/21 21:59:41 tomas@stripped +111 -117
removed usage of grep error
changed error/ref handling of events
ndb/src/common/debugger/Makefile.am
1.5 05/03/21 21:59:41 tomas@stripped +1 -1
removed usage of grep error
ndb/src/common/debugger/EventLogger.cpp
1.22 05/03/21 21:59:41 tomas@stripped +1 -2
removed usage of grep error
ndb/include/kernel/signaldata/SumaImpl.hpp
1.4 05/03/21 21:59:41 tomas@stripped +7 -41
removed usage of "temporary"
ndb/include/kernel/signaldata/CreateEvnt.hpp
1.8 05/03/21 21:59:41 tomas@stripped +28 -12
removed usage of internal signaldata error
ndb/include/debugger/EventLogger.hpp
1.10 05/03/21 21:59:41 tomas@stripped +0 -1
removed usage of grep error
mysql-test/t/ndb_rpl_multi.test
1.2 05/03/21 21:59:41 tomas@stripped +7 -5
some more tests for ndb events and replication
mysql-test/t/ndb_rpl_basic.test
1.3 05/03/21 21:59:41 tomas@stripped +28 -4
some more tests for ndb events and replication
mysql-test/r/ndb_rpl_multi.result
1.2 05/03/21 21:59:41 tomas@stripped +14 -2
some more tests for ndb events and replication
mysql-test/r/ndb_rpl_basic.result
1.2 05/03/21 21:59:41 tomas@stripped +24 -0
some more tests for ndb events and replication
ndb/src/kernel/blocks/grep/GrepImpl.hpp
1.2 05/03/18 17:06:19 tomas@stripped +0 -0
Rename: ndb/include/kernel/signaldata/GrepImpl.hpp -> ndb/src/kernel/blocks/grep/GrepImpl.hpp
ndb/src/kernel/blocks/grep/RepImpl.hpp
1.3 05/03/18 17:05:29 tomas@stripped +0 -0
Rename: ndb/include/kernel/signaldata/RepImpl.hpp -> ndb/src/kernel/blocks/grep/RepImpl.hpp
ndb/src/kernel/blocks/grep/GrepError.hpp
1.4 05/03/18 17:03:35 tomas@stripped +0 -0
Rename: ndb/src/kernel/blocks/GrepError.hpp -> ndb/src/kernel/blocks/grep/GrepError.hpp
ndb/src/kernel/blocks/grep/GrepError.cpp
1.3 05/03/18 17:03:12 tomas@stripped +0 -0
Rename: ndb/src/common/debugger/GrepError.cpp -> ndb/src/kernel/blocks/grep/GrepError.cpp
ndb/src/kernel/blocks/GrepError.hpp
1.3 05/03/18 17:02:12 tomas@stripped +0 -0
Rename: ndb/include/debugger/GrepError.hpp -> ndb/src/kernel/blocks/GrepError.hpp
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: tomas
# Host: poseidon.ndb.mysql.com
# Root: /home/tomas/mysql-5.1-wl2325
--- 1.9/ndb/include/debugger/EventLogger.hpp 2005-01-19 08:14:46 +01:00
+++ 1.10/ndb/include/debugger/EventLogger.hpp 2005-03-21 21:59:41 +01:00
@@ -19,7 +19,6 @@
#include <logger/Logger.hpp>
#include <logger/FileLogHandler.hpp>
-#include "GrepError.hpp"
#include <kernel/kernel_types.h>
#include <kernel/LogLevel.hpp>
#include <kernel/signaldata/EventReport.hpp>
--- 1.2/ndb/include/debugger/GrepError.hpp 2004-11-10 00:13:24 +01:00
+++ 1.5/ndb/src/kernel/blocks/grep/GrepError.hpp 2005-03-21 21:59:42 +01:00
@@ -50,7 +50,7 @@
CHANNEL_NOT_STOPPABLE,
// subscriber releated 20 - 30
- SUBSCRIBER_NOT_FOUND = 20,
+ SUBSCRIBER_NOT_FOUND = 1407,
//SUMA specific 400 - 600
SELECTED_TABLE_NOT_FOUND = 400,
--- 1.7/ndb/include/kernel/signaldata/CreateEvnt.hpp 2005-03-06 13:58:20 +01:00
+++ 1.8/ndb/include/kernel/signaldata/CreateEvnt.hpp 2005-03-21 21:59:41 +01:00
@@ -97,6 +97,13 @@
enum ErrorCode {
NoError = 0,
Undefined = 1,
+ NF_FakeErrorREF = 11,
+ Busy = 701
+ };
+#if 0
+ enum ErrorCode {
+ NoError = 0,
+ Undefined = 1,
UndefinedTCError = 2,
NF_FakeErrorREF = 11,
Busy = 701,
@@ -115,7 +122,7 @@
InvalidAttributeOrder = 4255,
Temporary = 0x1 << 16
};
-
+#endif
STATIC_CONST( SignalLength = 5 );
union { // user block reference
@@ -132,7 +139,7 @@
};
Uint32 m_errorLine;
Uint32 m_errorNode;
-
+#if 0
bool isTemporary() const
{ return (errorCode & Temporary) > 0; }
@@ -141,7 +148,7 @@
ErrorCode setTemporary(ErrorCode ec)
{ return (ErrorCode) (errorCode = ((Uint32) ec | (Uint32)Temporary)); }
-
+#endif
Uint32 getUserRef() const {
return m_userRef;
}
@@ -154,11 +161,11 @@
void setUserData(Uint32 val) {
m_userData = val;
}
- DropEvntRef::ErrorCode getErrorCode() const {
- return (DropEvntRef::ErrorCode)m_errorCode;
+ Uint32 getErrorCode() const {
+ return m_errorCode;
}
- void setErrorCode(DropEvntRef::ErrorCode val) {
- m_errorCode = (Uint32)val;
+ void setErrorCode(Uint32 val) {
+ m_errorCode = val;
}
Uint32 getErrorLine() const {
return m_errorLine;
@@ -359,6 +366,13 @@
enum ErrorCode {
NoError = 0,
Undefined = 1,
+ NF_FakeErrorREF = 11,
+ Busy = 701
+ };
+#if 0
+ enum ErrorCode {
+ NoError = 0,
+ Undefined = 1,
UndefinedTCError = 2,
NF_FakeErrorREF = 11,
Busy = 701,
@@ -383,6 +397,7 @@
void setTemporary();
ErrorCode setTemporary(ErrorCode ec);
static ErrorCode makeTemporary(ErrorCode ec);
+#endif
union {
Uint32 m_userRef; // user block reference
@@ -454,11 +469,11 @@
m_eventKey = val;
}
- CreateEvntRef::ErrorCode getErrorCode() const {
- return (CreateEvntRef::ErrorCode)errorCode;
+ Uint32 getErrorCode() const {
+ return errorCode;
}
- void setErrorCode(CreateEvntRef::ErrorCode val) {
- errorCode = (Uint32)val;
+ void setErrorCode(Uint32 val) {
+ errorCode = val;
}
Uint32 getErrorLine() const {
return m_errorLine;
@@ -473,6 +488,7 @@
m_errorNode = val;
}
};
+#if 0
inline bool CreateEvntRef::isTemporary() const
{ return (errorCode & CreateEvntRef::Temporary) > 0; }
inline void CreateEvntRef::setTemporary()
@@ -483,5 +499,5 @@
inline CreateEvntRef::ErrorCode CreateEvntRef::makeTemporary(ErrorCode ec)
{ return (CreateEvntRef::ErrorCode)
( (Uint32) ec | (Uint32)CreateEvntRef::Temporary ); }
-
+#endif
#endif
--- 1.1/ndb/include/kernel/signaldata/GrepImpl.hpp 2004-04-14 10:23:54 +02:00
+++ 1.3/ndb/src/kernel/blocks/grep/GrepImpl.hpp 2005-03-21 21:59:42 +01:00
@@ -17,8 +17,8 @@
#ifndef GREP_IMPL_HPP
#define GREP_IMPL_HPP
-#include "SignalData.hpp"
-#include <GrepError.hpp>
+#include <signaldata/SignalData.hpp>
+#include "GrepError.hpp"
#include <NodeBitmask.hpp>
--- 1.2/ndb/include/kernel/signaldata/RepImpl.hpp 2004-11-10 00:39:09 +01:00
+++ 1.4/ndb/src/kernel/blocks/grep/RepImpl.hpp 2005-03-21 21:59:42 +01:00
@@ -17,10 +17,10 @@
#ifndef REP_IMPL_HPP
#define REP_IMPL_HPP
-#include "SignalData.hpp"
+#include <signaldata/SignalData.hpp>
#include <NodeBitmask.hpp>
#include <ndb_limits.h>
-#include <debugger/GrepError.hpp>
+#include "GrepError.hpp"
/**
* RecordType
--- 1.3/ndb/include/kernel/signaldata/SumaImpl.hpp 2005-03-09 01:00:03 +01:00
+++ 1.4/ndb/include/kernel/signaldata/SumaImpl.hpp 2005-03-21 21:59:41 +01:00
@@ -133,14 +133,10 @@
friend bool printSUB_START_REF(FILE *, const Uint32 *, Uint32, Uint16);
public:
enum ErrorCode {
- Undefined = 0,
+ Undefined = 1,
NF_FakeErrorREF = 11,
- Busy = 701,
- Temporary = 0x1 << 16
+ Busy = 701
};
- bool isTemporary() const;
- void setTemporary();
- ErrorCode setTemporary(ErrorCode ec);
STATIC_CONST( SignalLength = 7 );
STATIC_CONST( SignalLength2 = SignalLength+1 );
@@ -158,13 +154,6 @@
// with SignalLength2
Uint32 subscriberRef;
};
-inline bool SubStartRef::isTemporary() const
-{ return (errorCode & SubStartRef::Temporary) > 0; }
-inline void SubStartRef::setTemporary()
-{ errorCode |= SubStartRef::Temporary; }
-inline SubStartRef::ErrorCode SubStartRef::setTemporary(ErrorCode ec)
-{ return (SubStartRef::ErrorCode)
- (errorCode = ((Uint32) ec | (Uint32)SubStartRef::Temporary)); }
class SubStartConf {
/**
@@ -215,14 +204,10 @@
friend bool printSUB_STOP_REF(FILE *, const Uint32 *, Uint32, Uint16);
public:
enum ErrorCode {
- Undefined = 0,
+ Undefined = 1,
NF_FakeErrorREF = 11,
- Busy = 701,
- Temporary = 0x1 << 16
+ Busy = 701
};
- bool isTemporary() const;
- void setTemporary();
- ErrorCode setTemporary(ErrorCode ec);
STATIC_CONST( SignalLength = 8 );
@@ -238,13 +223,6 @@
Uint32 errorCode;
};
};
-inline bool SubStopRef::isTemporary() const
-{ return (errorCode & SubStopRef::Temporary) > 0; }
-inline void SubStopRef::setTemporary()
-{ errorCode |= SubStopRef::Temporary; }
-inline SubStopRef::ErrorCode SubStopRef::setTemporary(ErrorCode ec)
-{ return (SubStopRef::ErrorCode)
- (errorCode = ((Uint32) ec | (Uint32)SubStopRef::Temporary)); }
class SubStopConf {
/**
@@ -293,8 +271,7 @@
friend bool printSUB_SYNC_REF(FILE *, const Uint32 *, Uint32, Uint16);
public:
enum ErrorCode {
- Undefined = 0,
- Temporary = 0x1 << 16
+ Undefined = 1
};
STATIC_CONST( SignalLength = 5 );
@@ -493,14 +470,10 @@
public:
STATIC_CONST( SignalLength = 5 );
enum ErrorCode {
- Undefined = 0,
+ Undefined = 1,
NF_FakeErrorREF = 11,
- Busy = 701,
- Temporary = 0x1 << 16
+ Busy = 701
};
- bool isTemporary() const;
- void setTemporary();
- ErrorCode setTemporary(ErrorCode ec);
Uint32 senderRef;
Uint32 subscriptionId;
@@ -514,13 +487,6 @@
Uint32 subscriberData;
};
};
-inline bool SubRemoveRef::isTemporary() const
-{ return (err & SubRemoveRef::Temporary) > 0; }
-inline void SubRemoveRef::setTemporary()
-{ err |= SubRemoveRef::Temporary; }
-inline SubRemoveRef::ErrorCode SubRemoveRef::setTemporary(ErrorCode ec)
-{ return (SubRemoveRef::ErrorCode)
- (errorCode = ((Uint32) ec | (Uint32)SubRemoveRef::Temporary)); }
class SubRemoveConf {
/**
--- 1.21/ndb/src/common/debugger/EventLogger.cpp 2005-01-21 12:49:25 +01:00
+++ 1.22/ndb/src/common/debugger/EventLogger.cpp 2005-03-21 21:59:41 +01:00
@@ -16,12 +16,11 @@
#include <ndb_global.h>
-#include "EventLogger.hpp"
+#include <EventLogger.hpp>
#include <NdbConfig.h>
#include <kernel/BlockNumbers.h>
#include <signaldata/ArbitSignalData.hpp>
-#include <GrepEvent.hpp>
#include <NodeState.hpp>
#include <version.h>
--- 1.2/ndb/src/common/debugger/GrepError.cpp 2004-11-10 00:13:24 +01:00
+++ 1.4/ndb/src/kernel/blocks/grep/GrepError.cpp 2005-03-21 21:59:42 +01:00
@@ -19,8 +19,8 @@
/**
* Error descriptions.
*/
-
const GrepError::ErrorDescription GrepError::errorDescriptions[] = {
+#if 0
{ GrepError::GE_NO_ERROR,
"No error" },
{ GrepError::SUBSCRIPTION_ID_NOMEM,
@@ -104,6 +104,7 @@
{ GrepError::NOT_YET_IMPLEMENTED,
"Command or event not yet implemented."}
+#endif
};
--- 1.39/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2005-03-03 08:50:34 +01:00
+++ 1.40/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2005-03-21 21:59:41 +01:00
@@ -59,8 +59,6 @@
#include <signaldata/UtilExecute.hpp>
#include <signaldata/UtilRelease.hpp>
#include <signaldata/SumaImpl.hpp>
-#include <GrepError.hpp>
-//#include <signaldata/DropEvnt.hpp>
#include <signaldata/LqhFrag.hpp>
@@ -7346,7 +7344,7 @@
CreateEvntRef * ret = (CreateEvntRef *)signal->getDataPtrSend();
ret->senderRef = reference();
- ret->setErrorCode(CreateEvntRef::SeizeError);
+ ret->setErrorCode(747);
ret->setErrorLine(__LINE__);
ret->setErrorNode(reference());
sendSignal(signal->senderBlockRef(), GSN_CREATE_EVNT_REF, signal,
@@ -7387,7 +7385,7 @@
jam();
releaseSections(signal);
- evntRecPtr.p->m_errorCode = CreateEvntRef::Undefined;
+ evntRecPtr.p->m_errorCode = 1;
evntRecPtr.p->m_errorLine = __LINE__;
evntRecPtr.p->m_errorNode = reference();
@@ -7430,7 +7428,7 @@
jam();
releaseSections(signal);
- evntRecPtr.p->m_errorCode = CreateEvntRef::Undefined;
+ evntRecPtr.p->m_errorCode = 1;
evntRecPtr.p->m_errorLine = __LINE__;
evntRecPtr.p->m_errorNode = reference();
@@ -7456,7 +7454,7 @@
jam();
releaseSections(signal);
- evntRecPtr.p->m_errorCode = CreateEvntRef::Undefined;
+ evntRecPtr.p->m_errorCode = 1;
evntRecPtr.p->m_errorLine = __LINE__;
evntRecPtr.p->m_errorNode = reference();
@@ -7494,8 +7492,8 @@
void Dbdict::execCREATE_SUBID_REF(Signal* signal)
{
- jamEntry();
- EVENT_TRACE;
+ jamEntry();
+ DBUG_ENTER("Dbdict::execCREATE_SUBID_REF");
CreateSubscriptionIdRef * const ref =
(CreateSubscriptionIdRef *)signal->getDataPtr();
OpCreateEventPtr evntRecPtr;
@@ -7503,17 +7501,21 @@
evntRecPtr.i = ref->senderData;
ndbrequire((evntRecPtr.p = c_opCreateEvent.getPtr(evntRecPtr.i)) != NULL);
- evntRecPtr.p->m_errorCode = CreateEvntRef::Undefined;
+ if (ref->err)
+ evntRecPtr.p->m_errorCode = ref->err;
+ else
+ evntRecPtr.p->m_errorCode = 1;
evntRecPtr.p->m_errorLine = __LINE__;
evntRecPtr.p->m_errorNode = reference();
createEvent_sendReply(signal, evntRecPtr);
+ DBUG_VOID_RETURN;
}
void Dbdict::execCREATE_SUBID_CONF(Signal* signal)
{
jamEntry();
- EVENT_TRACE;
+ DBUG_ENTER("Dbdict::execCREATE_SUBID_CONF");
CreateSubscriptionIdConf const * sumaIdConf =
(CreateSubscriptionIdConf *)signal->getDataPtr();
@@ -7532,6 +7534,7 @@
prepareTransactionEventSysTable(&c, signal, evntRecId,
UtilPrepareReq::Insert);
+ DBUG_VOID_RETURN;
}
void
@@ -7549,46 +7552,47 @@
*/
void interpretUtilPrepareErrorCode(UtilPrepareRef::ErrorCode errorCode,
- bool& temporary, Uint32& line)
+ Uint32& error, Uint32& line)
{
+ DBUG_ENTER("interpretUtilPrepareErrorCode");
switch (errorCode) {
case UtilPrepareRef::NO_ERROR:
jam();
+ error = 1;
line = __LINE__;
- EVENT_TRACE;
- break;
+ DBUG_VOID_RETURN;
case UtilPrepareRef::PREPARE_SEIZE_ERROR:
jam();
- temporary = true;
+ error = 748;
line = __LINE__;
- EVENT_TRACE;
- break;
+ DBUG_VOID_RETURN;
case UtilPrepareRef::PREPARE_PAGES_SEIZE_ERROR:
jam();
+ error = 1;
line = __LINE__;
- EVENT_TRACE;
- break;
+ DBUG_VOID_RETURN;
case UtilPrepareRef::PREPARED_OPERATION_SEIZE_ERROR:
jam();
+ error = 1;
line = __LINE__;
- EVENT_TRACE;
- break;
+ DBUG_VOID_RETURN;
case UtilPrepareRef::DICT_TAB_INFO_ERROR:
jam();
+ error = 1;
line = __LINE__;
- EVENT_TRACE;
- break;
+ DBUG_VOID_RETURN;
case UtilPrepareRef::MISSING_PROPERTIES_SECTION:
jam();
+ error = 1;
line = __LINE__;
- EVENT_TRACE;
- break;
+ DBUG_VOID_RETURN;
default:
jam();
+ error = 1;
line = __LINE__;
- EVENT_TRACE;
- break;
+ DBUG_VOID_RETURN;
}
+ DBUG_VOID_RETURN;
}
void
@@ -7654,17 +7658,9 @@
evntRecPtr.i = ref->getSenderData();
ndbrequire((evntRecPtr.p = c_opCreateEvent.getPtr(evntRecPtr.i)) != NULL);
- bool temporary = false;
- interpretUtilPrepareErrorCode(errorCode,
- temporary, evntRecPtr.p->m_errorLine);
- if (temporary) {
- evntRecPtr.p->m_errorCode =
- CreateEvntRef::makeTemporary(CreateEvntRef::Undefined);
- }
-
- if (evntRecPtr.p->m_errorCode == 0) {
- evntRecPtr.p->m_errorCode = CreateEvntRef::Undefined;
- }
+ Uint32 err;
+ interpretUtilPrepareErrorCode(errorCode, evntRecPtr.p->m_errorCode,
+ evntRecPtr.p->m_errorLine);
evntRecPtr.p->m_errorNode = reference();
createEvent_sendReply(signal, evntRecPtr);
@@ -7859,7 +7855,7 @@
if (tablePtr.i == RNIL) {
jam();
- evntRecPtr.p->m_errorCode = CreateEvntRef::Undefined;
+ evntRecPtr.p->m_errorCode = 1;
evntRecPtr.p->m_errorLine = __LINE__;
evntRecPtr.p->m_errorNode = reference();
@@ -7898,21 +7894,21 @@
switch (ref->getTCErrorCode()) {
case ZNOT_FOUND:
jam();
- evntRecPtr.p->m_errorCode = CreateEvntRef::EventNotFound;
+ evntRecPtr.p->m_errorCode = 4710;
break;
case ZALREADYEXIST:
jam();
- evntRecPtr.p->m_errorCode = CreateEvntRef::EventNameExists;
+ evntRecPtr.p->m_errorCode = 746;
break;
default:
jam();
- evntRecPtr.p->m_errorCode = CreateEvntRef::UndefinedTCError;
+ evntRecPtr.p->m_errorCode = ref->getTCErrorCode();
break;
}
break;
default:
jam();
- evntRecPtr.p->m_errorCode = CreateEvntRef::Undefined;
+ evntRecPtr.p->m_errorCode = ref->getErrorCode();
break;
}
@@ -7948,7 +7944,7 @@
jam();
releaseSections(signal);
- evntRecPtr.p->m_errorCode = CreateEvntRef::Undefined;
+ evntRecPtr.p->m_errorCode = 1;
evntRecPtr.p->m_errorLine = __LINE__;
evntRecPtr.p->m_errorNode = reference();
@@ -8113,7 +8109,7 @@
ndbout_c("DBDICT(Participant) got SUB_CREATE_REF evntRecPtr.i = (%d)", evntRecPtr.i);
#endif
- if (ref->err == GrepError::SUBSCRIPTION_ID_NOT_UNIQUE) {
+ if (ref->err == 1415) {
jam();
#ifdef EVENT_PH2_DEBUG
ndbout_c("SUBSCRIPTION_ID_NOT_UNIQUE");
@@ -8123,10 +8119,13 @@
}
#ifdef EVENT_PH2_DEBUG
- ndbout_c("Other error");
+ ndbout_c("Other error");
#endif
- evntRecPtr.p->m_errorCode = CreateEvntRef::Undefined;
+ if (ref->err)
+ evntRecPtr.p->m_errorCode = ref->err;
+ else
+ evntRecPtr.p->m_errorCode = 1;
evntRecPtr.p->m_errorLine = __LINE__;
evntRecPtr.p->m_errorNode = reference();
@@ -8172,7 +8171,10 @@
evntRecPtr.i = ref->subscriberData;
ndbrequire((evntRecPtr.p = c_opCreateEvent.getPtr(evntRecPtr.i)) != NULL);
- evntRecPtr.p->m_errorCode = CreateEvntRef::Undefined;
+ if (ref->err)
+ evntRecPtr.p->m_errorCode = ref->err;
+ else
+ evntRecPtr.p->m_errorCode = 1;
evntRecPtr.p->m_errorLine = __LINE__;
evntRecPtr.p->m_errorNode = reference();
@@ -8222,7 +8224,7 @@
if (evntRecPtr.p->m_reqTracker.hasRef()) {
ptr = NULL; // we don't want to return anything if there's an error
if (!evntRecPtr.p->hasError()) {
- evntRecPtr.p->m_errorCode = CreateEvntRef::Undefined;
+ evntRecPtr.p->m_errorCode = 1;
evntRecPtr.p->m_errorLine = __LINE__;
evntRecPtr.p->m_errorNode = reference();
jam();
@@ -8319,7 +8321,7 @@
// ret->setErrorLine(__LINE__);
// ret->setErrorNode(reference());
ref->senderRef = reference();
- ref->setTemporary(SubStartRef::Busy);
+ ref->err= SubStartRef::Busy;
sendSignal(origSenderRef, GSN_SUB_START_REF, signal,
SubStartRef::SignalLength2, JBB);
@@ -8380,6 +8382,7 @@
const SubStartRef* ref = (SubStartRef*) signal->getDataPtr();
Uint32 senderRef = ref->senderRef;
+ Uint32 err = ref->err;
OpSubEventPtr subbPtr;
c_opSubEvent.getPtr(subbPtr, ref->senderData);
@@ -8394,27 +8397,13 @@
ndbout_c("DBDICT(Participant) got GSN_SUB_START_REF = (%d)", subbPtr.i);
#endif
- if (ref->isTemporary()){
- jam();
- SubStartReq* req = (SubStartReq*)signal->getDataPtrSend();
- { // fix
- Uint32 subscriberRef = ref->subscriberRef;
- req->subscriberRef = subscriberRef;
- }
- req->senderRef = reference();
- req->senderData = subbPtr.i;
- sendSignal(SUMA_REF, GSN_SUB_START_REQ,
- signal, SubStartReq::SignalLength2, JBB);
- } else {
- jam();
-
- SubStartRef* ref = (SubStartRef*) signal->getDataPtrSend();
- ref->senderRef = reference();
- ref->senderData = subbPtr.p->m_senderData;
- sendSignal(subbPtr.p->m_senderRef, GSN_SUB_START_REF,
- signal, SubStartRef::SignalLength2, JBB);
- c_opSubEvent.release(subbPtr);
- }
+ jam();
+ SubStartRef* ref = (SubStartRef*) signal->getDataPtrSend();
+ ref->senderRef = reference();
+ ref->senderData = subbPtr.p->m_senderData;
+ sendSignal(subbPtr.p->m_senderRef, GSN_SUB_START_REF,
+ signal, SubStartRef::SignalLength2, JBB);
+ c_opSubEvent.release(subbPtr);
return;
}
/*
@@ -8424,11 +8413,15 @@
#ifdef EVENT_PH3_DEBUG
ndbout_c("DBDICT(Coordinator) got GSN_SUB_START_REF = (%d)", subbPtr.i);
#endif
- if (ref->errorCode == SubStartRef::NF_FakeErrorREF){
+ if (err == SubStartRef::NF_FakeErrorREF){
jam();
subbPtr.p->m_reqTracker.ignoreRef(c_counterMgr, refToNode(senderRef));
} else {
jam();
+ if (subbPtr.p->m_errorCode == 0)
+ {
+ subbPtr.p->m_errorCode= err ? err : 1;
+ }
subbPtr.p->m_reqTracker.reportRef(c_counterMgr, refToNode(senderRef));
}
completeSubStartReq(signal,subbPtr.i,0);
@@ -8531,7 +8524,7 @@
// ret->setErrorLine(__LINE__);
// ret->setErrorNode(reference());
ref->senderRef = reference();
- ref->setTemporary(SubStopRef::Busy);
+ ref->err = SubStopRef::Busy;
sendSignal(origSenderRef, GSN_SUB_STOP_REF, signal,
SubStopRef::SignalLength, JBB);
@@ -8588,6 +8581,7 @@
jamEntry();
const SubStopRef* ref = (SubStopRef*) signal->getDataPtr();
Uint32 senderRef = ref->senderRef;
+ Uint32 err = ref->err;
OpSubEventPtr subbPtr;
c_opSubEvent.getPtr(subbPtr, ref->senderData);
@@ -8597,33 +8591,27 @@
* Participant
*/
jam();
- if (ref->isTemporary()){
- jam();
- SubStopReq* req = (SubStopReq*)signal->getDataPtrSend();
- req->senderRef = reference();
- req->senderData = subbPtr.i;
- sendSignal(SUMA_REF, GSN_SUB_STOP_REQ,
- signal, SubStopReq::SignalLength, JBB);
- } else {
- jam();
- SubStopRef* ref = (SubStopRef*) signal->getDataPtrSend();
- ref->senderRef = reference();
- ref->senderData = subbPtr.p->m_senderData;
- sendSignal(subbPtr.p->m_senderRef, GSN_SUB_STOP_REF,
- signal, SubStopRef::SignalLength, JBB);
- c_opSubEvent.release(subbPtr);
- }
+ SubStopRef* ref = (SubStopRef*) signal->getDataPtrSend();
+ ref->senderRef = reference();
+ ref->senderData = subbPtr.p->m_senderData;
+ sendSignal(subbPtr.p->m_senderRef, GSN_SUB_STOP_REF,
+ signal, SubStopRef::SignalLength, JBB);
+ c_opSubEvent.release(subbPtr);
return;
}
/*
* Coordinator
*/
ndbrequire(refToBlock(senderRef) == DBDICT);
- if (ref->errorCode == SubStopRef::NF_FakeErrorREF){
+ if (err == SubStopRef::NF_FakeErrorREF){
jam();
subbPtr.p->m_reqTracker.ignoreRef(c_counterMgr, refToNode(senderRef));
} else {
jam();
+ if (subbPtr.p->m_errorCode == 0)
+ {
+ subbPtr.p->m_errorCode= err ? err : 1;
+ }
subbPtr.p->m_reqTracker.reportRef(c_counterMgr, refToNode(senderRef));
}
completeSubStopReq(signal,subbPtr.i,0);
@@ -8723,7 +8711,7 @@
Dbdict::execDROP_EVNT_REQ(Signal* signal)
{
jamEntry();
- EVENT_TRACE;
+ DBUG_ENTER("Dbdict::execDROP_EVNT_REQ");
DropEvntReq *req = (DropEvntReq*)signal->getDataPtr();
const Uint32 senderRef = signal->senderBlockRef();
@@ -8736,12 +8724,12 @@
releaseSections(signal);
DropEvntRef * ret = (DropEvntRef *)signal->getDataPtrSend();
- ret->setErrorCode(DropEvntRef::SeizeError);
+ ret->setErrorCode(747);
ret->setErrorLine(__LINE__);
ret->setErrorNode(reference());
sendSignal(senderRef, GSN_DROP_EVNT_REF, signal,
DropEvntRef::SignalLength, JBB);
- return;
+ DBUG_VOID_RETURN;
}
#ifdef EVENT_DEBUG
@@ -8766,12 +8754,12 @@
jam();
releaseSections(signal);
- evntRecPtr.p->m_errorCode = DropEvntRef::Undefined;
+ evntRecPtr.p->m_errorCode = 1;
evntRecPtr.p->m_errorLine = __LINE__;
evntRecPtr.p->m_errorNode = reference();
dropEvent_sendReply(signal, evntRecPtr);
- return;
+ DBUG_VOID_RETURN;
}
r0.getString(evntRecPtr.p->m_eventRec.NAME);
{
@@ -8792,6 +8780,7 @@
prepareTransactionEventSysTable(&c, signal, evntRecPtr.i,
UtilPrepareReq::Read);
+ DBUG_VOID_RETURN;
}
void
@@ -8865,6 +8854,7 @@
Dbdict::execSUB_REMOVE_REQ(Signal* signal)
{
jamEntry();
+ DBUG_ENTER("Dbdict::execSUB_REMOVE_REQ");
Uint32 origSenderRef = signal->senderBlockRef();
@@ -8873,11 +8863,11 @@
SubRemoveRef * ref = (SubRemoveRef *)signal->getDataPtrSend();
jam();
ref->senderRef = reference();
- ref->setTemporary(SubRemoveRef::Busy);
+ ref->err = SubRemoveRef::Busy;
sendSignal(origSenderRef, GSN_SUB_REMOVE_REF, signal,
SubRemoveRef::SignalLength, JBB);
- return;
+ DBUG_VOID_RETURN;
}
{
@@ -8892,6 +8882,7 @@
req->senderData = subbPtr.i;
sendSignal(SUMA_REF, GSN_SUB_REMOVE_REQ, signal, SubRemoveReq::SignalLength, JBB);
+ DBUG_VOID_RETURN;
}
/*
@@ -8902,8 +8893,11 @@
Dbdict::execSUB_REMOVE_REF(Signal* signal)
{
jamEntry();
+ DBUG_ENTER("Dbdict::execSUB_REMOVE_REF");
+
const SubRemoveRef* ref = (SubRemoveRef*) signal->getDataPtr();
Uint32 senderRef = ref->senderRef;
+ Uint32 err= ref->err;
if (refToBlock(senderRef) == SUMA) {
/*
@@ -8912,8 +8906,8 @@
jam();
OpSubEventPtr subbPtr;
c_opSubEvent.getPtr(subbPtr, ref->senderData);
- if (ref->errorCode == (Uint32) GrepError::SUBSCRIPTION_ID_NOT_FOUND) {
- // conf this since this may occur if a nodefailiure has occured
+ if (err == 1407) {
+ // conf this since this may occur if a nodefailure has occured
// earlier so that the systable was not cleared
SubRemoveConf* conf = (SubRemoveConf*) signal->getDataPtrSend();
conf->senderRef = reference();
@@ -8928,7 +8922,7 @@
signal, SubRemoveRef::SignalLength, JBB);
}
c_opSubEvent.release(subbPtr);
- return;
+ DBUG_VOID_RETURN;
}
/*
* Coordinator
@@ -8936,14 +8930,21 @@
ndbrequire(refToBlock(senderRef) == DBDICT);
OpDropEventPtr eventRecPtr;
c_opDropEvent.getPtr(eventRecPtr, ref->senderData);
- if (ref->errorCode == SubRemoveRef::NF_FakeErrorREF){
+ if (err == SubRemoveRef::NF_FakeErrorREF){
jam();
eventRecPtr.p->m_reqTracker.ignoreRef(c_counterMgr, refToNode(senderRef));
} else {
jam();
+ if (eventRecPtr.p->m_errorCode == 0)
+ {
+ eventRecPtr.p->m_errorCode= err ? err : 1;
+ eventRecPtr.p->m_errorLine= __LINE__;
+ eventRecPtr.p->m_errorNode= reference();
+ }
eventRecPtr.p->m_reqTracker.reportRef(c_counterMgr, refToNode(senderRef));
}
completeSubRemoveReq(signal,eventRecPtr.i,0);
+ DBUG_VOID_RETURN;
}
void
@@ -8991,9 +8992,12 @@
if (evntRecPtr.p->m_reqTracker.hasRef()) {
jam();
- evntRecPtr.p->m_errorNode = reference();
- evntRecPtr.p->m_errorLine = __LINE__;
- evntRecPtr.p->m_errorCode = DropEvntRef::Undefined;
+ if ( evntRecPtr.p->m_errorCode == 0 )
+ {
+ evntRecPtr.p->m_errorNode = reference();
+ evntRecPtr.p->m_errorLine = __LINE__;
+ evntRecPtr.p->m_errorCode = 1;
+ }
dropEvent_sendReply(signal, evntRecPtr);
return;
}
@@ -9069,18 +9073,8 @@
evntRecPtr.i = ref->getSenderData();
ndbrequire((evntRecPtr.p = c_opDropEvent.getPtr(evntRecPtr.i)) != NULL);
- bool temporary = false;
interpretUtilPrepareErrorCode((UtilPrepareRef::ErrorCode)ref->getErrorCode(),
- temporary, evntRecPtr.p->m_errorLine);
- if (temporary) {
- evntRecPtr.p->m_errorCode = (DropEvntRef::ErrorCode)
- ((Uint32) DropEvntRef::Undefined | (Uint32) DropEvntRef::Temporary);
- }
-
- if (evntRecPtr.p->m_errorCode == 0) {
- evntRecPtr.p->m_errorCode = DropEvntRef::Undefined;
- evntRecPtr.p->m_errorLine = __LINE__;
- }
+ evntRecPtr.p->m_errorCode, evntRecPtr.p->m_errorLine);
evntRecPtr.p->m_errorNode = reference();
dropEvent_sendReply(signal, evntRecPtr);
@@ -9107,17 +9101,17 @@
switch (ref->getTCErrorCode()) {
case ZNOT_FOUND:
jam();
- evntRecPtr.p->m_errorCode = DropEvntRef::EventNotFound;
+ evntRecPtr.p->m_errorCode = 4710;
break;
default:
jam();
- evntRecPtr.p->m_errorCode = DropEvntRef::UndefinedTCError;
+ evntRecPtr.p->m_errorCode = ref->getTCErrorCode();
break;
}
break;
default:
jam();
- evntRecPtr.p->m_errorCode = DropEvntRef::Undefined;
+ evntRecPtr.p->m_errorCode = ref->getErrorCode();
break;
}
dropEvent_sendReply(signal, evntRecPtr);
--- 1.9/ndb/src/kernel/blocks/dbdict/Dbdict.hpp 2005-01-10 14:40:51 +01:00
+++ 1.10/ndb/src/kernel/blocks/dbdict/Dbdict.hpp 2005-03-21 21:59:41 +01:00
@@ -1265,7 +1265,7 @@
CreateEvntReq::RequestType m_requestType;
Uint32 m_requestFlag;
// error info
- CreateEvntRef::ErrorCode m_errorCode;
+ Uint32 m_errorCode;
Uint32 m_errorLine;
Uint32 m_errorNode;
// ctor
@@ -1309,24 +1309,24 @@
sysTab_NDBEVENTS_0 m_eventRec;
RequestTracker m_reqTracker;
// error info
- DropEvntRef::ErrorCode m_errorCode;
+ Uint32 m_errorCode;
Uint32 m_errorLine;
Uint32 m_errorNode;
// ctor
OpDropEvent() {
memset(&m_request, 0, sizeof(m_request));
- m_errorCode = DropEvntRef::NoError;
+ m_errorCode = 0;
m_errorLine = 0;
m_errorNode = 0;
}
void init(const DropEvntReq* req) {
m_request = *req;
- m_errorCode = DropEvntRef::NoError;
+ m_errorCode = 0;
m_errorLine = 0;
m_errorNode = 0;
}
bool hasError() {
- return m_errorCode != DropEvntRef::NoError;
+ return m_errorCode != 0;
}
void setError(const DropEvntRef* ref) {
if (ref != 0 && ! hasError()) {
--- 1.20/ndb/src/kernel/blocks/dbtup/Dbtup.hpp 2004-12-12 18:25:28 +01:00
+++ 1.21/ndb/src/kernel/blocks/dbtup/Dbtup.hpp 2005-03-21 21:59:41 +01:00
@@ -419,7 +419,8 @@
SAME_PAGE = 64,
DEFINING = 65,
TUPLE_BLOCKED = 66,
- ERROR_WAIT_STORED_PROCREQ = 67
+ ERROR_WAIT_STORED_PROCREQ = 67,
+ DROPPING = 68
};
// Records
--- 1.12/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp 2004-12-26 22:34:25 +01:00
+++ 1.13/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp 2005-03-21 21:59:41 +01:00
@@ -590,6 +590,7 @@
tabPtr.p->m_dropTable.tabUserRef = req->senderRef;
tabPtr.p->m_dropTable.tabUserPtr = req->senderData;
+ tabPtr.p->tableStatus = DROPPING;
signal->theData[0] = ZREL_FRAG;
signal->theData[1] = tabPtr.i;
--- 1.6/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp 2004-12-12 18:25:30 +01:00
+++ 1.7/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp 2005-03-21 21:59:41 +01:00
@@ -123,14 +123,21 @@
BlockReference senderRef = signal->getSendersBlockRef();
const CreateTrigReq reqCopy = *(const CreateTrigReq*)signal->getDataPtr();
const CreateTrigReq* const req = &reqCopy;
+ CreateTrigRef::ErrorCode error= CreateTrigRef::NoError;
// Find table
TablerecPtr tabPtr;
tabPtr.i = req->getTableId();
ptrCheckGuard(tabPtr, cnoOfTablerec, tablerec);
+ if (tabPtr.p->tableStatus != DEFINED )
+ {
+ ljam();
+ error= CreateTrigRef::InvalidTable;
+ }
// Create trigger and associate it with the table
- if (createTrigger(tabPtr.p, req)) {
+ else if (createTrigger(tabPtr.p, req))
+ {
ljam();
// Send conf
CreateTrigConf* const conf = (CreateTrigConf*)signal->getDataPtrSend();
@@ -143,21 +150,26 @@
conf->setTriggerInfo(req->getTriggerInfo());
sendSignal(senderRef, GSN_CREATE_TRIG_CONF,
signal, CreateTrigConf::SignalLength, JBB);
- } else {
+ return;
+ }
+ else
+ {
ljam();
- // Send ref
- CreateTrigRef* const ref = (CreateTrigRef*)signal->getDataPtrSend();
- ref->setUserRef(reference());
- ref->setConnectionPtr(req->getConnectionPtr());
- ref->setRequestType(req->getRequestType());
- ref->setTableId(req->getTableId());
- ref->setIndexId(req->getIndexId());
- ref->setTriggerId(req->getTriggerId());
- ref->setTriggerInfo(req->getTriggerInfo());
- ref->setErrorCode(CreateTrigRef::TooManyTriggers);
- sendSignal(senderRef, GSN_CREATE_TRIG_REF,
- signal, CreateTrigRef::SignalLength, JBB);
+ error= CreateTrigRef::TooManyTriggers;
}
+ ndbassert(error != CreateTrigRef::NoError);
+ // Send ref
+ CreateTrigRef* const ref = (CreateTrigRef*)signal->getDataPtrSend();
+ ref->setUserRef(reference());
+ ref->setConnectionPtr(req->getConnectionPtr());
+ ref->setRequestType(req->getRequestType());
+ ref->setTableId(req->getTableId());
+ ref->setIndexId(req->getIndexId());
+ ref->setTriggerId(req->getTriggerId());
+ ref->setTriggerInfo(req->getTriggerInfo());
+ ref->setErrorCode(error);
+ sendSignal(senderRef, GSN_CREATE_TRIG_REF,
+ signal, CreateTrigRef::SignalLength, JBB);
}//Dbtup::execCREATE_TRIG_REQ()
void
--- 1.6/ndb/src/kernel/blocks/grep/Grep.cpp 2005-01-11 23:25:40 +01:00
+++ 1.7/ndb/src/kernel/blocks/grep/Grep.cpp 2005-03-21 21:59:42 +01:00
@@ -23,8 +23,8 @@
#include <signaldata/NodeFailRep.hpp>
#include <signaldata/ReadNodesConf.hpp>
#include <signaldata/CheckNodeGroups.hpp>
-#include <signaldata/GrepImpl.hpp>
-#include <signaldata/RepImpl.hpp>
+#include <GrepImpl.hpp>
+#include <RepImpl.hpp>
#include <signaldata/EventReport.hpp>
#include <signaldata/DictTabInfo.hpp>
#include <signaldata/GetTabInfo.hpp>
--- 1.19/ndb/src/kernel/blocks/suma/Suma.cpp 2005-03-09 11:49:40 +01:00
+++ 1.20/ndb/src/kernel/blocks/suma/Suma.cpp 2005-03-21 21:59:42 +01:00
@@ -39,7 +39,6 @@
#include <signaldata/TrigAttrInfo.hpp>
#include <signaldata/CheckNodeGroups.hpp>
#include <signaldata/GCPSave.hpp>
-#include <GrepError.hpp>
#include <DebuggerNames.hpp>
@@ -385,9 +384,9 @@
void
SumaParticipant::sendSubStopReq(Signal *signal, bool unlock){
- DBUG_ENTER("SumaParticipant::sendSubStopReq");
static bool remove_lock = false;
jam();
+ DBUG_ENTER("SumaParticipant::sendSubStopReq");
SubscriberPtr subbPtr;
c_removeDataSubscribers.first(subbPtr);
@@ -422,7 +421,7 @@
req->subscriptionKey = subPtr.p->m_subscriptionKey;
req->part = SubscriptionData::TableData;
- sendSignal(SUMA_REF, GSN_SUB_STOP_REQ, signal, SubStopReq::SignalLength, JBB);
+ sendSignal(SUMA_REF,GSN_SUB_STOP_REQ,signal,SubStopReq::SignalLength,JBB);
DBUG_VOID_RETURN;
}
@@ -466,25 +465,27 @@
SubStopRef * const ref = (SubStopRef*)signal->getDataPtr();
- Uint32 subscriptionId = ref->subscriptionId;
+ Uint32 senderData = ref->senderData;
+ Uint32 subscriptionId = ref->subscriptionId;
Uint32 subscriptionKey = ref->subscriptionKey;
- Uint32 part = ref->part;
- Uint32 subscriberData = ref->subscriberData;
- Uint32 subscriberRef = ref->subscriberRef;
- // Uint32 err = ref->err;
+ Uint32 part = ref->part;
+ Uint32 subscriberData = ref->subscriberData;
+ Uint32 subscriberRef = ref->subscriberRef;
- if(!ref->isTemporary()){
+ if(ref->err != 1411){
ndbrequire(false);
}
SubStopReq * const req = (SubStopReq*)signal->getDataPtrSend();
- req->subscriberRef = subscriberRef;
- req->subscriberData = subscriberData;
- req->subscriptionId = subscriptionId;
+ req->senderRef = reference();
+ req->senderData = senderData;
+ req->subscriberRef = subscriberRef;
+ req->subscriberData = subscriberData;
+ req->subscriptionId = subscriptionId;
req->subscriptionKey = subscriptionKey;
req->part = part;
- sendSignal(SUMA_REF, GSN_SUB_STOP_REQ, signal, SubStopReq::SignalLength, JBB);
+ sendSignal(SUMA_REF,GSN_SUB_STOP_REQ,signal,SubStopReq::SignalLength,JBB);
DBUG_VOID_RETURN;
}
@@ -755,7 +756,7 @@
ndbout_c("SumaParticipant::addTableId(%u,%u,%u), current_table=%u",
tableId, subPtr.i, psyncRec, subPtr.p->m_currentTable);
#endif
- subPtr.p->m_tables[tableId] = 1;
+ subPtr.p->m_tables.set(tableId);
subPtr.p->m_currentTable++;
if(psyncRec != NULL)
psyncRec->m_tableList.append(&tableId, 1);
@@ -792,16 +793,13 @@
jamEntry();
GetTableIdRef const * ref = (GetTableIdRef *)signal->getDataPtr();
Uint32 senderData = ref->senderData;
- // Uint32 err = ref->err;
+ Uint32 err = ref->err;
SubscriptionPtr subPtr;
c_subscriptions.getPtr(subPtr, senderData);
Uint32 subData = subPtr.p->m_subscriberData;
SubCreateRef * reff = (SubCreateRef*)ref;
- /**
- * @todo: map ref->err to GrepError.
- */
- reff->err = GrepError::SELECTED_TABLE_NOT_FOUND;
+ reff->err = err;
reff->subscriberData = subData;
sendSignal(subPtr.p->m_subscriberRef,
GSN_SUB_CREATE_REF,
@@ -830,7 +828,7 @@
SubscriberPtr subbPtr;
if(!c_subscriberPool.seize(subbPtr)){
jam();
- sendSubIdRef(signal, GrepError::SUBSCRIPTION_ID_NOMEM);
+ sendSubIdRef(signal, 1412);
return;
}
@@ -889,6 +887,7 @@
jamEntry();
DBUG_ENTER("Suma::execUTIL_SEQUENCE_REF");
UtilSequenceRef * ref = (UtilSequenceRef*)signal->getDataPtr();
+ Uint32 err= ref->errorCode;
if(ref->requestType == UtilSequenceReq::Create) {
jam();
@@ -900,7 +899,7 @@
SubscriberPtr subbPtr;
c_subscriberPool.getPtr(subbPtr,subData);
- sendSubIdRef(signal, GrepError::SEQUENCE_ERROR);
+ sendSubIdRef(signal, err);
c_subscriberPool.release(subbPtr);
DBUG_VOID_RETURN;
}//execUTIL_SEQUENCE_REF()
@@ -963,7 +962,7 @@
if(!c_subscriptions.find(subPtr, key)) {
jam();
- sendSubCreateRef(signal, req, GrepError::SUBSCRIPTION_NOT_FOUND);
+ sendSubCreateRef(signal, req, 1407);
return;
}
jam();
@@ -972,17 +971,17 @@
// Check that id/key is unique
if(c_subscriptions.find(subPtr, key)) {
jam();
- sendSubCreateRef(signal, req, GrepError::SUBSCRIPTION_ID_NOT_UNIQUE);
+ sendSubCreateRef(signal, req, 1415);
return;
}
if(!c_subscriptions.seize(subPtr)) {
jam();
- sendSubCreateRef(signal, req, GrepError::NOSPACE_IN_POOL);
+ sendSubCreateRef(signal, req, 1412);
return;
}
if(!c_syncPool.seize(syncPtr)) {
jam();
- sendSubCreateRef(signal, req, GrepError::NOSPACE_IN_POOL);
+ sendSubCreateRef(signal, req, 1416);
return;
}
jam();
@@ -996,7 +995,7 @@
* ok to memset? Support on all compilers
* @todo find out if memset is supported by all compilers
*/
- memset(subPtr.p->m_tables,0,MAX_TABLES);
+ subPtr.p->m_tables.clear();
subPtr.p->m_maxTables = 0;
subPtr.p->m_currentTable = 0;
subPtr.p->m_syncPtrI = syncPtr.i;
@@ -1009,7 +1008,7 @@
syncPtr.p->m_doSendSyncData = true;
syncPtr.p->ptrI = syncPtr.i;
syncPtr.p->m_locked = false;
- syncPtr.p->m_error = false;
+ syncPtr.p->m_error = 0;
}
if (restartFlag ||
@@ -1020,10 +1019,10 @@
ndbrequire(type != SubCreateReq::SingleTableScan);
jam();
- if (subPtr.p->m_tables[req.tableId] != 0) {
+ if (subPtr.p->m_tables.get(req.tableId)) {
ndbrequire(false); //TODO remove
jam();
- sendSubCreateRef(signal, req, GrepError::SELECTED_TABLE_ALREADY_ADDED);
+ sendSubCreateRef(signal, req, /** Error code */0);
return;
}
if (addTableFlag) {
@@ -1057,7 +1056,7 @@
{
if(signal->getNoOfSections() == 0 ){
jam();
- sendSubCreateRef(signal, req, GrepError::WRONG_NO_OF_SECTIONS);
+ sendSubCreateRef(signal, req, /** Error code */);
return;
}
@@ -1174,7 +1173,7 @@
if(!c_subscriptions.find(subPtr, key)){
jam();
- sendSubSyncRef(signal, GrepError::SUBSCRIPTION_ID_NOT_FOUND);
+ sendSubSyncRef(signal, 1407);
return;
}
@@ -1331,9 +1330,9 @@
jam();
continue;
}
- if (subPtr.p->m_tables[tableId]) {
+ if (subPtr.p->m_tables.get(tableId)) {
jam();
- subPtr.p->m_tables[tableId] = 0; // remove this old table reference
+ subPtr.p->m_tables.clear(tableId); // remove this old table reference
TableList::DataBufferIterator it;
for(tmp->m_tableList.first(it);!it.isNull();tmp->m_tableList.next(it)) {
jam();
@@ -1489,7 +1488,15 @@
void
SumaParticipant::execCREATE_TRIG_REF(Signal* signal){
jamEntry();
- ndbrequire(false);
+ DBUG_ENTER("SumaParticipant::execDROP_TRIG_REF");
+ CreateTrigRef * const ref = (CreateTrigRef*)signal->getDataPtr();
+
+ const Uint32 senderData = ref->getConnectionPtr();
+ SyncRecord* tmp = c_syncPool.getPtr(senderData);
+
+ tmp->runCREATE_TRIG_REF(signal);
+
+ DBUG_VOID_RETURN;
}
void
@@ -1514,7 +1521,7 @@
const Uint32 senderData = ref->getConnectionPtr();
SyncRecord* tmp = c_syncPool.getPtr(senderData);
- tmp->runDROP_TRIG_CONF(signal);
+ tmp->runDROP_TRIG_REF(signal);
DBUG_VOID_RETURN;
}
@@ -1640,7 +1647,7 @@
}
if (! do_continue) {
- m_error = true;
+ m_error = 1;
completeMeta(signal);
return;
}
@@ -1693,7 +1700,7 @@
* interested in meta data.
*/
if(subPtr.p->m_subscriptionType == SubCreateReq::SelectiveTableSnapshot)
- if(!subPtr.p->m_tables[tableId])
+ if(!subPtr.p->m_tables.get(tableId))
okToSend = false;
if(okToSend) {
@@ -1869,7 +1876,7 @@
ndbrequire(suma.c_tables.find(tabPtr, * tabIt.data));
if(subPtr.p->m_subscriptionType == SubCreateReq::SelectiveTableSnapshot)
{
- if(!subPtr.p->m_tables[tabPtr.p->m_tableId]) {
+ if(!subPtr.p->m_tables.get(tabPtr.p->m_tableId)) {
*tab = tabPtr;
return true;
}
@@ -1907,7 +1914,7 @@
if(subPtr.p->m_subscriptionType == SubCreateReq::SelectiveTableSnapshot) {
jam();
- if(!subPtr.p->m_tables[tabPtr.p->m_tableId]) {
+ if(!subPtr.p->m_tables.get(tabPtr.p->m_tableId)) {
/*
* table is not part of the subscription. Check next table
*/
@@ -2108,7 +2115,7 @@
// ndbout_c("c_restartLock");
if (RtoI(signal->getSendersBlockRef(), false) == RNIL) {
jam();
- sendSubStartRef(signal, /** Error Code */ 0, true);
+ sendSubStartRef(signal, 1405);
DBUG_VOID_RETURN;
}
// only allow other Suma's in the nodegroup to come through for restart purposes
@@ -2129,7 +2136,7 @@
SubscriptionPtr subPtr;
if(!c_subscriptions.find(subPtr, key)){
jam();
- sendSubStartRef(signal, /** Error Code */ 0);
+ sendSubStartRef(signal, 1407);
DBUG_VOID_RETURN;
}
@@ -2140,7 +2147,7 @@
#if 0
ndbout_c("Locked");
#endif
- sendSubStartRef(signal, /** Error Code */ 0, true);
+ sendSubStartRef(signal, 1411);
DBUG_VOID_RETURN;
}
syncPtr.p->m_locked = true;
@@ -2149,7 +2156,7 @@
if(!c_subscriberPool.seize(subbPtr)){
jam();
syncPtr.p->m_locked = false;
- sendSubStartRef(signal, /** Error Code */ 0);
+ sendSubStartRef(signal, 1412);
DBUG_VOID_RETURN;
}
@@ -2272,20 +2279,40 @@
}
#endif
void
-SumaParticipant::sendSubStartRef(Signal* signal, Uint32 errCode,
- bool temporary){
+SumaParticipant::sendSubStartRef(Signal* signal, Uint32 errCode)
+{
jam();
SubStartRef * ref = (SubStartRef *)signal->getDataPtrSend();
ref->senderRef = reference();
ref->err = errCode;
- if (temporary) {
- jam();
- ref->setTemporary();
- }
releaseSections(signal);
sendSignal(signal->getSendersBlockRef(), GSN_SUB_START_REF, signal,
SubStartRef::SignalLength, JBB);
}
+void
+SumaParticipant::sendSubStartRef(Signal* signal,
+ SubscriberPtr subbPtr, Uint32 error,
+ SubscriptionData::Part part)
+{
+ jam();
+
+ SubscriptionPtr subPtr;
+ c_subscriptions.getPtr(subPtr, subbPtr.p->m_subPtrI);
+
+ Ptr<SyncRecord> syncPtr;
+ c_syncPool.getPtr(syncPtr, subPtr.p->m_syncPtrI);
+
+ SubStartRef * ref= (SubStartRef *)signal->getDataPtrSend();
+ ref->senderRef = reference();
+ ref->senderData = subbPtr.p->m_senderData;
+ ref->subscriptionId = subPtr.p->m_subscriptionId;
+ ref->subscriptionKey = subPtr.p->m_subscriptionKey;
+ ref->part = (Uint32) part;
+ ref->err = error;
+
+ sendSignal(subPtr.p->m_subscriberRef, GSN_SUB_START_REF, signal,
+ SubStartRef::SignalLength, JBB);
+}
/**********************************************************
*
@@ -2408,6 +2435,28 @@
}
void
+SumaParticipant::SyncRecord::runCREATE_TRIG_REF(Signal* signal){
+ jam();
+
+ CreateTrigRef * const ref = (CreateTrigRef*)signal->getDataPtr();
+ const Uint32 triggerId = ref->getTriggerId();
+ Uint32 type = (triggerId >> 16) & 0x3;
+ Uint32 tableId = ref->getTableId();
+
+ TablePtr tabPtr;
+ ndbrequire(suma.c_tables.find(tabPtr, tableId));
+
+ m_error= ref->getErrorCode();
+
+ ndbrequire(type < 3);
+
+ if(triggerId == m_latestTriggerId){
+ jam();
+ nextTrigger(signal);
+ }
+}
+
+void
SumaParticipant::SyncRecord::completeTrigger(Signal* signal){
jam();
SubscriptionPtr subPtr;
@@ -2415,7 +2464,6 @@
#ifdef EVENT_PH3_DEBUG
ndbout_c("SumaParticipant: trigger completed");
#endif
- Uint32 gci;
suma.c_subscriptions.getPtr(subPtr, m_subscriptionPtrI);
ndbrequire(subPtr.p->m_syncPtrI == ptrI);
@@ -2433,12 +2481,19 @@
}
}
ndbrequire(found);
- gci = suma.getFirstGCI(signal);
- subbPtr.p->m_firstGCI = gci;
suma.c_prepDataSubscribers.remove(subbPtr);
- suma.c_dataSubscribers.add(subbPtr);
}
- suma.sendSubStartComplete(signal, subbPtr, gci, SubscriptionData::TableData);
+
+ if (m_error)
+ {
+ suma.sendSubStartRef(signal,subbPtr,m_error,SubscriptionData::TableData);
+ return;
+ }
+
+ Uint32 gci= suma.getFirstGCI(signal);
+ subbPtr.p->m_firstGCI = gci;
+ suma.c_dataSubscribers.add(subbPtr);
+ suma.sendSubStartComplete(signal,subbPtr,gci,SubscriptionData::TableData);
}
void
@@ -2854,10 +2909,6 @@
ndbrequire(f_bufferLock == trigId);
-#ifdef EVENT_DEBUG2
- ndbout_c("SumaParticipant::execFIRE_TRIG_ORD");
-#endif
-
Uint32 sz = trg->getNoOfPrimaryKeyWords()+trg->getNoOfAfterValueWords();
ndbrequire(sz == f_trigBufferSize);
@@ -2920,35 +2971,33 @@
SubscriberPtr subbPtr;
for(c_dataSubscribers.first(subbPtr); !subbPtr.isNull();
c_dataSubscribers.next(subbPtr)){
- if (subbPtr.p->m_firstGCI > gci) {
-#ifdef EVENT_DEBUG
- ndbout_c("m_firstGCI = %u, gci = %u", subbPtr.p->m_firstGCI, gci);
-#endif
+ if (c_handoverToDo && subbPtr.p->m_firstGCI > gci)
+ {
+ DBUG_PRINT("info",("c_handoverToDo: %d, m_firstGCI = %d, gci = %d",
+ c_handoverToDo, subbPtr.p->m_firstGCI, gci ));
jam();
- // we're either restarting or it's a newly created subscriber
- // and waiting for the right gci
+ // we're restarting and waiting for the right gci
continue;
}
jam();
- const Uint32 ref = subbPtr.p->m_subscriberRef;
- // ndbout_c("ref = %u", ref);
- const Uint32 subdata = subbPtr.p->m_subscriberData;
- data->senderData = subdata;
/*
* get subscription ptr for this subscriber
*/
SubscriptionPtr subPtr;
c_subscriptions.getPtr(subPtr, subbPtr.p->m_subPtrI);
- if(!subPtr.p->m_tables[tableId]) {
+ if(!subPtr.p->m_tables.get(tableId)) {
jam();
continue;
//continue in for-loop if the table is not part of
//the subscription. Otherwise, send data to subscriber.
}
+ const Uint32 ref = subbPtr.p->m_subscriberRef;
+ data->senderData= subbPtr.p->m_subscriberData;
+
if (subPtr.p->m_subscriptionType == SubCreateReq::TableEvent) {
if (replicaFlag) {
jam();
@@ -3306,7 +3355,7 @@
if(!c_subscriptions.find(subPtr, key)){
jam();
- sendSubStopRef(signal, GrepError::SUBSCRIPTION_ID_NOT_FOUND);
+ sendSubStopRef(signal, 1407);
return;
}
@@ -3341,7 +3390,7 @@
*/
if (!found) {
jam();
- sendSubStopRef(signal, GrepError::SUBSCRIBER_NOT_FOUND);
+ sendSubStopRef(signal, 1407);
DBUG_VOID_RETURN;
}
}
@@ -3354,7 +3403,7 @@
c_syncPool.getPtr(syncPtr, subPtr.p->m_syncPtrI);
if (syncPtr.p->m_locked) {
jam();
- sendSubStopRef(signal, /** Error Code */ 0, true);
+ sendSubStopRef(signal, 1411);
DBUG_VOID_RETURN;
}
syncPtr.p->m_locked = true;
@@ -3391,15 +3440,12 @@
}
void
-SumaParticipant::sendSubStopRef(Signal* signal, Uint32 errCode,
- bool temporary){
+SumaParticipant::sendSubStopRef(Signal* signal, Uint32 errCode)
+{
jam();
SubStopRef * ref = (SubStopRef *)signal->getDataPtrSend();
ref->senderRef = reference();
ref->errorCode = errCode;
- if (temporary) {
- ref->setTemporary();
- }
sendSignal(signal->getSendersBlockRef(),
GSN_SUB_STOP_REF,
signal,
@@ -3417,6 +3463,7 @@
void
SumaParticipant::execSUB_REMOVE_REQ(Signal* signal) {
jamEntry();
+ DBUG_ENTER("SumaParticipant::execSUB_REMOVE_REQ");
Uint32 senderRef = signal->getSendersBlockRef();
@@ -3427,11 +3474,12 @@
Subscription key;
key.m_subscriptionId = req.subscriptionId;
key.m_subscriptionKey = req.subscriptionKey;
-
+ bool drop_table= 1;
+
if(!c_subscriptions.find(subPtr, key)) {
jam();
- sendSubRemoveRef(signal, req, (Uint32) GrepError::SUBSCRIPTION_ID_NOT_FOUND);
- return;
+ sendSubRemoveRef(signal, req, 1407);
+ DBUG_VOID_RETURN;
}
int count = 0;
@@ -3442,9 +3490,12 @@
!i_subbPtr.isNull(); c_prepDataSubscribers.next(i_subbPtr)){
jam();
if( i_subbPtr.p->m_subPtrI == subPtr.i ) {
+ /**
+ * we are currently setting up triggers etc. for this event
+ */
jam();
- sendSubRemoveRef(signal, req, /* ErrorCode */ 0, true);
- return;
+ sendSubRemoveRef(signal, req, 1413);
+ DBUG_VOID_RETURN;
// c_prepDataSubscribers.release(subbPtr);
}
}
@@ -3454,18 +3505,33 @@
SubscriberPtr subbPtr = i_subbPtr;
c_dataSubscribers.next(i_subbPtr);
if( subbPtr.p->m_subPtrI == subPtr.i ) {
- jam();
- sendSubRemoveRef(signal, req, /* ErrorCode */ 0, true);
- return;
- /* Unfinished/untested code. If remove should be possible
- * even if subscribers are left these have to be stopped
- * first. See m_markRemove, m_nSubscribers. We need also to
- * block remove for this subscription so that multiple
- * removes is not possible...
- */
- c_dataSubscribers.remove(subbPtr);
- c_removeDataSubscribers.add(subbPtr);
- count++;
+ if (drop_table)
+ {
+ jam();
+ /**
+ * just remove it.
+ * triggers will be released by the drop table
+ */
+ // ToDo send a signal to subscribers that it's dropped
+ c_dataSubscribers.remove(subbPtr);
+ }
+ else
+ {
+ jam();
+ // don't allow remove when there already is a subscription
+ sendSubRemoveRef(signal, req, 1414);
+ DBUG_VOID_RETURN;
+ // future...
+ /* Unfinished/untested code. If remove should be possible
+ * even if subscribers are left these have to be stopped
+ * first. See m_markRemove, m_nSubscribers. We need also to
+ * block remove for this subscription so that multiple
+ * removes is not possible...
+ */
+ c_dataSubscribers.remove(subbPtr);
+ c_removeDataSubscribers.add(subbPtr);
+ count++;
+ }
}
}
c_metaSubscribers.first(i_subbPtr);
@@ -3489,8 +3555,10 @@
subPtr.p->m_markRemove = true;
subPtr.p->m_nSubscribers = count;
sendSubStopReq(signal);
+ DBUG_VOID_RETURN;
} else {
completeSubRemoveReq(signal, subPtr);
+ DBUG_VOID_RETURN;
}
}
@@ -3552,20 +3620,20 @@
void
SumaParticipant::sendSubRemoveRef(Signal* signal, const SubRemoveReq& req,
- Uint32 errCode, bool temporary){
+ Uint32 errCode)
+{
jam();
+ DBUG_ENTER("SumaParticipant::sendSubRemoveRef");
SubRemoveRef * ref = (SubRemoveRef *)signal->getDataPtrSend();
ref->senderRef = reference();
ref->subscriptionId = req.subscriptionId;
ref->subscriptionKey = req.subscriptionKey;
ref->senderData = req.senderData;
ref->err = errCode;
- if (temporary)
- ref->setTemporary();
releaseSections(signal);
sendSignal(signal->getSendersBlockRef(), GSN_SUB_REMOVE_REF,
signal, SubRemoveRef::SignalLength, JBB);
- return;
+ DBUG_VOID_RETURN;
}
void
@@ -3673,7 +3741,7 @@
#if 0
for (int i = 0; i < MAX_TABLES; i++)
- if (subPtr.p->m_tables[i]) {
+ if (subPtr.p->m_tables.get(i)) {
req->tableId = i;
break;
}
--- 1.3/ndb/src/kernel/blocks/suma/Suma.hpp 2005-03-09 11:49:40 +01:00
+++ 1.4/ndb/src/kernel/blocks/suma/Suma.hpp 2005-03-21 21:59:42 +01:00
@@ -178,7 +178,7 @@
Uint32 m_subscriptionPtrI;
bool m_locked;
bool m_doSendSyncData;
- bool m_error;
+ Uint32 m_error;
TableList m_tableList; // Tables to sync (snapshoted at beginning)
TableList::DataBufferIterator m_tableList_it;
@@ -237,6 +237,7 @@
void runDIGETPRIMCONF(Signal* signal);
void runCREATE_TRIG_CONF(Signal* signal);
+ void runCREATE_TRIG_REF(Signal* signal);
void runDROP_TRIG_CONF(Signal* signal);
void runDROP_TRIG_REF(Signal* signal);
void runDropTrig(Signal* signal, Uint32 triggerId, Uint32 tableId);
@@ -275,7 +276,7 @@
* in the subscription.
*/
// TODO we've got to fix this, this is to inefficient. Tomas
- char m_tables[MAX_TABLES];
+ Bitmask<(unsigned int)(MAX_TABLES+3)/4> m_tables;
#if 0
char m_tableNames[MAX_TABLES][MAX_TAB_NAME_SIZE];
#endif
@@ -363,16 +364,13 @@
void sendSubIdRef(Signal* signal, Uint32 errorCode);
void sendSubCreateConf(Signal* signal, Uint32 sender, SubscriptionPtr subPtr);
- void sendSubCreateRef(Signal* signal, const SubCreateReq& req, Uint32 errorCode);
- void sendSubStartRef(SubscriptionPtr subPtr, Signal* signal,
- Uint32 errorCode, bool temporary = false);
- void sendSubStartRef(Signal* signal,
- Uint32 errorCode, bool temporary = false);
- void sendSubStopRef(Signal* signal,
- Uint32 errorCode, bool temporary = false);
+ void sendSubCreateRef(Signal* signal, const SubCreateReq& req, Uint32 errorCode);
+ void sendSubStartRef(Signal*, SubscriberPtr, Uint32 errorCode, SubscriptionData::Part);
+ void sendSubStartRef(Signal* signal, Uint32 errorCode);
+ void sendSubStopRef(Signal* signal, Uint32 errorCode);
void sendSubSyncRef(Signal* signal, Uint32 errorCode);
void sendSubRemoveRef(Signal* signal, const SubRemoveReq& ref,
- Uint32 errorCode, bool temporary = false);
+ Uint32 errorCode);
void sendSubStartComplete(Signal*, SubscriberPtr, Uint32,
SubscriptionData::Part);
void sendSubStopComplete(Signal*, SubscriberPtr);
--- 1.49/ndb/src/mgmclient/CommandInterpreter.cpp 2005-02-17 09:37:04 +01:00
+++ 1.50/ndb/src/mgmclient/CommandInterpreter.cpp 2005-03-21 21:59:42 +01:00
@@ -220,7 +220,6 @@
#include <NdbMem.h>
#include <EventLogger.hpp>
#include <signaldata/SetLogLevelOrd.hpp>
-#include <signaldata/GrepImpl.hpp>
#ifdef HAVE_GLOBAL_REPLICATION
#endif // HAVE_GLOBAL_REPLICATION
--- 1.73/ndb/src/mgmsrv/MgmtSrvr.cpp 2005-03-04 12:19:40 +01:00
+++ 1.74/ndb/src/mgmsrv/MgmtSrvr.cpp 2005-03-21 21:59:42 +01:00
@@ -37,7 +37,6 @@
#include <signaldata/EventReport.hpp>
#include <signaldata/DumpStateOrd.hpp>
#include <signaldata/BackupSignalData.hpp>
-#include <signaldata/GrepImpl.hpp>
#include <signaldata/ManagementServer.hpp>
#include <NdbSleep.h>
#include <EventLogger.hpp>
@@ -2565,6 +2564,7 @@
int
MgmtSrvr::repCommand(Uint32* repReqId, Uint32 request, bool waitCompleted)
{
+#if 0
bool next;
NodeId nodeId = 0;
@@ -2602,7 +2602,7 @@
*/
*repReqId = 4711;
-
+#endif
return 0;
}
--- 1.51/ndb/src/ndbapi/Ndb.cpp 2005-03-17 15:20:30 +01:00
+++ 1.52/ndb/src/ndbapi/Ndb.cpp 2005-03-21 21:59:42 +01:00
@@ -1247,7 +1247,7 @@
else
theImpl->m_ev_op= op->m_next;
- assert(theImpl->m_ev_op == 0 || theImpl->m_ev_op->m_next->m_prev == 0);
+ assert(theImpl->m_ev_op == 0 || theImpl->m_ev_op->m_prev == 0);
delete tOp;
DBUG_RETURN(0);
--- 1.74/ndb/src/ndbapi/NdbDictionaryImpl.cpp 2005-03-17 15:20:30 +01:00
+++ 1.75/ndb/src/ndbapi/NdbDictionaryImpl.cpp 2005-03-21 21:59:42 +01:00
@@ -609,12 +609,12 @@
void NdbEventImpl::setName(const char * name)
{
- m_externalName.assign(name);
+ m_name.assign(name);
}
const char *NdbEventImpl::getName() const
{
- return m_externalName.c_str();
+ return m_name.c_str();
}
void
@@ -1020,7 +1020,12 @@
DBUG_RETURN(-1);
}
- if ( (temporaryMask & m_error.code) != 0 ) {
+ if ( temporaryMask == -1)
+ {
+ if (m_error.status == NdbError::TemporaryError)
+ continue;
+ }
+ else if ( (temporaryMask & m_error.code) != 0 ) {
continue;
}
if (errcodes) {
@@ -2346,25 +2351,21 @@
{
DBUG_ENTER("NdbDictionaryImpl::createEvent");
int i;
- NdbTableImpl* tab = getTable(evnt.getTableName());
-
- if(tab == 0){
-#ifdef EVENT_DEBUG
- ndbout_c("NdbDictionaryImpl::createEvent: table not found: %s",
- evnt.getTableName());
-#endif
- DBUG_RETURN(-1);
+ NdbTableImpl* tab= evnt.m_tableImpl;
+ if (tab == 0)
+ {
+ tab= getTable(evnt.getTableName());
+ if(tab == 0){
+ DBUG_PRINT("info",("NdbDictionaryImpl::createEvent: table not found: %s",
+ evnt.getTableName()));
+ DBUG_RETURN(-1);
+ }
}
evnt.m_tableId = tab->m_tableId;
evnt.m_tableImpl = tab;
-#ifdef EVENT_DEBUG
- ndbout_c("Event on tableId=%d", evnt.m_tableId);
-#endif
-
NdbTableImpl &table = *evnt.m_tableImpl;
-
int attributeList_sz = evnt.m_attrIds.size();
for (i = 0; i < attributeList_sz; i++) {
@@ -2382,10 +2383,12 @@
evnt.m_attrIds.clear();
attributeList_sz = evnt.m_columns.size();
-#ifdef EVENT_DEBUG
- ndbout_c("creating event %s", evnt.m_externalName.c_str());
- ndbout_c("no of columns %d", evnt.m_columns.size());
-#endif
+
+ DBUG_PRINT("info",("Event on tableId=%d, event name %s, no of columns %d",
+ evnt.m_tableId,
+ evnt.m_name.c_str(),
+ evnt.m_columns.size()));
+
int pk_count = 0;
evnt.m_attrListBitmask.clear();
@@ -2468,13 +2471,13 @@
UtilBufferWriter w(m_buffer);
- const size_t len = strlen(evnt.m_externalName.c_str()) + 1;
+ const size_t len = strlen(evnt.m_name.c_str()) + 1;
if(len > MAX_TAB_NAME_SIZE) {
m_error.code= 4241;
DBUG_RETURN(-1);
}
- w.add(SimpleProperties::StringValue, evnt.m_externalName.c_str());
+ w.add(SimpleProperties::StringValue, evnt.m_name.c_str());
if (getFlag == 0)
w.add(SimpleProperties::StringValue,
@@ -2515,21 +2518,19 @@
evnt.m_eventId = evntConf->getEventId();
evnt.m_eventKey = evntConf->getEventKey();
- DBUG_RETURN(ret);
+ DBUG_RETURN(0);
}
int
NdbDictInterface::createEvent(NdbApiSignal* signal,
LinearSectionPtr ptr[3], int noLSP)
{
- const int noErrCodes = 1;
- int errCodes[noErrCodes] = {CreateEvntRef::Busy};
return dictSignal(signal,ptr,noLSP,
1 /*use masternode id*/,
100,
WAIT_CREATE_INDX_REQ /*WAIT_CREATE_EVNT_REQ*/,
-1,
- errCodes,noErrCodes, CreateEvntRef::Temporary);
+ NULL,0, -1);
}
int
@@ -2545,32 +2546,29 @@
{
DBUG_ENTER("NdbDictInterface::executeSubscribeEvent");
NdbApiSignal tSignal(m_reference);
- // tSignal.theReceiversBlockNumber = SUMA;
tSignal.theReceiversBlockNumber = DBDICT;
tSignal.theVerId_signalNumber = GSN_SUB_START_REQ;
tSignal.theLength = SubStartReq::SignalLength2;
- SubStartReq * sumaStart = CAST_PTR(SubStartReq, tSignal.getDataPtrSend());
-
- sumaStart->subscriptionId = ev_op.m_eventImpl->m_eventId;
- sumaStart->subscriptionKey = ev_op.m_eventImpl->m_eventKey;
- sumaStart->part = SubscriptionData::TableData;
- sumaStart->subscriberData = ev_op.m_oid;
- sumaStart->subscriberRef = m_reference;
+ SubStartReq * req = CAST_PTR(SubStartReq, tSignal.getDataPtrSend());
- DBUG_RETURN(executeSubscribeEvent(&tSignal, NULL));
-}
-
-int
-NdbDictInterface::executeSubscribeEvent(NdbApiSignal* signal,
- LinearSectionPtr ptr[3])
-{
- return dictSignal(signal,NULL,0,
- 1 /*use masternode id*/,
- 100,
- WAIT_CREATE_INDX_REQ /*WAIT_CREATE_EVNT_REQ*/,
- -1,
- NULL,0);
+ req->subscriptionId = ev_op.m_eventImpl->m_eventId;
+ req->subscriptionKey = ev_op.m_eventImpl->m_eventKey;
+ req->part = SubscriptionData::TableData;
+ req->subscriberData = ev_op.m_oid;
+ req->subscriberRef = m_reference;
+
+ DBUG_PRINT("info",("GSN_SUB_START_REQ subscriptionId=%d,subscriptionKey=%d,"
+ "subscriberData=%d",req->subscriptionId,
+ req->subscriptionKey,req->subscriberData));
+
+ int errCodes[] = { SubStartRef::Busy };
+ DBUG_RETURN(dictSignal(&tSignal,NULL,0,
+ 1 /*use masternode id*/,
+ 100,
+ WAIT_CREATE_INDX_REQ /*WAIT_CREATE_EVNT_REQ*/,
+ -1,
+ errCodes, sizeof(errCodes)/sizeof(errCodes[0])));
}
int
@@ -2592,27 +2590,25 @@
tSignal.theVerId_signalNumber = GSN_SUB_STOP_REQ;
tSignal.theLength = SubStopReq::SignalLength;
- SubStopReq * sumaStop = CAST_PTR(SubStopReq, tSignal.getDataPtrSend());
-
- sumaStop->subscriptionId = ev_op.m_eventImpl->m_eventId;
- sumaStop->subscriptionKey = ev_op.m_eventImpl->m_eventKey;
- sumaStop->subscriberData = ev_op.m_oid;
- sumaStop->part = (Uint32) SubscriptionData::TableData;
- sumaStop->subscriberRef = m_reference;
+ SubStopReq * req = CAST_PTR(SubStopReq, tSignal.getDataPtrSend());
- DBUG_RETURN(stopSubscribeEvent(&tSignal, NULL));
-}
-
-int
-NdbDictInterface::stopSubscribeEvent(NdbApiSignal* signal,
- LinearSectionPtr ptr[3])
-{
- return dictSignal(signal,NULL,0,
- 1 /*use masternode id*/,
- 100,
- WAIT_CREATE_INDX_REQ /*WAIT_SUB_STOP__REQ*/,
- -1,
- NULL,0);
+ req->subscriptionId = ev_op.m_eventImpl->m_eventId;
+ req->subscriptionKey = ev_op.m_eventImpl->m_eventKey;
+ req->subscriberData = ev_op.m_oid;
+ req->part = (Uint32) SubscriptionData::TableData;
+ req->subscriberRef = m_reference;
+
+ DBUG_PRINT("info",("GSN_SUB_STOP_REQ subscriptionId=%d,subscriptionKey=%d,"
+ "subscriberData=%d",req->subscriptionId,
+ req->subscriptionKey,req->subscriberData));
+
+ int errCodes[] = { SubStopRef::Busy };
+ DBUG_RETURN(dictSignal(&tSignal,NULL,0,
+ 1 /*use masternode id*/,
+ 100,
+ WAIT_CREATE_INDX_REQ /*WAIT_SUB_STOP__REQ*/,
+ -1,
+ errCodes, sizeof(errCodes)/sizeof(errCodes[0])));
}
NdbEventImpl *
@@ -2847,7 +2843,7 @@
UtilBufferWriter w(m_buffer);
- w.add(SimpleProperties::StringValue, evnt.m_externalName.c_str());
+ w.add(SimpleProperties::StringValue, evnt.m_name.c_str());
LinearSectionPtr ptr[1];
ptr[0].p = (Uint32*)m_buffer.get_data();
@@ -2861,14 +2857,12 @@
LinearSectionPtr ptr[3], int noLSP)
{
//TODO
- const int noErrCodes = 1;
- int errCodes[noErrCodes] = {DropEvntRef::Busy};
return dictSignal(signal,ptr,noLSP,
1 /*use masternode id*/,
100,
WAIT_CREATE_INDX_REQ /*WAIT_CREATE_EVNT_REQ*/,
-1,
- errCodes,noErrCodes, DropEvntRef::Temporary);
+ NULL,0, -1);
}
void
NdbDictInterface::execDROP_EVNT_CONF(NdbApiSignal * signal,
--- 1.31/ndb/src/ndbapi/NdbDictionaryImpl.hpp 2005-03-16 01:18:03 +01:00
+++ 1.32/ndb/src/ndbapi/NdbDictionaryImpl.hpp 2005-03-21 21:59:42 +01:00
@@ -230,8 +230,7 @@
Uint32 m_eventKey;
Uint32 m_tableId;
AttributeMask m_attrListBitmask;
- //BaseString m_internalName;
- BaseString m_externalName;
+ BaseString m_name;
Uint32 mi_type;
NdbDictionary::Event::EventDurability m_dur;
@@ -297,10 +296,7 @@
int dropEvent(NdbApiSignal* signal, LinearSectionPtr ptr[3], int noLSP);
int executeSubscribeEvent(class Ndb & ndb, NdbEventOperationImpl &);
- int executeSubscribeEvent(NdbApiSignal* signal, LinearSectionPtr ptr[3]);
-
int stopSubscribeEvent(class Ndb & ndb, NdbEventOperationImpl &);
- int stopSubscribeEvent(NdbApiSignal* signal, LinearSectionPtr ptr[3]);
int listObjects(NdbDictionary::Dictionary::List& list, Uint32 requestData, bool fullyQualifiedNames);
int listObjects(NdbApiSignal* signal);
--- 1.23/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2005-03-17 10:08:36 +01:00
+++ 1.24/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2005-03-21 21:59:42 +01:00
@@ -666,10 +666,13 @@
void
NdbEventBuffer::latestGCI(NdbEventOperationImpl *op, Uint32 gci)
{
+ DBUG_ENTER("NdbEventBuffer::latestGCI");
if (gci > m_latestGCI)
m_latestGCI = gci;
else if ((m_latestGCI-gci) > 0xffff) // If NDB stays up :-)
m_latestGCI = gci;
+ DBUG_PRINT("info",("m_latestGCI=%d, gci=%d", m_latestGCI, gci));
+ DBUG_VOID_RETURN;
}
Uint32
--- 1.30/ndb/src/ndbapi/Ndbif.cpp 2005-03-16 01:18:03 +01:00
+++ 1.31/ndb/src/ndbapi/Ndbif.cpp 2005-03-21 21:59:42 +01:00
@@ -716,34 +716,37 @@
Uint32 aNodeId= refToNode(ref);
TransporterFacade::instance()->sendSignal(&tSignal, aNodeId);
+ DBUG_PRINT("info",("GSN_SUB_GCP_COMPLETE_REP gci=%d",gci));
+
NdbEventOperationImpl *op= (NdbEventOperationImpl*)int2void(oid);
if (op->m_magic_number == NDB_EVENT_OP_MAGIC_NUMBER)
theEventBuffer->latestGCI(op,gci);
else
- g_eventLogger.error("dropped GSN_SUB_GCP_COMPLETE_REP due to wrong magic number");
+ g_eventLogger.error("dropped GSN_SUB_GCP_COMPLETE_REP due to wrong "
+ "magic number %d", op->m_magic_number);
break;
}
case GSN_SUB_TABLE_DATA:
{
- const SubTableData * const sdata = CAST_CONSTPTR(SubTableData, aSignal->getDataPtr());
+ const SubTableData * const sdata=
+ CAST_CONSTPTR(SubTableData, aSignal->getDataPtr());
const Uint32 oid = sdata->subscriberData;
for (int i= aSignal->m_noOfSections;i < 3; i++) {
ptr[i].p = NULL;
ptr[i].sz = 0;
}
-#ifdef EVENT_DEBUG
- ndbout_c("%s: senderData %d, gci %d, operation %d, tableId %d, noOfAttrs %d, dataLen %d",
- FNAME, subscriberData, gci, operation, tableId, noOfAttrs, dataLen);
- ndbout_c("ptr[0] %u %u ptr[1] %u %u ptr[2] %u %u\n",
- ptr[0].p,ptr[0].sz,ptr[1].p,ptr[1].sz,ptr[2].p,ptr[2].sz);
-#endif
+ DBUG_PRINT("info",("oid=subscriberData %d, gci %d, operation %d, "
+ "tableId %d",
+ sdata->subscriberData, sdata->gci, sdata->operation,
+ sdata->tableId));
NdbEventOperationImpl *op= (NdbEventOperationImpl*)int2void(oid);
if (op->m_magic_number == NDB_EVENT_OP_MAGIC_NUMBER)
theEventBuffer->insertDataL(op,sdata, ptr);
else
- g_eventLogger.error("dropped GSN_SUB_TABLE_DATA due to wrong magic number");
+ g_eventLogger.error("dropped GSN_SUB_TABLE_DATA due to wrong magic "
+ "number");
break;
}
case GSN_DIHNDBTAMPER:
--- 1.178/sql/ha_ndbcluster.cc 2005-03-18 09:17:15 +01:00
+++ 1.179/sql/ha_ndbcluster.cc 2005-03-21 21:59:42 +01:00
@@ -130,7 +130,7 @@
int ndbcluster_drop_event(Ndb *ndb, const NDBTAB* table,
const char* event_name);
int ndbcluster_create_event_ops(Ndb *ndb, const NDBTAB* table,
- const char* event_name);
+ const char *dbname, const char* event_name);
int ndbcluster_drop_event_ops(const char *tab);
inline void ndb_rep_event_name(String *event_name, const char* db, const char* tbl);
@@ -3909,7 +3909,8 @@
if ( ndbcluster_create_event(ndb,t,event_name.c_ptr()) >= 0 )
{
if (injector_ndb &&
- ndbcluster_create_event_ops(injector_ndb, t, event_name.c_ptr() ) < 0)
+ ndbcluster_create_event_ops(injector_ndb, t, m_dbname,
+ event_name.c_ptr() ) < 0)
{
; /* ToDo; handle error? */
ndbcluster_drop_event(ndb,t,event_name.c_ptr());
@@ -4078,17 +4079,29 @@
if (check_ndb_connection())
DBUG_RETURN(HA_ERR_NO_CONNECTION);
-#ifdef HAVE_REPLICATION
- if (opt_bin_log) {
- ndbcluster_drop_event_ops(name);
- }
-#endif
-
/* Call ancestor function to delete .ndb file */
handler::delete_table(name);
/* Drop the table from NDB */
- DBUG_RETURN(drop_table());
+ int r= drop_table();
+ if (r)
+ {
+ DBUG_RETURN(r);
+ }
+
+#ifdef HAVE_REPLICATION
+ if (opt_bin_log) {
+ ndbcluster_drop_event_ops(name);
+ }
+ {
+ Ndb *ndb= get_ndb();
+ String event_name(INJECTOR_EVENT_LEN);
+ ndb_rep_event_name(&event_name,m_dbname,m_tabname);
+ if ( ndbcluster_drop_event(ndb,0/* ToDo */,event_name.c_ptr()) < 0 )
+ ; /* ToDo; handle error? */
+ }
+#endif /* HAVE_REPLICATION */
+ DBUG_RETURN(0);
}
@@ -4107,14 +4120,6 @@
release_metadata();
if (dict->dropTable(m_tabname))
ERR_RETURN(dict->getNdbError());
-#ifdef HAVE_REPLICATION
- {
- String event_name(INJECTOR_EVENT_LEN);
- ndb_rep_event_name(&event_name,m_dbname,m_tabname);
- if ( ndbcluster_drop_event(ndb,0/* ToDo */,event_name.c_ptr()) < 0 )
- ; /* ToDo; handle error? */
- }
-#endif /* HAVE_REPLICATION */
DBUG_RETURN(0);
}
@@ -4434,7 +4439,8 @@
String event_name(INJECTOR_EVENT_LEN);
ndb_rep_event_name(&event_name,db,name);
/* event should have been created by someone else */
- if (ndbcluster_create_event_ops(injector_ndb, tab, event_name.c_ptr()) < 0)
+ if (ndbcluster_create_event_ops(injector_ndb, tab, db,
+ event_name.c_ptr()) < 0)
{
; /* ToDo: handle error? */
}
@@ -4812,7 +4818,14 @@
if (ndb_injector_thread_running)
{
// wait for the injector thread
- pthread_join(ndb_injector_thread, NULL);
+ int r;
+ if ((r= pthread_join(ndb_injector_thread, NULL)))
+ {
+ // ToDo the join does not work...
+ // returns EINVAL
+ DBUG_PRINT("info",("pthread_join(ndb_injector_thread, NULL) %d", r));
+ DBUG_PRINT("info",("%d %d %d", ESRCH, EINVAL, EDEADLK));
+ }
ndb_injector_thread_running= 0;
}
#endif /* HAVE_REPLICATION */
@@ -7143,19 +7156,56 @@
my_event.addEventColumn(a);
}
- int res= dict->createEvent(my_event); // Add event to database
- if (res)
+ if ( dict->createEvent(my_event) ) // Add event to database
{
- sql_print_error("NDB Replication: Unable to create event in database. "
- "Event: %s Error Code: %d Message: %s",
- event_name,
- dict->getNdbError().code,
- dict->getNdbError().message);
+ /**
+ * failed, print a warning
+ */
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
dict->getNdbError().code, dict->getNdbError().message,
"NDB");
- DBUG_RETURN(-1);
+ if ( dict->getNdbError().classification != NdbError::SchemaObjectExists )
+ {
+ sql_print_error("NDB Replication: Unable to create event in database. "
+ "Event: %s Error Code: %d Message: %s",
+ event_name,
+ dict->getNdbError().code,
+ dict->getNdbError().message);
+ DBUG_RETURN(-1);
+ }
+
+ /**
+ * trailing event from before; an error, but try to correct it
+ */
+ if ( dict->dropEvent(my_event.getName()) )
+ {
+ sql_print_error("NDB Replication: Unable to create event in database. "
+ " Attempt to correct with drop failed. "
+ "Event: %s Error Code: %d Message: %s",
+ event_name,
+ dict->getNdbError().code,
+ dict->getNdbError().message);
+ DBUG_RETURN(-1);
+ }
+
+ /**
+ * try to add the event again
+ */
+ if ( dict->createEvent(my_event) )
+ {
+ sql_print_error("NDB Replication: Unable to create event in database. "
+ " Attempt to correct with drop ok, but create failed. "
+ "Event: %s Error Code: %d Message: %s",
+ event_name,
+ dict->getNdbError().code,
+ dict->getNdbError().message);
+ DBUG_RETURN(-1);
+ }
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
+ 0, "NDB Replication: Removed trailing event",
+ "NDB");
}
DBUG_RETURN(0);
@@ -7183,24 +7233,21 @@
DBUG_RETURN(0);
}
-int ndbcluster_create_event_ops(Ndb *ndb, const NDBTAB *table, const char* event_name)
+int ndbcluster_create_event_ops(Ndb *ndb, const NDBTAB *table,
+ const char* dbname, const char* event_name)
{
DBUG_ENTER("ndbcluster_setup_repl_for_table");
NdbEventOperation *op= ndb->createEventOperation(event_name,100);
{
- String share_name(100);
- share_name.append("./");
- share_name.append(ndb->getDatabaseName());
- share_name.append('/');
- share_name.append(table->getName());
-
- NDB_SHARE *share= get_share(share_name.c_ptr());
+ char name[FN_REFLEN];
+ (void)strxnmov(name, FN_REFLEN, "./",dbname,"/",table->getName(),NullS);
+ NDB_SHARE *share= get_share(name);
pthread_mutex_lock(&share->mutex);
share->op= op; // assign op in NDB_SHARE
pthread_mutex_unlock(&share->mutex);
- free_share(share);
+ // do not free_share since this will delete the share
}
if(!op)
@@ -7240,21 +7287,26 @@
int ndbcluster_drop_event_ops(const char *db_tab)
{
+ DBUG_ENTER("ndbcluster_drop_event_ops");
+
NDB_SHARE *share= get_share(db_tab);
pthread_mutex_lock(&share->mutex);
- if(!share->op) // may have had problem setting up op
- goto q;
-
- sql_print_information("NDB Replication: Drop table %s",
- share->op->getTable()->getName());
- injector_ndb->dropEventOperation(share->op);
+ if (share->op)
+ {
+ sql_print_information("NDB Replication: Drop table %s",
+ share->op->getTable()->getName());
+ injector_ndb->dropEventOperation(share->op);
- share->op= NULL;
+ share->op= NULL;
+ }; // else may have had problem setting up op
-q:
pthread_mutex_unlock(&share->mutex);
free_share(share);
+ // extra free since we did not free at create
+ free_share(share);
+
+ DBUG_RETURN(0);
}
inline void
--- 1.30/ndb/src/ndbapi/ndberror.c 2005-03-06 13:58:20 +01:00
+++ 1.31/ndb/src/ndbapi/ndberror.c 2005-03-21 21:59:42 +01:00
@@ -74,6 +74,7 @@
* 900 - TUX
* 1200 - LQH
* 1300 - BACKUP
+ * 1400 - SUMA
* 4000 - API
* 4100 - ""
* 4200 - ""
@@ -313,6 +314,8 @@
{ 4708, AE, "Event name is too long"},
{ 4709, AE, "Can't accept more subscribers"},
{ 746, OE, "Event name already exists"},
+ { 747, IS, "Out of event records"},
+ { 748, TR, "Busy during read of event table"},
{ 4710, AE, "Event not found"},
{ 4711, AE, "Creation of event failed"},
{ 4712, AE, "Stopped event operation does not exist. Already stopped?"},
@@ -396,6 +399,15 @@
* Still uncategorized
*/
{ 720, AE, "Attribute name reused in table definition" },
+ { 1405, NR, "Subscriber manager busy with node recovery" },
+ { 1407, SE, "Subscription not found in subscriber manager" },
+ { 1411, TR, "Subscriber manager busy with adding/removing a subscriber" },
+ { 1412, IS, "Can't accept more subscribers, out of space in pool" },
+ { 1413, TR, "Subscriber manager busy with adding the subscription" },
+ { 1414, TR, "Subscriber manager has subscribers on this subscription" },
+ { 1415, SE, "Subscription not unique in subscriber manager" },
+ { 1416, IS, "Can't accept more subscriptions, out of space in pool" },
+
{ 4004, AE, "Attribute name not found in the Table" },
{ 4100, AE, "Status Error in NDB" },
--- 1.4/ndb/src/common/debugger/Makefile.am 2004-11-11 21:25:31 +01:00
+++ 1.5/ndb/src/common/debugger/Makefile.am 2005-03-21 21:59:41 +01:00
@@ -2,7 +2,7 @@
noinst_LTLIBRARIES = libtrace.la
-libtrace_la_SOURCES = SignalLoggerManager.cpp DebuggerNames.cpp BlockNames.cpp EventLogger.cpp GrepError.cpp
+libtrace_la_SOURCES = SignalLoggerManager.cpp DebuggerNames.cpp BlockNames.cpp EventLogger.cpp
include $(top_srcdir)/ndb/config/common.mk.am
include $(top_srcdir)/ndb/config/type_kernel.mk.am
--- 1.3/ndb/src/kernel/blocks/grep/Makefile.am 2004-11-11 21:25:32 +01:00
+++ 1.4/ndb/src/kernel/blocks/grep/Makefile.am 2005-03-21 21:59:42 +01:00
@@ -1,6 +1,6 @@
noinst_LIBRARIES = libgrep.a
-libgrep_a_SOURCES = Grep.cpp GrepInit.cpp
+libgrep_a_SOURCES = Grep.cpp GrepInit.cpp GrepError.cpp
include $(top_srcdir)/ndb/config/common.mk.am
include $(top_srcdir)/ndb/config/type_kernel.mk.am
--- 1.1/mysql-test/r/ndb_rpl_basic.result 2005-03-17 15:20:31 +01:00
+++ 1.2/mysql-test/r/ndb_rpl_basic.result 2005-03-21 21:59:41 +01:00
@@ -1,3 +1,11 @@
+drop table if exists t1, t2;
+drop database if exists mysqltest;
+create database mysqltest;
+use mysqltest;
+show tables;
+Tables_in_mysqltest
+drop database mysqltest;
+use test;
create table t1 (a int primary key, b int) engine=ndb;
insert into t1 values (1,1),(2,2);
select * from t1 order by a;
@@ -16,4 +24,20 @@
select * from t1;
a b
2 2
+truncate cluster_replication.binlog_index;
drop table t1;
+create table t1 (a int primary key, b int) engine=ndb;
+create database mysqltest;
+use mysqltest;
+create table t1 (c int, d int primary key) engine=ndb;
+use test;
+insert into mysqltest.t1 values (1,1),(2,2);
+select * from mysqltest.t1 order by d;
+c d
+1 1
+2 2
+select * from cluster_replication.binlog_index;
+gci master_log_file master_log_pos
+# # #
+drop table t1;
+drop database mysqltest;
--- 1.1/mysql-test/r/ndb_rpl_multi.result 2005-03-17 19:56:49 +01:00
+++ 1.2/mysql-test/r/ndb_rpl_multi.result 2005-03-21 21:59:41 +01:00
@@ -5,7 +5,11 @@
select * from cluster_replication.binlog_index;
gci master_log_file master_log_pos
create table t2 (a int primary key, b int) engine=ndb;
-flush status;
+show tables;
+Tables_in_test
+t2
+select * from cluster_replication.binlog_index;
+gci master_log_file master_log_pos
insert into t2 values (1,1),(2,2);
select * from t2 order by a;
a b
@@ -14,5 +18,13 @@
select * from cluster_replication.binlog_index;
gci master_log_file master_log_pos
# # #
+select * from t2 order by a;
+a b
+1 1
+2 2
+select * from cluster_replication.binlog_index;
+gci master_log_file master_log_pos
+# # #
drop table t2;
-flush status;
+show tables;
+Tables_in_test
--- 1.2/mysql-test/t/ndb_rpl_basic.test 2005-03-17 20:03:56 +01:00
+++ 1.3/mysql-test/t/ndb_rpl_basic.test 2005-03-21 21:59:41 +01:00
@@ -1,7 +1,13 @@
-- source include/have_ndb.inc
--disable_warnings
-drop table if exists t1;
+drop table if exists t1, t2;
+drop database if exists mysqltest;
+create database mysqltest;
+use mysqltest;
+show tables;
+drop database mysqltest;
+use test;
--enable_warnings
#
@@ -9,9 +15,6 @@
#
create table t1 (a int primary key, b int) engine=ndb;
-# currently events do not come right away...
---sleep 5
-
insert into t1 values (1,1),(2,2);
select * from t1 order by a;
--replace_column 1 # 2 # 3 #
@@ -21,4 +24,25 @@
delete from t1 where a=1;
select * from t1;
+truncate cluster_replication.binlog_index;
+drop table t1;
+
+# just for testing that things get into the binlog_index
+--sleep 2
+
+#
+# several tables in different databases
+#
+create table t1 (a int primary key, b int) engine=ndb;
+create database mysqltest;
+use mysqltest;
+create table t1 (c int, d int primary key) engine=ndb;
+use test;
+
+insert into mysqltest.t1 values (1,1),(2,2);
+select * from mysqltest.t1 order by d;
+--replace_column 1 # 2 # 3 #
+select * from cluster_replication.binlog_index;
+
drop table t1;
+drop database mysqltest;
--- 1.1/mysql-test/t/ndb_rpl_multi.test 2005-03-17 19:56:40 +01:00
+++ 1.2/mysql-test/t/ndb_rpl_multi.test 2005-03-21 21:59:41 +01:00
@@ -22,17 +22,19 @@
# make sure the first mysql server knows about this table
connection server1;
-flush status;
-
-# currently events do not come right away...
---sleep 5
+show tables;
+select * from cluster_replication.binlog_index;
# insert something on server2
connection server2;
insert into t2 values (1,1),(2,2);
select * from t2 order by a;
+--replace_column 1 # 2 # 3 #
+select * from cluster_replication.binlog_index;
# see if we got something on server1
+connection server1;
+select * from t2 order by a;
--replace_column 1 # 2 # 3 #
select * from cluster_replication.binlog_index;
@@ -41,4 +43,4 @@
# flush on server2
connection server2;
-flush status;
+show tables;
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.1820) | tomas | 21 Mar |