Commit baee0670 authored by unknown's avatar unknown

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

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