On Tue, Mar 29, 2011 at 4:05 AM, Cory Nelson <phro...@gmail.com> wrote: > On Tue, Mar 29, 2011 at 1: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. >> >> 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. > > Not a bug. The REAL datatype (which FLOAT maps to) is an 8-byte IEEE > "double". It supports a maximum of about 16 digits -- nowhere near > your 310.
I'm sorry, I just noticed I misread your question. It would indeed be nice to get something other than "unknown error" for these overflows. -- Cory Nelson http://int64.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users