/ Check-in [45ae830d]
Login

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

Overview
Comment:Ensure that the test vfs in test_journal.c zeroes sqlite3_file.pMethods if an xOpen() call fails. Similar problem to that fixed by #6384. This was a problem with test code, not SQLite itself. (CVS 6387)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 45ae830d5631afa5d994361f5122c2f0b6fbab4c
User & Date: danielk1977 2009-03-26 11:49:11
Context
2009-03-26
12:20
Added new tests of the scratch memory allocator for increased test coverage. (CVS 6388) check-in: e99e28ef user: drh tags: trunk
11:49
Ensure that the test vfs in test_journal.c zeroes sqlite3_file.pMethods if an xOpen() call fails. Similar problem to that fixed by #6384. This was a problem with test code, not SQLite itself. (CVS 6387) check-in: 45ae830d user: danielk1977 tags: trunk
2009-03-25
16:51
Remove an unused parameter from sqlite3DequoteExpr. Fix another unrelated and harmless compiler warning. (CVS 6386) check-in: 8589b0fc user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/test_journal.c.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
...
652
653
654
655
656
657
658

659
660
661
662
663
664
665
******************************************************************************
**
** This file contains code for a VFS layer that acts as a wrapper around
** an existing VFS. The code in this file attempts to verify that SQLite
** correctly populates and syncs a journal file before writing to a
** corresponding database file.
**
** $Id: test_journal.c,v 1.12 2009/03/05 04:20:32 shane Exp $
*/
#if SQLITE_TEST          /* This file is used for testing only */

#include "sqlite3.h"
#include "sqliteInt.h"

/*
................................................................................
  const char *zName,
  sqlite3_file *pFile,
  int flags,
  int *pOutFlags
){
  int rc;
  jt_file *p = (jt_file *)pFile;

  p->pReal = (sqlite3_file *)&p[1];
  p->pReal->pMethods = 0;
  rc = sqlite3OsOpen(g.pVfs, zName, p->pReal, flags, pOutFlags);
  assert( rc==SQLITE_OK || p->pReal->pMethods==0 );
  if( rc==SQLITE_OK ){
    pFile->pMethods = &jt_io_methods;
    p->eLock = 0;







|







 







>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
...
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
******************************************************************************
**
** This file contains code for a VFS layer that acts as a wrapper around
** an existing VFS. The code in this file attempts to verify that SQLite
** correctly populates and syncs a journal file before writing to a
** corresponding database file.
**
** $Id: test_journal.c,v 1.13 2009/03/26 11:49:11 danielk1977 Exp $
*/
#if SQLITE_TEST          /* This file is used for testing only */

#include "sqlite3.h"
#include "sqliteInt.h"

/*
................................................................................
  const char *zName,
  sqlite3_file *pFile,
  int flags,
  int *pOutFlags
){
  int rc;
  jt_file *p = (jt_file *)pFile;
  pFile->pMethods = 0;
  p->pReal = (sqlite3_file *)&p[1];
  p->pReal->pMethods = 0;
  rc = sqlite3OsOpen(g.pVfs, zName, p->pReal, flags, pOutFlags);
  assert( rc==SQLITE_OK || p->pReal->pMethods==0 );
  if( rc==SQLITE_OK ){
    pFile->pMethods = &jt_io_methods;
    p->eLock = 0;