Hi,

While working on the Perl DBD:SQLite driver, I found the following bug in sqlite : the last_insert_rowid() method (or SQL function) returns the constant value 10 after any insert into a fts5 virtual table. This bug is new in fts5 : previous versions fts4 and fts3 returned the correct rowid value.

Below is a transcript from the sqlite3 shell that illustrates the problem (but the same bug also happens when using the API).

$ ./sqlite3
SQLite version 3.17.0 2017-02-13 16:02:40
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> create virtual table f5 using fts5(c);
sqlite> insert into f5(c) values('foobar');
sqlite> select last_insert_rowid();
10
sqlite> select rowid, c from f5;
1|foobar

[run on a Windows7 machine]

Best regards, Laurent Dami


_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to