1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Avoid calling sqlite3OsFetch() on a file-handle for which the xFetch method is NULL.

FossilOrigin-Name: 071f7f2decd2f786c0201a4219e9c2cc9d227085
This commit is contained in:
dan
2014-09-04 11:03:35 +00:00
parent 19b465a0ae
commit 8fa7f590cc
4 changed files with 19 additions and 10 deletions

View File

@ -42,6 +42,11 @@ void usage(const char *zArgv0){
exit(1);
}
void report_default_vfs(){
sqlite3_vfs *pVfs = sqlite3_vfs_find(0);
fprintf(stdout, "using vfs \"%s\"\n", pVfs->zName);
}
int main(int argc, char **argv){
int i;
const char *zTarget; /* Target database to apply OTA to */
@ -63,6 +68,8 @@ int main(int argc, char **argv){
zTarget = argv[argc-2];
zOta = argv[argc-1];
report_default_vfs();
/* Open an OTA handle. If nStep is less than or equal to zero, call
** sqlite3ota_step() until either the OTA has been completely applied
** or an error occurs. Or, if nStep is greater than zero, call