On Tue, Aug 4, 2015 at 12:34 PM, Jan Nijtmans <jan.nijtmans at gmail.com> wrote: > 2015-07-28 11:52 GMT-05:00 Richard Hipp <drh at sqlite.org>: >> On 7/28/15, Rafa? Ponikwia <rp at antsolutions.pl> wrote: >>> Hi, >>> I'm using sqlite3 TCL extension from Teapot (version 64-bit). When I try >>> to insert number bigger than signed 32-bit it inserts wrong number to >>> database. >>> % sqlite3 db C:/tmp/test.sqlite >>> % db eval { > CREATE TABLE test (num NUMERIC); > INSERT INTO test (num) VALUES ($l1), ($l2), ($l3); > SELECT * FROM test; > } >>> 2147483647 2147483649 -2147483647 >>> >> >> I get the correct answer (2147483647 2147483649 2147483649) when I try >> this on 64-bit Ubuntu. > > Tried this on both cygwin64 and mingw-w64 (64-bit), getting the same > correct answer in both environments. e.g.: > >tclsh86 > % set tcl_platform(pointerSize) > 8 > % package require sqlite3 > 3.8.11.1 > % info loaded > {C:/cygwin64/lib/sqlite3.8.11.1/sqlite38111.dll Sqlite3} > % set l1 [expr {2 ** 31 - 1}] > 2147483647 > % set l2 2147483649 > 2147483649 > % set l3 [expr {$l1 + 2}] > 2147483649 > % sqlite3 db test.sqlite > % db eval { > CREATE TABLE test (num NUMERIC); > INSERT INTO test (num) VALUES ($l1), ($l2), ($l3); > SELECT * FROM test; > } > 2147483647 2147483649 2147483649 > % > > @Andreas: could this be a compiler issue?
Maybe !? For the record, we (AS) are using the MS Platform SDK cl.exe for the 64bit build of ActiveTcl, sqlite, etc. > > Regards, > Jan Nijtmans -- % Tcl'2015 Oct 19-23 = http://www.tcl.tk/community/tcl2015/cfp.html % EuroTcl'15 June 20-21 = http://www.eurotcl.tcl3d.org/ Andreas Kupries Senior Tcl Developer Code to Cloud: Smarter, Safer, Faster? F: 778.786.1133 andreask at activestate.com, http://www.activestate.com Learn about Stackato for Private PaaS: http://www.activestate.com/stackato