forked from pool/sqlite3
69 lines
2.2 KiB
Diff
69 lines
2.2 KiB
Diff
Index: sqlite/test/tclsqlite.test
|
|
RCS File: /sqlite/sqlite/test/tclsqlite.test,v
|
|
rcsdiff -q -kk '-r1.63' '-r1.64' -u '/sqlite/sqlite/test/tclsqlite.test,v' 2>/dev/null
|
|
--- test/tclsqlite.test 2007/10/23 08:17:48 1.63
|
|
+++ test/tclsqlite.test 2008/04/28 13:02:58 1.64
|
|
@@ -69,15 +69,15 @@
|
|
} msg]
|
|
lappend v $msg
|
|
} {0 {}}
|
|
+catch {expr x*} msg
|
|
do_test tcl-1.6 {
|
|
set v [catch {
|
|
db eval {SELECT * FROM t1} data {
|
|
expr x*
|
|
}
|
|
} msg]
|
|
- regsub {:.*$} $msg {} msg
|
|
lappend v $msg
|
|
-} {1 {syntax error in expression "x*"}}
|
|
+} [list 1 $msg]
|
|
do_test tcl-1.7 {
|
|
set v [catch {db} msg]
|
|
lappend v $msg
|
|
Index: sqlite/test/types3.test
|
|
RCS File: /sqlite/sqlite/test/types3.test,v
|
|
rcsdiff -q -kk '-r1.7' '-r1.8' -u '/sqlite/sqlite/test/types3.test,v' 2>/dev/null
|
|
--- test/types3.test 2007/06/26 22:42:56 1.7
|
|
+++ test/types3.test 2008/04/28 13:02:58 1.8
|
|
@@ -74,10 +74,11 @@
|
|
set V [db one {SELECT 123}]
|
|
tcl_variable_type V
|
|
} int
|
|
+set Vx [expr {1+wide(123456789123456)}]
|
|
do_test types3-2.3 {
|
|
set V [db one {SELECT 1234567890123456}]
|
|
tcl_variable_type V
|
|
-} wideInt
|
|
+} [tcl_variable_type Vx]
|
|
do_test types3-2.4.1 {
|
|
set V [db one {SELECT 1234567890123456.1}]
|
|
tcl_variable_type V
|
|
Index: sqlite/src/test1.c
|
|
RCS File: /sqlite/sqlite/src/test1.c,v
|
|
rcsdiff -q -kk '-r1.299' '-r1.300' -u '/sqlite/sqlite/src/test1.c,v' 2>/dev/null
|
|
--- src/test1.c 2008/04/16 12:58:54 1.299
|
|
+++ src/test1.c 2008/04/28 15:23:03 1.300
|
|
@@ -2621,8 +2621,20 @@
|
|
|
|
if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR;
|
|
if( Tcl_GetIntFromObj(interp, objv[2], &idx) ) return TCL_ERROR;
|
|
- if( Tcl_GetDoubleFromObj(interp, objv[3], &value) ) return TCL_ERROR;
|
|
|
|
+ /* Intercept the string "NaN" and generate a NaN value for it.
|
|
+ ** All other strings are passed through to Tcl_GetDoubleFromObj().
|
|
+ ** Tcl_GetDoubleFromObj() should understand "NaN" but some versions
|
|
+ ** contain a bug.
|
|
+ */
|
|
+ if( strcmp(Tcl_GetString(objv[3]), "NaN")==0 ){
|
|
+ sqlite3_int64 i;
|
|
+ i = 0xfff80000;
|
|
+ i <<= 32;
|
|
+ value = *(double*)(char*)&i;
|
|
+ }else if( Tcl_GetDoubleFromObj(interp, objv[3], &value) ){
|
|
+ return TCL_ERROR;
|
|
+ }
|
|
rc = sqlite3_bind_double(pStmt, idx, value);
|
|
if( sqlite3TestErrCode(interp, StmtToDb(pStmt), rc) ) return TCL_ERROR;
|
|
if( rc!=SQLITE_OK ){
|