@Test
public void testRowCountIsStatelessWhenIndexIsNotUnique() throws SqlJetException {
db.runReadTransaction(new ISqlJetTransaction() {
public Object run(SqlJetDb db) throws SqlJetException {
SqlJetScope scope = new SqlJetScope(new Object[] {1, 2}, true, new Object[] {1, 2}, true);
ISqlJetCursor cursor = db.getTable("pairs").scope("pairs_idx", scope);
Assert.assertTrue(!cursor.eof());
Assert.assertTrue(cursor.next());
Assert.assertTrue(cursor.next());
Assert.assertEquals(cursor.getRowCount(), 4);
Assert.assertTrue(cursor.next());
Assert.assertFalse(cursor.eof());
Assert.assertFalse(cursor.next());
Assert.assertTrue(cursor.eof());
return null;
}
});