writeRow(tId, 2, 5000, "10.50");
writeRow(tId, 3, 47000, "9.99");
expectRowCount(tId, 3);
AkibanInformationSchema ais = createAISWithTable(tId);
Index index1 = addIndex(ais, tId, "otherId", true, "otherId");
Index index2 = addIndex(ais, tId, "price", false, "price");
ddl().createIndexes(session(), Arrays.asList(index1, index2));
AkibanInformationSchema aisCheck = ais();
Index indexCheck = aisCheck.getTable(tId).getIndex("otherId");
assertNotNull(indexCheck);
assertTrue(indexCheck.isUnique());
assertFalse(indexCheck.isPrimaryKey());
assertFalse(indexCheck.isConnectedToFK());
assertEquals("column name: otherId", "otherId", indexCheck.getKeyColumns().get(0).getColumn().getName());
assertEquals("Index count", 1, indexCheck.getKeyColumns().size());
Index indexCheck2 = aisCheck.getTable(tId).getIndex("price");
assertNotNull(indexCheck2);
assertFalse(indexCheck2.isUnique());
assertFalse(indexCheck2.isPrimaryKey());
assertFalse(indexCheck2.isConnectedToFK());
assertEquals("column name: price", "price", indexCheck2.getKeyColumns().get(0).getColumn().getName());
assertEquals("Index count", 1, indexCheck2.getKeyColumns().size());
List<Row> rows = scanAllIndex(getTable(tId).getIndex("otherId"));
assertEquals("rows from index scan", 3, rows.size());
rows = scanAllIndex(getTable(tId).getIndex("price"));