#At file:///export/home2/tmp/jw1159207/mysql/mysql-5.1-telco-7.0-spj/ based on revid:jan.wedvik@stripped
2907 Jan Wedvik 2009-06-26 [merge]
Preparing for merge.
modified:
storage/ndb/test/tools/test_spj.cpp
=== modified file 'storage/ndb/test/tools/test_spj.cpp'
--- a/storage/ndb/test/tools/test_spj.cpp 2009-06-26 10:17:49 +0000
+++ b/storage/ndb/test/tools/test_spj.cpp 2009-06-26 12:16:10 +0000
@@ -177,6 +177,79 @@ private:
};
};
+
+#ifdef UNUSED
+/**
+ * Append vestor of 16-bit words to vector of 32-bit words.
+ * adding a count as first 16-bit.
+ * @return Number of 32-bit words appended.
+ */
+static
+Uint32
+appendCompactList(Vector<Uint32>& dst, const Vector<Uint32>& src)
+{
+ const Uint32 cnt = src.size();
+ if (cnt)
+ {
+ dst.push_back(cnt | (src[0] << 16));
+ for (Uint32 i = 1; i+1 < cnt; i += 2)
+ {
+ dst.push_back(src[i] | (src[i+1] << 16));
+ }
+ if ((cnt & 1) == 0)
+ {
+ dst.push_back(src[cnt-1] | (0xBABE << 16));
+ }
+ return 1+cnt/2
+ }
+
+ return 0;
+}
+
+#define POS_IN_QN(field) (offsetof(QN_LookupNode, field)/sizeof(Uint32))
+
+void serializeLookup(const NdbDictionary::Table& table
+ Uint32 nodeNo,
+ Uint32 flags,
+ const Vector<Uint32>& parents,
+ const Vector<Uint32>& childProj,
+ bool userProjAll
+ const Vector<Uint32>& userProj
+ Vector<Uint32>& attrInfo){
+ assert(flags & DABits::NI_LINKED_ATTR ||
+ childProj.size()==0);
+ assert((flags & DABits::NI_HAS_PARENT &&
+ flags & DABits::NI_KEY_LINKED) ||
+ parents.size()==0);
+ const int startPos = attrInfo.size();
+ attrInfo[startPos + POS_IN_QN(requestInfo)] = flags;
+ attrInfo[startPos + POS_IN_QN(tableId)] = table.getObjectId();
+ attrInfo[startPos + POS_IN_QN(tableVersion)] = table.getObjectVersion();
+
+
+ int optPos = startPos POS_IN_QN(optional);
+
+ attrInfo[POS_IN_QN()] = ;
+
+
+
+ attrInfo[POS_IN_QN(len)] = kkkkk;
+
+
+ struct SerializedLookup{
+ Vector<Uint32>& m_result;
+
+ explicit SerializedLookup(Vector<Uint32>& result):
+ m_result(result){}
+
+ void setLength(Uint32 length){}
+
+ };
+ QN_LookupNode queryNode;
+
+}
+#endif
+
LookupOp::LookupOp(const NdbOperation* pOp,
bool final,
int nodeNo){
Attachment: [text/bzr-bundle] bzr/jan.wedvik@sun.com-20090626121610-b66red8iwm5s7zm1.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-7.0-spj branch (jan.wedvik:2907) | Jan Wedvik | 26 Jun |