What steps will reproduce the problem?
1. CREATE TABLE temp(degrees integer primary key)
2. tempTable.insert(-32);
What is the expected output?
I expect this to work out just fine, because the SQLite spec says:
"[...] all rows within SQLite tables have a 64-bit signed integer key"
Source: https://sqlite.org/lang_createtable.html#rowid
What is more, Android's SQLite implementation allows negative primary keys.
What do you see instead?
An exception is fired:
org.tmatesoft.sqljet.core.SqlJetException: INTEGER PRIMARY KEY column must be
more than zero: error code is MISUSE
What version of the product are you using?
sqljet-1.1.10.jar
Please provide any additional information below.
This check was introduced on purpose, see SqlJetBtreeDataTable.java:330:
if (rowId > 0) {
return rowId;
} else {
throw new SqlJetException(SqlJetErrorCode.MISUSE,
"INTEGER PRIMARY KEY column must be more than zero");
}
Original issue reported on code.google.com by NotDiffi...@googlemail.com on 27 Mar 2014 at 10:33
Original issue reported on code.google.com by
NotDiffi...@googlemail.com
on 27 Mar 2014 at 10:33