On Tue, Mar 29, 2011 at 4:48 AM, Max Vlasov <max.vla...@gmail.com> wrote:
> Hi, > > I sometimes use repeated digits as test data, for example 123456789 > repeated > multiply times and recently some of my complex queries where I occasionally > wrongly chose a field gave 'unknown error' in the middle of the process. > Tracking it led to sqlite3AtoF function that appears to be raising Floating > overflow exception (at least on windows) for some extremely large numbers > > The test showing the effect (tested with v3.7.5) > > CREATE TABLE [Temp] ([Value] TEXT) > INSERT INTO Temp (Value) VALUES ('1234567890...') //Totally 310 digits > SELECT Cast(Value As Float) FROM Temp > > the result of this query in my case is 'unknown error' and no data shown. > I cannot reproduce this problem. My script is this: CREATE TABLE t1(v TEXT); INSERT INTO t1 VALUES('1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890'); SELECT length(v) FROM t1; SELECT CAST(v AS float) FROM t1; I ran this on Linux, Mac, and Windows and in all cases I got as output: 310 Inf Which is pretty much what you would expect. No floating-point exceptions or other anomalies. > > Can it be considered a bug? The worst part of this error is that one needs > very deep investigation especially for long queries to understand what is > going on. > > Thanks, > > Max > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users