/ Check-in [fa1b5e21]
Login

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

Overview
Comment:If the "fake_big_file" command fails, be sure to close the file before returning. (CVS 801)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:fa1b5e2119617b111c6b463bbf641ddcb9972cae
User & Date: drh 2002-12-17 14:19:49
Context
2002-12-17
14:30
Preparing for the 2.7.4 release. (CVS 802) check-in: f685ae15 user: drh tags: trunk
14:19
If the "fake_big_file" command fails, be sure to close the file before returning. (CVS 801) check-in: fa1b5e21 user: drh tags: trunk
14:13
Make sure the host machine has enough disk space before running the large file tests. (CVS 800) check-in: b1ec5478 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/test2.c.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
508
509
510
511
512
513
514

515
516
517
518
519
520
521
522
523
524
525
526
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Code for testing the pager.c module in SQLite.  This code
** is not included in the SQLite library.  It is used for automated
** testing of the SQLite library.
**
** $Id: test2.c,v 1.13 2002/12/02 04:25:21 drh Exp $
*/
#include "os.h"
#include "sqliteInt.h"
#include "pager.h"
#include "tcl.h"
#include <stdlib.h>
#include <string.h>
................................................................................
  offset *= 1024*1024;
  rc = sqliteOsSeek(&fd, offset);
  if( rc ){
    Tcl_AppendResult(interp, "seek failed: ", errorName(rc), 0);
    return TCL_ERROR;
  }
  rc = sqliteOsWrite(&fd, "Hello, World!", 14);

  if( rc ){
    Tcl_AppendResult(interp, "write failed: ", errorName(rc), 0);
    return TCL_ERROR;
  }
  sqliteOsClose(&fd);
  return TCL_OK;
}

/*
** Register commands with the TCL interpreter.
*/
int Sqlitetest2_Init(Tcl_Interp *interp){







|







 







>




<







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
508
509
510
511
512
513
514
515
516
517
518
519

520
521
522
523
524
525
526
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Code for testing the pager.c module in SQLite.  This code
** is not included in the SQLite library.  It is used for automated
** testing of the SQLite library.
**
** $Id: test2.c,v 1.14 2002/12/17 14:19:49 drh Exp $
*/
#include "os.h"
#include "sqliteInt.h"
#include "pager.h"
#include "tcl.h"
#include <stdlib.h>
#include <string.h>
................................................................................
  offset *= 1024*1024;
  rc = sqliteOsSeek(&fd, offset);
  if( rc ){
    Tcl_AppendResult(interp, "seek failed: ", errorName(rc), 0);
    return TCL_ERROR;
  }
  rc = sqliteOsWrite(&fd, "Hello, World!", 14);
  sqliteOsClose(&fd);
  if( rc ){
    Tcl_AppendResult(interp, "write failed: ", errorName(rc), 0);
    return TCL_ERROR;
  }

  return TCL_OK;
}

/*
** Register commands with the TCL interpreter.
*/
int Sqlitetest2_Init(Tcl_Interp *interp){