On 05/22/2017 09:49 PM, Green wrote:
Hello

I have bug releated to SQLDiff and sqlite3changeset_apply:

Thanks for reporting this. Now fixed here:

  http://www.sqlite.org/src/info/0bb23c48064cc641

Dan.






Here is situation:

- For testing I have simple database with two tables
- I'm running SQLDiff.exe with --changeset option
- Next I'm trying apply patch to database by sqlite3changeset_apply

If I have changes to booth tables sqlite3changeset_apply works ok.
But in situation when I have changes only in one table
sqlite3changeset_apply returns SQLITE_CORRUPT (11).

This is because SQLDiff.exe always puts information about all the tables in
the database even if there are no changes in the table.
In changeset file for this kind of table I have bytes: T,01,01,tablename,00
so function sessionChangesetNext returns SQLITE_CORRUPT in following line:

   if( p->op!=SQLITE_UPDATE && p->op!=SQLITE_DELETE && p->op!=SQLITE_INSERT
){
     return (p->rc = SQLITE_CORRUPT_BKPT);

There is no update command after table name in changeset because there is
nothing to update...
I have simple workaround in SQLDiff for this situation if you want.


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

Reply via email to