I'm using sqlite JDBC 0.56 and the table is created using fts3
MY table is created by
stat.executeUpdate("CREATE virtual TABLE doc using fts3 (doc_name , doc_path);");
seems the problem is caused by this virtual table.
I tried to insert a set of record into a database and return the generated key.
But I find that when the key is becoming 17, it will be missing and return 18 to me.
After that, all result is increased 1 but when I open the database, all the records are correctly stored.
Actually, it will increase 1 when 16 records are added. That means 34, 51,.. will be missing
pstmt.executeUpdate();
rs = pstmt.getGeneratedKeys();
if (rs.next()) {
result = rs.getInt(1);
if (rs.getInt(1) == 16)
System.out.println("id " + rs.getInt(1));
if (rs.getInt(1) == 17)
System.out.println("id " + rs.getInt(1));
if (rs.getInt(1) == 18)
System.out.println("id " + rs.getInt(1));
}
I had printed rs.getInt(1) to ensure that 17 is really missing. result: id 16 id 18
I want to know why rs.getInt(1) increased 1 in id 17 and how to solve this problem THX