summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ndb/src/kernel/blocks/dbdict/Dbdict.cpp76
-rw-r--r--ndb/test/ndbapi/testOperations.cpp3
2 files changed, 41 insertions, 38 deletions
diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
index 7c4b97c8f0f..45efaac30bc 100644
--- a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+++ b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
@@ -4346,6 +4346,44 @@ Dbdict::createTab_dih(Signal* signal,
sendSignal(DBDIH_REF, GSN_DIADDTABREQ, signal,
DiAddTabReq::SignalLength, JBB);
+
+ /**
+ * Create KeyDescriptor
+ */
+ KeyDescriptor* desc= g_key_descriptor_pool.getPtr(tabPtr.i);
+ new (desc) KeyDescriptor();
+
+ Uint32 key = 0;
+ Uint32 tAttr = tabPtr.p->firstAttribute;
+ while (tAttr != RNIL)
+ {
+ jam();
+ AttributeRecord* aRec = c_attributeRecordPool.getPtr(tAttr);
+ if (aRec->tupleKey)
+ {
+ desc->noOfKeyAttr ++;
+ desc->keyAttr[key].attributeDescriptor = aRec->attributeDescriptor;
+
+ Uint32 csNumber = (aRec->extPrecision >> 16);
+ if(csNumber)
+ {
+ desc->keyAttr[key].charsetInfo = all_charsets[csNumber];
+ ndbrequire(all_charsets[csNumber]);
+ desc->hasCharAttr = 1;
+ }
+ else
+ {
+ desc->keyAttr[key].charsetInfo = 0;
+ }
+ if(AttributeDescriptor::getDKey(aRec->attributeDescriptor))
+ {
+ desc->noOfDistrKeys ++;
+ }
+ key++;
+ }
+ tAttr = aRec->nextAttrInTable;
+ }
+ ndbrequire(key == tabPtr.p->noOfPrimkey);
}
static
@@ -4448,44 +4486,6 @@ Dbdict::execADD_FRAGREQ(Signal* signal) {
sendSignal(DBLQH_REF, GSN_LQHFRAGREQ, signal,
LqhFragReq::SignalLength, JBB);
}
-
- /**
- * Create KeyDescriptor
- */
- KeyDescriptor* desc= g_key_descriptor_pool.getPtr(tabPtr.i);
- new (desc) KeyDescriptor();
-
- Uint32 key = 0;
- Uint32 tAttr = tabPtr.p->firstAttribute;
- while (tAttr != RNIL)
- {
- jam();
- AttributeRecord* aRec = c_attributeRecordPool.getPtr(tAttr);
- if (aRec->tupleKey)
- {
- desc->noOfKeyAttr ++;
- desc->keyAttr[key].attributeDescriptor = aRec->attributeDescriptor;
-
- Uint32 csNumber = (aRec->extPrecision >> 16);
- if(csNumber)
- {
- desc->keyAttr[key].charsetInfo = all_charsets[csNumber];
- ndbrequire(all_charsets[csNumber]);
- desc->hasCharAttr = 1;
- }
- else
- {
- desc->keyAttr[key].charsetInfo = 0;
- }
- if(AttributeDescriptor::getDKey(aRec->attributeDescriptor))
- {
- desc->noOfDistrKeys ++;
- }
- key++;
- }
- tAttr = aRec->nextAttrInTable;
- }
- ndbrequire(key == tabPtr.p->noOfPrimkey);
}
void
diff --git a/ndb/test/ndbapi/testOperations.cpp b/ndb/test/ndbapi/testOperations.cpp
index 726f35b01fb..505b1620900 100644
--- a/ndb/test/ndbapi/testOperations.cpp
+++ b/ndb/test/ndbapi/testOperations.cpp
@@ -659,6 +659,9 @@ main(int argc, const char** argv){
for(Uint32 i = 0; i < 12; i++)
{
+ if(i == 6 || i == 8 || i == 10)
+ continue;
+
BaseString name("bug_9749");
name.appfmt("_%d", i);
NDBT_TestCaseImpl1 *pt = new NDBT_TestCaseImpl1(&ts,