fixes small bug introduced by CASSANDRA-4439

This commit is contained in:
Pavel Yaskevich 2012-07-19 01:49:46 +03:00
parent 202f3940dc
commit e220efa2a8
1 changed files with 3 additions and 0 deletions

View File

@ -877,6 +877,9 @@ public final class CFMetaData
String oldIndexName = cfm.column_metadata.get(entry.getKey()).getIndexName();
if (oldIndexName == null)
continue;
if (newDef.getIndexName() != null && !oldIndexName.equals(newDef.getIndexName()))
throw new ConfigurationException("Can't modify index name: was '" + oldIndexName + "' changed to '" + newDef.getIndexName() + "'.");