I think you should be able to change this:
#ifndef SQLITE_MAX_DEFAULT_PAGE_SIZE
# define SQLITE_MAX_DEFAULT_PAGE_SIZE 8192
#endif
#if SQLITE_MAX_DEFAULT_PAGE_SIZE>SQLITE_MAX_PAGE_SIZE
# undef SQLITE_MAX_DEFAULT_PAGE_SIZE
# define SQLITE_MAX_DEFAULT_PAGE_SIZE SQLITE_MAX_PAGE_SIZE
#endif
Add a debug statement to show the page sizes being used here so you know what
to set the default size to.
/* Catch the case where the destination is an in-memory database and the
** page sizes of the source and destination differ.
*/
if( nSrcPgsz!=nDestPgsz && sqlite3PagerIsMemdb(sqlite3BtreePager(p->pDest)) ){
fprintf(stderr,"nSrcPgsz=%d nDestPgSz=\n",nSrcPgsz,nDestPgSz);
rc = SQLITE_READONLY;
}
Michael D. Black
Senior Scientist
Northrop Grumman Mission Systems
________________________________
From: [email protected] on behalf of Alexey Pechnikov
Sent: Fri 4/30/2010 9:25 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] "restore" doesn't work
The problem is really produced by the different page_size. I did have
bugreport from my client and it's not easy to reproduce the problem by
this error message...
2010/4/30 Black, Michael (IS) <[email protected]>:
> Also..was your database created on the same machine you're restoring on?
> Page size difference will create this error too.
--
Best regards, Alexey Pechnikov.
http://pechnikov.tel/
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users