Since it seems that the mailing list swallowed my attached example code,
I've put it on Github as well:

https://gist.github.com/domob1812/7842edade949b5169edaf9de79f1b6d1

On 06.01.19 14:08, Daniel Kraft wrote:
> Hi!
> 
> It seems to me that the session extension is broken in a situation that
> involves a "WITHOUT ROWID" table and "INSERT OR REPLACE" statements (but
> not if only one of those is used).  Note that I'm using SQLite version
> 3.26.0 (> 3.17.0), so the session extension should work also for my
> WITHOUT ROWID table.
> 
> My test code is attached (it uses the Google logging library in addition
> to SQLite3 with session extension).  This code creates a WITHOUT ROWID
> table with an INTEGER PRIMARY KEY and puts in some initial data.  Then
> it uses an "INSERT OR REPLACE" statement to update the initial row and
> insert a new one, recording this change into a changeset.  Finally, it
> inverts and applies the changeset, so that we should get back to the
> initial data.
> 
> However, when I build and run the code as it is, then the table will be
> *empty* in the end (instead of containing the initial data pair (100,
> 1)).  It works as expected if I make one of the following two changes:
> 
> a) Commenting out the "WITHOUT ROWID" line, or
> b) using "UPDATE" and "INSERT" statements (as in the comment in the
> code) instead of one "INSERT OR REPLACE" statement.
> 
> Am I doing something wrong here, or is this a bug?  Is there something I
> can do to make this work as expected?
> 
> Thanks!  Yours,
> Daniel
> 
> 
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> 


-- 
https://www.domob.eu/
OpenPGP: 1142 850E 6DFF 65BA 63D6  88A8 B249 2AC4 A733 0737
Namecoin: id/domob -> https://nameid.org/?name=domob
--
3.6.0: Bar-Pri-Ran-Rog-Sam-Val-Wiz
To go: Arc-Cav-Hea-Kni-Mon-Tou

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to