Hello

I have bug releated to SQLDiff and sqlite3changeset_apply:

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.

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

Reply via email to