Commit a8fa01de authored by pekka@mysql.com's avatar pekka@mysql.com

tux optim 8 - store complete AttributeDescriptor (prepare for next step)

parent 4d8e2ed7
......@@ -318,10 +318,9 @@ private:
* Attribute metadata. Size must be multiple of word size.
*/
struct DescAttr {
unsigned m_primaryAttrId : 16;
unsigned m_typeId : 8;
unsigned m_nullable : 1;
unsigned pad1 : 7;
Uint32 m_attrDesc; // standard AttributeDescriptor
Uint16 m_primaryAttrId;
Uint16 m_typeId;
};
static const unsigned DescAttrSize = sizeof(DescAttr) >> 2;
......
......@@ -264,9 +264,9 @@ NdbOut&
operator<<(NdbOut& out, const Dbtux::DescAttr& descAttr)
{
out << "[DescAttr " << hex << &descAttr;
out << " [attrDesc " << hex << descAttr.m_attrDesc;
out << " [primaryAttrId " << dec << descAttr.m_primaryAttrId << "]";
out << " [typeId " << dec << descAttr.m_typeId << "]";
out << " [nullable " << dec << descAttr.m_nullable << "]";
out << "]";
return out;
}
......
......@@ -181,10 +181,9 @@ Dbtux::execTUX_ADD_ATTRREQ(Signal* signal)
// define the attribute
DescEnt& descEnt = getDescEnt(indexPtr.p->m_descPage, indexPtr.p->m_descOff);
DescAttr& descAttr = descEnt.m_descAttr[attrId];
descAttr.m_attrDesc = req->attrDescriptor;
descAttr.m_primaryAttrId = req->primaryAttrId;
descAttr.m_typeId = req->extTypeInfo & 0xFF;
descAttr.m_nullable = AttributeDescriptor::getNullable(req->attrDescriptor);
descAttr.pad1 = 0;
#ifdef VM_TRACE
if (debugFlags & DebugMeta) {
debugOut << "Add frag " << fragPtr.i << " attr " << attrId << " " << descAttr << endl;
......
......@@ -37,4 +37,8 @@ optim 6 mc02/a 42 ms 70 ms 66 pct
optim 7 mc02/a 42 ms 69 ms 61 pct
mc02/b 52 ms 106 ms 101 pct
optim 8 mc02/a 42 ms 69 ms 62 pct
mc02/b 54 ms 104 ms 92 pct
vim: set et:
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