Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Cherrypick the recursion fix to test_vfs.c from [065e5a5ea4f82]. Also fix the nan.test module to handle upper/lower case changes in TCL. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | branch-3.7.2 |
Files: | files | file ages | folders |
SHA1: |
41b5f86971ed9d7ddca31bd9b43d0a41 |
User & Date: | drh 2011-08-26 17:17:50.794 |
Context
2011-10-25
| ||
20:36 | Cherrypick changes [53f5cfe115] and [1f7ef0af8d] in order to fix an issue with DISTINCT (check-in: 14bc58ca70 user: drh tags: branch-3.7.2) | |
2011-08-26
| ||
18:04 | Merge the branch-3.7.2 changes into the stat3-3.7.2 subbranch. Also fix some test script issues. (check-in: a42db19d52 user: drh tags: stat3-3.7.2) | |
17:17 | Cherrypick the recursion fix to test_vfs.c from [065e5a5ea4f82]. Also fix the nan.test module to handle upper/lower case changes in TCL. (check-in: 41b5f86971 user: drh tags: branch-3.7.2) | |
2011-07-13
| ||
18:53 | Cherrypicked from trunk: Do not try to use STAT2 for row estimates if the index is unique or nearly so. (check-in: d55b64ef7e user: drh tags: branch-3.7.2) | |
Changes
Changes to src/test_vfs.c.
︙ | ︙ | |||
77 78 79 80 81 82 83 | */ struct Testvfs { char *zName; /* Name of this VFS */ sqlite3_vfs *pParent; /* The VFS to use for file IO */ sqlite3_vfs *pVfs; /* The testvfs registered with SQLite */ Tcl_Interp *interp; /* Interpreter to run script in */ Tcl_Obj *pScript; /* Script to execute */ | < < | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | */ struct Testvfs { char *zName; /* Name of this VFS */ sqlite3_vfs *pParent; /* The VFS to use for file IO */ sqlite3_vfs *pVfs; /* The testvfs registered with SQLite */ Tcl_Interp *interp; /* Interpreter to run script in */ Tcl_Obj *pScript; /* Script to execute */ TestvfsBuffer *pBuffer; /* List of shared buffers */ int isNoshm; int mask; /* Mask controlling [script] and [ioerr] */ TestFaultInject ioerr_err; TestFaultInject full_err; |
︙ | ︙ | |||
264 265 266 267 268 269 270 | Testvfs *p, const char *zMethod, Tcl_Obj *arg1, Tcl_Obj *arg2, Tcl_Obj *arg3 ){ int rc; /* Return code from Tcl_EvalObj() */ | < < | < < < < < < < | < < < < < < < < < | < < | | | | > > > > | | < < < < < < | 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | Testvfs *p, const char *zMethod, Tcl_Obj *arg1, Tcl_Obj *arg2, Tcl_Obj *arg3 ){ int rc; /* Return code from Tcl_EvalObj() */ Tcl_Obj *pEval; assert( p->pScript ); assert( zMethod ); assert( p ); assert( arg2==0 || arg1!=0 ); assert( arg3==0 || arg2!=0 ); pEval = Tcl_DuplicateObj(p->pScript); Tcl_IncrRefCount(p->pScript); Tcl_ListObjAppendElement(p->interp, pEval, Tcl_NewStringObj(zMethod, -1)); if( arg1 ) Tcl_ListObjAppendElement(p->interp, pEval, arg1); if( arg2 ) Tcl_ListObjAppendElement(p->interp, pEval, arg2); if( arg3 ) Tcl_ListObjAppendElement(p->interp, pEval, arg3); rc = Tcl_EvalObjEx(p->interp, pEval, TCL_EVAL_GLOBAL); if( rc!=TCL_OK ){ Tcl_BackgroundError(p->interp); Tcl_ResetResult(p->interp); } } /* ** Close an tvfs-file. */ static int tvfsClose(sqlite3_file *pFile){ |
︙ | ︙ | |||
1070 1071 1072 1073 1074 1075 1076 | } case CMD_SCRIPT: { if( objc==3 ){ int nByte; if( p->pScript ){ Tcl_DecrRefCount(p->pScript); | < < < | 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 | } case CMD_SCRIPT: { if( objc==3 ){ int nByte; if( p->pScript ){ Tcl_DecrRefCount(p->pScript); p->pScript = 0; } Tcl_GetStringFromObj(objv[2], &nByte); if( nByte>0 ){ p->pScript = Tcl_DuplicateObj(objv[2]); Tcl_IncrRefCount(p->pScript); } |
︙ | ︙ | |||
1226 1227 1228 1229 1230 1231 1232 | return TCL_OK; } static void testvfs_obj_del(ClientData cd){ Testvfs *p = (Testvfs *)cd; if( p->pScript ) Tcl_DecrRefCount(p->pScript); sqlite3_vfs_unregister(p->pVfs); | < | 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 | return TCL_OK; } static void testvfs_obj_del(ClientData cd){ Testvfs *p = (Testvfs *)cd; if( p->pScript ) Tcl_DecrRefCount(p->pScript); sqlite3_vfs_unregister(p->pVfs); ckfree((char *)p->pVfs); ckfree((char *)p); } /* ** Usage: testvfs VFSNAME ?SWITCHES? ** |
︙ | ︙ |
Changes to test/nan.test.
︙ | ︙ | |||
42 43 44 45 46 47 48 | db eval {SELECT x, typeof(x) FROM t1} } {{} null} if {$tcl_platform(platform) != "symbian"} { do_test nan-1.1.2 { sqlite3_bind_double $::STMT 1 +Inf sqlite3_step $::STMT sqlite3_reset $::STMT | | | | | | | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | db eval {SELECT x, typeof(x) FROM t1} } {{} null} if {$tcl_platform(platform) != "symbian"} { do_test nan-1.1.2 { sqlite3_bind_double $::STMT 1 +Inf sqlite3_step $::STMT sqlite3_reset $::STMT string tolower [db eval {SELECT x, typeof(x) FROM t1}] } {{} null inf real} do_test nan-1.1.3 { sqlite3_bind_double $::STMT 1 -Inf sqlite3_step $::STMT sqlite3_reset $::STMT string tolower [db eval {SELECT x, typeof(x) FROM t1}] } {{} null inf real -inf real} do_test nan-1.1.4 { sqlite3_bind_double $::STMT 1 -NaN sqlite3_step $::STMT sqlite3_reset $::STMT string tolower [db eval {SELECT x, typeof(x) FROM t1}] } {{} null inf real -inf real {} null} do_test nan-1.1.5 { sqlite3_bind_double $::STMT 1 NaN0 sqlite3_step $::STMT sqlite3_reset $::STMT string tolower [db eval {SELECT x, typeof(x) FROM t1}] } {{} null inf real -inf real {} null {} null} do_test nan-1.1.6 { sqlite3_bind_double $::STMT 1 -NaN0 sqlite3_step $::STMT sqlite3_reset $::STMT string tolower [db eval {SELECT x, typeof(x) FROM t1}] } {{} null inf real -inf real {} null {} null {} null} do_test nan-1.1.7 { db eval { UPDATE t1 SET x=x-x; SELECT x, typeof(x) FROM t1; } } {{} null {} null {} null {} null {} null {} null} |
︙ | ︙ | |||
230 231 232 233 234 235 236 | if {$tcl_platform(platform) != "symbian"} { # Do not run these tests on Symbian, as the Tcl port doesn't like to # convert from floating point value "-inf" to a string. # do_test nan-4.7 { db eval {DELETE FROM t1} db eval "INSERT INTO t1 VALUES([string repeat 9 309].0)" | | | | 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | if {$tcl_platform(platform) != "symbian"} { # Do not run these tests on Symbian, as the Tcl port doesn't like to # convert from floating point value "-inf" to a string. # do_test nan-4.7 { db eval {DELETE FROM t1} db eval "INSERT INTO t1 VALUES([string repeat 9 309].0)" string tolower [db eval {SELECT x, typeof(x) FROM t1}] } {inf real} do_test nan-4.8 { db eval {DELETE FROM t1} db eval "INSERT INTO t1 VALUES(-[string repeat 9 309].0)" string tolower [db eval {SELECT x, typeof(x) FROM t1}] } {-inf real} } do_test nan-4.9 { db eval {DELETE FROM t1} db eval "INSERT INTO t1 VALUES([string repeat 9 309].0)" db eval {SELECT CAST(x AS text), typeof(x) FROM t1} } {Inf real} |
︙ | ︙ | |||
313 314 315 316 317 318 319 | db eval {SELECT CAST(x AS text), typeof(x) FROM t1} } {-9.88131291682493e-324 real} do_test nan-4.20 { db eval {DELETE FROM t1} set big [string repeat 9 10000].0e-9000 db eval "INSERT INTO t1 VALUES($big)" | | | 313 314 315 316 317 318 319 320 321 322 323 324 325 | db eval {SELECT CAST(x AS text), typeof(x) FROM t1} } {-9.88131291682493e-324 real} do_test nan-4.20 { db eval {DELETE FROM t1} set big [string repeat 9 10000].0e-9000 db eval "INSERT INTO t1 VALUES($big)" string tolower [db eval {SELECT x, typeof(x) FROM t1}] } {inf real} finish_test |