database.lockMeta(session);
}
Index index;
if (indexType.isHash() && cols.length <= 1) {
if (indexType.isUnique()) {
index = new HashIndex(this, indexId, indexName, cols, indexType);
} else {
index = new NonUniqueHashIndex(this, indexId, indexName, cols, indexType);
}
} else {
index = new TreeIndex(this, indexId, indexName, cols, indexType);