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.1808 05/03/16 08:48:46 tomas@stripped +4 -0
added function to retrieve all EventOperations
ndb/src/ndbapi/NdbEventOperationImpl.hpp
1.10 05/03/16 08:48:38 tomas@stripped +15 -17
added function to retrieve all EventOperations
ndb/src/ndbapi/NdbEventOperationImpl.cpp
1.22 05/03/16 08:48:38 tomas@stripped +11 -8
added function to retrieve all EventOperations
ndb/src/ndbapi/Ndb.cpp
1.50 05/03/16 08:48:38 tomas@stripped +7 -0
added function to retrieve all EventOperations
ndb/include/ndbapi/Ndb.hpp
1.44 05/03/16 08:48:38 tomas@stripped +1 -0
added function to retrieve all EventOperations
# 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.43/ndb/include/ndbapi/Ndb.hpp 2005-03-16 01:18:02 +01:00
+++ 1.44/ndb/include/ndbapi/Ndb.hpp 2005-03-16 08:48:38 +01:00
@@ -1244,6 +1244,7 @@
* @return an event operations that has data, NULL if no events left with data.
*/
NdbEventOperation *nextEvent(int *error);
+ NdbEventOperation *getEventOperation(NdbEventOperation* eventOp= 0);
#endif
/** @} *********************************************************************/
--- 1.49/ndb/src/ndbapi/Ndb.cpp 2005-03-16 01:18:03 +01:00
+++ 1.50/ndb/src/ndbapi/Ndb.cpp 2005-03-16 08:48:38 +01:00
@@ -1249,6 +1249,13 @@
DBUG_RETURN(0);
}
+NdbEventOperation *Ndb::getEventOperation(NdbEventOperation* tOp)
+{
+ if (tOp)
+ return tOp->m_impl.m_next;
+ return theImpl->m_ev_op->m_facade;
+}
+
int
Ndb::pollEvents(int aMillisecondNumber)
{
--- 1.21/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2005-03-16 02:09:29 +01:00
+++ 1.22/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2005-03-16 08:48:38 +01:00
@@ -556,8 +556,8 @@
// pre allocate event data array
m_sz= 10000;
m_allocated_data=
- (EventBufItem::Data *)NdbMem_Allocate(m_sz*sizeof(EventBufItem::Data));
- bzero((void*)m_allocated_data, m_sz*sizeof(EventBufItem::Data));
+ (EventBufData *)NdbMem_Allocate(m_sz*sizeof(EventBufData));
+ bzero((void*)m_allocated_data, m_sz*sizeof(EventBufData));
for (unsigned i= 0; i < m_sz-1; i++)
{
m_allocated_data[i].m_next= &m_allocated_data[i+1];
@@ -600,9 +600,12 @@
DBUG_ENTER("NdbEventBuffer::wait");
NdbMutex_Lock(m_mutex);
- if (m_received_data == 0)
- NdbCondition_WaitTimeout(p_cond, m_mutex, aMillisecondNumber);
NdbEventOperationImpl *ev_op= move_data();
+ if (ev_op == 0)
+ {
+ NdbCondition_WaitTimeout(p_cond, m_mutex, aMillisecondNumber);
+ ev_op= move_data();
+ }
NdbMutex_Unlock(m_mutex); // we have moved the data
if (ev_op)
@@ -619,7 +622,7 @@
NdbEventBuffer::next(int *error)
{
DBUG_ENTER("NdbEventBuffer::next");
- EventBufItem::Data *data;
+ EventBufData *data;
while((data = m_available_data))
{
NdbEventOperationImpl *ev_op= data->m_event_op;
@@ -685,7 +688,7 @@
{
if (op->m_state == NdbEventOperation::EO_EXECUTING) {
DBUG_PRINT("info", ("data insertion in eventId %d", op->m_eventId));
- EventBufItem::Data *data;
+ EventBufData *data;
if ((data= m_free_data))
{
// remove data from free list
@@ -735,8 +738,8 @@
int r= 0;
// ToDo should start at bufferid dependant pos for optimization
- EventBufItem::Data *prev= 0;
- for(EventBufItem::Data *data= m_available_data;
+ EventBufData *prev= 0;
+ for(EventBufData *data= m_available_data;
data; data= data->m_next)
{
DBUG_PRINT("info",("eventId: %d", data->m_event_op->m_eventId));
--- 1.9/ndb/src/ndbapi/NdbEventOperationImpl.hpp 2005-03-16 01:18:03 +01:00
+++ 1.10/ndb/src/ndbapi/NdbEventOperationImpl.hpp 2005-03-16 08:48:38 +01:00
@@ -24,14 +24,12 @@
#define NDB_EVENT_OP_MAGIC_NUMBER 0xA9F301B4
class NdbEventOperationImpl;
-struct EventBufItem {
- struct Data {
- SubTableData *sdata;
- LinearSectionPtr ptr[3];
-
- NdbEventOperationImpl *m_event_op;
- Data *m_next;
- };
+struct EventBufData
+{
+ SubTableData *sdata;
+ LinearSectionPtr ptr[3];
+ NdbEventOperationImpl *m_event_op;
+ EventBufData *m_next;
};
class NdbEventOperationImpl : public NdbEventOperation {
@@ -78,7 +76,7 @@
Uint32 m_eventId;
Uint32 m_oid;
- EventBufItem::Data *m_data_item;
+ EventBufData *m_data_item;
// managed by the ndb object
NdbEventOperationImpl *m_next;
@@ -127,22 +125,22 @@
struct NdbCondition *p_cond;
// receive thread
- EventBufItem::Data *m_received_data;
- EventBufItem::Data *m_last_received_data;
+ EventBufData *m_received_data;
+ EventBufData *m_last_received_data;
unsigned m_received_data_count;
- EventBufItem::Data *m_free_data;
+ EventBufData *m_free_data;
// user thread
- EventBufItem::Data *m_available_data;
- EventBufItem::Data *m_last_available_data;
+ EventBufData *m_available_data;
+ EventBufData *m_last_available_data;
unsigned m_available_data_count;
- EventBufItem::Data *m_used_data;
- EventBufItem::Data *m_last_used_data;
+ EventBufData *m_used_data;
+ EventBufData *m_last_used_data;
// all allocated data
- EventBufItem::Data *m_allocated_data;
+ EventBufData *m_allocated_data;
unsigned m_sz;
};
#endif
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.1808) | tomas | 17 Mar |