I have a query that makes Ultralite crash, both on iPad and on Interactive SQL application. I will put here a similar query that allows anyone to reproduce the problem:
select case when T.id < 1000 then 'a' when T.id >= 1000 and T.id < 2000 then 'b' when T.id >= 2000 and T.id < 3000 then 'c' when T.id >= 3000 and T.id < 4000 then 'd' else 'e' end as result from (select cast(6371*acos(cos(radians(-23.596146))*cos(radians(id))*cos(radians(-46.686549)-radians(id))+sin(radians(-23.596146))*sin(radians(id))) as int) as id from testTable) as T(id)
So I have here a table named "testTable", with one int column named "id", and 1000 rows in it with random numbers. The query is used to calculate the distance in km between two coordinates, one of them coming from the table, the other one fixed in the query. I have used a subselect here because of constraints that oblige me to use it in the real application.
The crash doesn't occur if I:
Both being not-acceptable solutions.
asked 16 Aug '12, 15:53
Thank you André for reporting this bug.
This has been fixed as of 184.108.40.20681.
answered 21 Aug '12, 12:45