diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2006-08-14 16:35:23 +0000 | 
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2006-08-14 16:35:23 +0000 | 
| commit | 5c01690d9b6b84ad576787f38805a85f75b3b82f (patch) | |
| tree | 701b795de27a18b9ee9e376eedd186a834cfa86a /ext/pdo_sqlite/sqlite/src/test2.c | |
| parent | 3717342c9f6c08005cf3c32c721c81611a21d268 (diff) | |
| download | php-git-5c01690d9b6b84ad576787f38805a85f75b3b82f.tar.gz | |
MFB: Upgraded libsqlite in pdo_sqlite to 3.3.7
Diffstat (limited to 'ext/pdo_sqlite/sqlite/src/test2.c')
| -rw-r--r-- | ext/pdo_sqlite/sqlite/src/test2.c | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/ext/pdo_sqlite/sqlite/src/test2.c b/ext/pdo_sqlite/sqlite/src/test2.c index d4c5544b63..80e57cd87e 100644 --- a/ext/pdo_sqlite/sqlite/src/test2.c +++ b/ext/pdo_sqlite/sqlite/src/test2.c @@ -524,7 +524,7 @@ static int fake_big_file(    int rc;    int n;    i64 offset; -  OsFile fd; +  OsFile *fd = 0;    int readOnly = 0;    if( argc!=3 ){      Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -532,7 +532,6 @@ static int fake_big_file(      return TCL_ERROR;    }    if( Tcl_GetInt(interp, argv[1], &n) ) return TCL_ERROR; -  memset(&fd, 0, sizeof(fd));    rc = sqlite3OsOpenReadWrite(argv[2], &fd, &readOnly);    if( rc ){      Tcl_AppendResult(interp, "open failed: ", errorName(rc), 0); @@ -540,12 +539,12 @@ static int fake_big_file(    }    offset = n;    offset *= 1024*1024; -  rc = sqlite3OsSeek(&fd, offset); +  rc = sqlite3OsSeek(fd, offset);    if( rc ){      Tcl_AppendResult(interp, "seek failed: ", errorName(rc), 0);      return TCL_ERROR;    } -  rc = sqlite3OsWrite(&fd, "Hello, World!", 14); +  rc = sqlite3OsWrite(fd, "Hello, World!", 14);    sqlite3OsClose(&fd);    if( rc ){      Tcl_AppendResult(interp, "write failed: ", errorName(rc), 0); @@ -560,6 +559,7 @@ static int fake_big_file(  */  int Sqlitetest2_Init(Tcl_Interp *interp){    extern int sqlite3_io_error_pending; +  extern int sqlite3_io_error_hit;    extern int sqlite3_diskfull_pending;    extern int sqlite3_diskfull;    static struct { @@ -592,6 +592,8 @@ int Sqlitetest2_Init(Tcl_Interp *interp){    }    Tcl_LinkVar(interp, "sqlite_io_error_pending",       (char*)&sqlite3_io_error_pending, TCL_LINK_INT); +  Tcl_LinkVar(interp, "sqlite_io_error_hit", +     (char*)&sqlite3_io_error_hit, TCL_LINK_INT);    Tcl_LinkVar(interp, "sqlite_diskfull_pending",       (char*)&sqlite3_diskfull_pending, TCL_LINK_INT);    Tcl_LinkVar(interp, "sqlite_diskfull", | 
