Commit ade882cd authored by unknown's avatar unknown

Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.0

into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-push
parents a3ccec45 eb4fa5db
......@@ -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
......
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment