Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas 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.2314 06/04/18 10:41:56 jonas@stripped +1 -0
ndb -
Add abort in reception of invalid/inconsistent SUB_GCP_COMPLETE_REP
as proceeding (in release wo/ asserts) make mysqld crash in mysterious ways
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
1.51 06/04/18 10:41:54 jonas@stripped +23 -2
Add abort in reception of invalid/inconsistent SUB_GCP_COMPLETE_REP
as proceeding (in release wo/ asserts) make mysqld crash in mysterious ways
# 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: jonas
# Host: perch.ndb.mysql.com
# Root: /home/jonas/src/51-work
--- 1.50/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2006-03-11 06:58:42 +01:00
+++ 1.51/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2006-04-18 10:41:54 +02:00
@@ -1279,6 +1279,23 @@
return find_bucket_chained(active,gci);
}
+static
+void
+crash_on_invalid_SUB_GCP_COMPLETE_REP(const Gci_container* bucket,
+ const SubGcpCompleteRep * const rep,
+ Uint32 nodes)
+{
+ Uint32 old_cnt = bucket->m_gcp_complete_rep_count;
+
+ ndbout_c("INVALID SUB_GCP_COMPLETE_REP");
+ ndbout_c("gci: %d", rep->gci);
+ ndbout_c("sender: %x", rep->senderRef);
+ ndbout_c("count: %d", rep->gcp_complete_rep_count);
+ ndbout_c("bucket count: %u", old_cnt);
+ ndbout_c("nodes: %u", nodes);
+ abort();
+}
+
void
NdbEventBuffer::execSUB_GCP_COMPLETE_REP(const SubGcpCompleteRep * const rep)
{
@@ -1317,9 +1334,13 @@
old_cnt = m_system_nodes;
}
- assert(old_cnt >= cnt);
+ //assert(old_cnt >= cnt);
+ if (unlikely(! (old_cnt >= cnt)))
+ {
+ crash_on_invalid_SUB_GCP_COMPLETE_REP(bucket, rep, m_system_nodes);
+ }
bucket->m_gcp_complete_rep_count = old_cnt - cnt;
-
+
if(old_cnt == cnt)
{
if(likely(gci == m_latestGCI + 1 || m_latestGCI == 0))
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2314) | jonas | 18 Apr |