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? Regards, Jan Nijtmans