/ Check-in [ca4ddfef]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix minor problems in the test code in test_demovfs.c.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ca4ddfefc1be1afbf366d87c47f0dd1122350d7ab34ba60020c5babb64a654a4
User & Date: dan 2019-06-15 15:32:37
Context
2019-06-16
14:56
Avoid transforming TK_COLLATE or TK_UNLIKELY Expr nodes to TK_REFERENCE. Instead, transform the uppermost Expr node in the expression tree that is not of this type. Fix for [e1e07ef2]. check-in: 54110870 user: drh tags: trunk
08:58
Avoid transforming TK_COLLATE or TK_UNLIKELY Expr nodes to TK_REFERENCE. Instead, transform the uppermost Expr node in the expression tree that is not of this type. Fix for [e1e07ef2]. Closed-Leaf check-in: ba7870e2 user: dan tags: tkt-e1e07ef2
2019-06-15
15:32
Fix minor problems in the test code in test_demovfs.c. check-in: ca4ddfef user: dan tags: trunk
15:27
Add extra test case for one of the problems fixed by the previous commit. check-in: 0bbceebb user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to src/test_demovfs.c.

236
237
238
239
240
241
242



243
244
245
246
247
248
249
...
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
    return SQLITE_IOERR_READ;
  }
  nRead = read(p->fd, zBuf, iAmt);

  if( nRead==iAmt ){
    return SQLITE_OK;
  }else if( nRead>=0 ){



    return SQLITE_IOERR_SHORT_READ;
  }

  return SQLITE_IOERR_READ;
}

/*
................................................................................
  return SQLITE_OK;
}

/*
** No xFileControl() verbs are implemented by this VFS.
*/
static int demoFileControl(sqlite3_file *pFile, int op, void *pArg){
  return SQLITE_OK;
}

/*
** The xSectorSize() and xDeviceCharacteristics() methods. These two
** may return special values allowing SQLite to optimize file-system 
** access to some extent. But it is also safe to simply return 0.
*/







>
>
>







 







|







236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
...
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
    return SQLITE_IOERR_READ;
  }
  nRead = read(p->fd, zBuf, iAmt);

  if( nRead==iAmt ){
    return SQLITE_OK;
  }else if( nRead>=0 ){
    if( nRead<iAmt ){
      memset(&((char*)zBuf)[nRead], 0, iAmt-nRead);
    }
    return SQLITE_IOERR_SHORT_READ;
  }

  return SQLITE_IOERR_READ;
}

/*
................................................................................
  return SQLITE_OK;
}

/*
** No xFileControl() verbs are implemented by this VFS.
*/
static int demoFileControl(sqlite3_file *pFile, int op, void *pArg){
  return SQLITE_NOTFOUND;
}

/*
** The xSectorSize() and xDeviceCharacteristics() methods. These two
** may return special values allowing SQLite to optimize file-system 
** access to some extent. But it is also safe to simply return 0.
*/