diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2006-08-14 16:15:29 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2006-08-14 16:15:29 +0000 |
| commit | e8f30d450255baa92c1f2abe5d4a2696b6e4ebf0 (patch) | |
| tree | 1ededffa0df99ad1b61a3e476febad54b6a15991 /ext/pdo_sqlite/sqlite/src/test2.c | |
| parent | 0091c7e1b337de1252824ec33c87b4bed9ca2a5c (diff) | |
| download | php-git-e8f30d450255baa92c1f2abe5d4a2696b6e4ebf0.tar.gz | |
Upgraded bunbled SQLite lib 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", |
