Below is the list of changes that have just been committed into a local
5.1 repository of stewart. When stewart 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.1794 05/03/10 15:49:32 stewart@stripped +1 -0
WL2325 - further work in ndb injector thread
sql/ha_ndbcluster.cc
1.162 05/03/10 15:49:22 stewart@stripped +18 -12
Use n_tableEvents as index into the tableEvents array.
This means that things will work if we skip any tables in replication.
# 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: stewart
# Host: kennedy.(none)
# Root: /home/stewart/Documents/MySQL/5.1/ndb-wl2325
--- 1.161/sql/ha_ndbcluster.cc 2005-03-10 07:21:27 +11:00
+++ 1.162/sql/ha_ndbcluster.cc 2005-03-10 15:49:22 +11:00
@@ -6986,34 +6986,39 @@
goto err;
}
- tableEvents[i].ndbevent= ndb->createEventOperation(eventName.ptr(),100);
- if(!tableEvents[i].ndbevent)
+ tableEvents[n_tableEvents].ndbevent=
+ ndb->createEventOperation(eventName.ptr(),100);
+ if(!tableEvents[n_tableEvents].ndbevent)
{
sql_print_error("NDB Replication: Creating NdbEventOperation failed for"
" %s",eventName.ptr());
goto err;
}
- n_tableEvents++;
int n_columns= table->getNoOfColumns();
- tableEvents[i].recAttr= (NdbRecAttr**)malloc(2*sizeof(NdbRecAttr*)*n_columns);
- if(tableEvents[i].recAttr == NULL)
+ tableEvents[n_tableEvents].recAttr=
+ (NdbRecAttr**)malloc(2*sizeof(NdbRecAttr*)*n_columns);
+ if(tableEvents[n_tableEvents].recAttr == NULL)
{
sql_print_error("NDB Replication: Unable to allocate memory for "
"tracking table changes");
goto err;
}
- tableEvents[i].recAttrPre= tableEvents[i].recAttr+n_columns;
+ tableEvents[n_tableEvents].recAttrPre=
+ tableEvents[n_tableEvents].recAttr+n_columns;
for (int j= 0; j < n_columns; j++)
{
- tableEvents[i].recAttr[j]=
- tableEvents[i].ndbevent->getValue(table->getColumn(j)->getName());
- tableEvents[i].recAttrPre[j]=
- tableEvents[i].ndbevent->getPreValue(table->getColumn(j)->getName());
+ tableEvents[n_tableEvents].recAttr[j]=
+ tableEvents[n_tableEvents].ndbevent
+ ->getValue(table->getColumn(j)->getName());
+
+ tableEvents[n_tableEvents].recAttrPre[j]=
+ tableEvents[n_tableEvents].ndbevent
+ ->getPreValue(table->getColumn(j)->getName());
}
- if (tableEvents[i].ndbevent->execute())
+ if (tableEvents[n_tableEvents].ndbevent->execute())
{
sql_print_error("NDB Replication: ndbevent->execute failed for %s",
eventName.ptr());
@@ -7022,6 +7027,7 @@
sql_print_information("NDB Replication: %s.%s Event:%s NumColumns:%d",
t.database,t.name,eventName.ptr(),n_columns);
+ n_tableEvents++;
} // for
sql_print_information("Starting Cluster Replication with %d events",
@@ -7037,7 +7043,7 @@
DBUG_PRINT("info",("pollEvents res: %d",res));
if(res>0)
{
- for(unsigned int i=0; i<list.count; i++)
+ for(unsigned int i=0; i < n_tableEvents; i++)
{
NdbEventOperation *pOp= tableEvents[i].ndbevent;
| Thread |
|---|
| • bk commit into 5.1 tree (stewart:1.1794) | Stewart Smith | 10 Mar |