int count = indexList.count();
result = new String[count];
if (logger.isDetailEnabled()) logger.detail("Found " + count + " indexes for " + tableName);
ElementArray elementArray = indexList.elements();
for (int i = 0; i < count; ++i) {
Element element = elementArray.at(i);
handleError(element, ndbDictionary, String.valueOf(i));
String indexName = element.name();
result[i] = indexName;
}
} finally {
// free the list memory even if error
com.mysql.ndbjtie.ndbapi.NdbDictionary.DictionaryConst.List.delete(indexList);