4891 Jonas Oreland 2012-03-16
ndb - autotest - perform early filtering away of illegal index combinations (due to extra bit columns added to T6)
modified:
storage/ndb/test/ndbapi/testIndex.cpp
4890 jonas oreland 2012-03-15
ndb - rename "deferred trigger" to "deferred uk trigger" (which they are) in preparation for other deferrred triggers
modified:
storage/ndb/include/kernel/signaldata/FireTrigOrd.hpp
storage/ndb/include/kernel/signaldata/LqhKey.hpp
storage/ndb/include/kernel/trigger_definitions.h
storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
=== modified file 'storage/ndb/test/ndbapi/testIndex.cpp'
--- a/storage/ndb/test/ndbapi/testIndex.cpp 2011-06-30 15:59:25 +0000
+++ b/storage/ndb/test/ndbapi/testIndex.cpp 2012-03-16 08:40:34 +0000
@@ -61,6 +61,27 @@ public:
Vector<Attrib*> attriblist;
};
+/**
+ * TODO expose in ndbapi
+ */
+static
+bool
+isIndexable(const NdbDictionary::Column* col)
+{
+ if (col == 0)
+ return false;
+
+ switch(col->getType())
+ {
+ case NDB_TYPE_BIT:
+ case NDB_TYPE_BLOB:
+ case NDB_TYPE_TEXT:
+ return false;
+ default:
+ return true;
+ }
+}
+
void AttribList::buildAttribList(const NdbDictionary::Table* pTab){
attriblist.clear();
@@ -139,6 +160,29 @@ void AttribList::buildAttribList(const N
}
#endif
+ /**
+ * Trim away combinations that contain non indexable columns
+ */
+ Vector<Attrib*> tmp;
+ for (Uint32 ii = 0; ii < attriblist.size(); ii++)
+ {
+ Attrib* attr = attriblist[ii];
+ for (int j = 0; j < attr->numAttribs; j++)
+ {
+ if (!isIndexable(pTab->getColumn(attr->attribs[j])))
+ {
+ delete attr;
+ goto skip;
+ }
+ }
+
+ tmp.push_back(attr);
+skip:
+ (void)1;
+ }
+
+ attriblist.clear();
+ attriblist = tmp;
}
char idxName[255];
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4890 to 4891) | Jonas Oreland | 16 Mar |