throw new SqlJetException(SqlJetErrorCode.ERROR, "Index \"" + indexName + "\" exists already");
}
checkNameConflict(SqlJetSchemaObjectType.INDEX, indexName);
final ISqlJetVirtualTableDef tableDef = getVirtualTable(virtualTableName);
if (null == tableDef)
throw new SqlJetException(SqlJetErrorCode.ERROR);
final ISqlJetBtreeSchemaTable schemaTable = openSchemaTable(true);
try {
schemaTable.lock();
try {
db.getOptions().changeSchemaVersion();
final ISqlJetIndexDef indexDef = createAutoIndex(schemaTable, tableDef.getTableName(), indexName);
indexDefs.put(indexName, indexDef);
return indexDef;