===== storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp 1.99 vs edited ===== --- 1.99/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp 2008-02-22 15:09:16 +01:00 +++ storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp 2008-02-22 14:34:58 +01:00 @@ -1767,8 +1767,13 @@ (col->m_cs->state & MY_CS_BINSORT)) ; else { + /** + * Dont disallow creating table, just don't run "fast" scan on it + */ +#if 0 m_error.code= 745; DBUG_RETURN(-1); +#endif } } // charset in upper half of precision ===== storage/ndb/src/ndbapi/NdbScanOperation.cpp 1.77 vs edited ===== --- 1.77/storage/ndb/src/ndbapi/NdbScanOperation.cpp 2008-02-22 15:09:16 +01:00 +++ storage/ndb/src/ndbapi/NdbScanOperation.cpp 2008-02-22 14:23:48 +01:00 @@ -1176,7 +1176,10 @@ * so it's safe to use [tIndexAttrId] * (instead of looping as is NdbOperation::equal_impl) */ - if(type == BoundEQ && tDistrKey) + if(type == BoundEQ && tDistrKey && + (tAttrInfo->m_cs == NULL || + (tAttrInfo->m_type == NdbDictionary::Column::Char && + (tAttrInfo->m_cs->state & MY_CS_BINSORT)))) { theNoOfTupKeyLeft--; return handle_distribution_key(valPtr, sizeInWords);