/ 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 Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/test_demovfs.c.

   236    236       return SQLITE_IOERR_READ;
   237    237     }
   238    238     nRead = read(p->fd, zBuf, iAmt);
   239    239   
   240    240     if( nRead==iAmt ){
   241    241       return SQLITE_OK;
   242    242     }else if( nRead>=0 ){
          243  +    if( nRead<iAmt ){
          244  +      memset(&((char*)zBuf)[nRead], 0, iAmt-nRead);
          245  +    }
   243    246       return SQLITE_IOERR_SHORT_READ;
   244    247     }
   245    248   
   246    249     return SQLITE_IOERR_READ;
   247    250   }
   248    251   
   249    252   /*
................................................................................
   365    368     return SQLITE_OK;
   366    369   }
   367    370   
   368    371   /*
   369    372   ** No xFileControl() verbs are implemented by this VFS.
   370    373   */
   371    374   static int demoFileControl(sqlite3_file *pFile, int op, void *pArg){
   372         -  return SQLITE_OK;
          375  +  return SQLITE_NOTFOUND;
   373    376   }
   374    377   
   375    378   /*
   376    379   ** The xSectorSize() and xDeviceCharacteristics() methods. These two
   377    380   ** may return special values allowing SQLite to optimize file-system 
   378    381   ** access to some extent. But it is also safe to simply return 0.
   379    382   */