2743 Jonas Oreland 2008-09-01
ndb - bug#39075
The "index/add partition" dih-connect ptr was not initialized
correctly
modified:
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
=== modified file 'storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2008-07-25 05:48:32 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2008-09-01 08:13:47 +0000
@@ -7264,9 +7264,16 @@ Dbdict::check_supported_add_fragment(Uin
return AlterTableRef::UnsupportedChange;
}
+ Uint32 oldFragments = olddata[1];
+#ifdef TODO_XXX
+ /**
+ * This doesnt work after a add-nodegroup
+ * dont't know why, so we instead just ignore what the API
+ * for the already existing partitions
+ */
+
// Check that all the old has the same properties...
// Only compare prefered primary, as replicas come in any order
- Uint32 oldFragments = olddata[1];
for (Uint32 i = 0; i<oldFragments; i++)
{
Uint32 idx = 2 + (1 + replicas) * i + 1;
@@ -7276,6 +7283,7 @@ Dbdict::check_supported_add_fragment(Uin
return AlterTableRef::UnsupportedChange;
}
}
+#endif
memmove(newdata + 2,
newdata + 2 + (1 + replicas) * oldFragments,
@@ -11448,6 +11456,12 @@ Dbdict::alterIndex_fromAddPartitions(Sig
if (ret == 0) {
jam();
+
+ const AlterTabConf* conf =
+ (const AlterTabConf*)signal->getDataPtr();
+
+ alterIndexPtr.p->m_dihAddFragPtr = conf->connectPtr;
+
sendTransConf(signal, op_ptr);
} else {
jam();
=== modified file 'storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2008-08-23 06:32:32 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2008-09-01 08:13:47 +0000
@@ -7650,6 +7650,7 @@ void Dbdih::execALTER_TAB_REQ(Signal * s
ptrCheckGuard(connectPtr, cconnectFileSize, connectRecord);
connectPtr.p->userpointer = senderData;
connectPtr.p->userblockref = senderRef;
+ ndbrequire(connectPtr.p->connectState == ConnectRecord::ALTER_TABLE);
tabPtr.p->totalfragments = connectPtr.p->m_alter.m_totalfragments;
if (AlterTableReq::getReorgFragFlag(connectPtr.p->m_alter.m_changeMask))
| Thread |
|---|
| • bzr push into mysql-5.1 branch (jonas:2743) Bug#39075 | Jonas Oreland | 1 Sep |