I now have a database that has the "order by" no rows problem. I don't think that conditions that are outlined in the fix (Queries that are ordered by an indexed column returned no rows in certain cases (if all rows were deleted from the table previously, and there is a low number of rows in the table, and when not using other conditions, and when using the default b tree index).) are true for this database.
Could it be that the same issue can be caused in another scenario. The database I have shows the problem when opened with H2 1.1.108. The same database no longer shows the problem when opened with H2 1.1.111. I can send the database and the query that fails with 1.1.108 if necessary. Alex On Apr 7, 2:06 pm, Thomas Mueller <[email protected]> wrote: > Hi, > > The workaround is to sort twice on the same row. My test case is: > > create table test(id int primary key) as select x from system_range(1, 200); > delete from test; > insert into test(id) values(1); > select * from test order by id; -- fails > select * from test order by id, id; -- works > drop table test; > > Regards, > Thomas > > On Tue, Apr 7, 2009 at 6:27 PM, Mike Goodwin <[email protected]> wrote: > > Actually I have a question. Is there a workaround? For example, would using > > 'where true' as a condition prevent the problem from occurring? > > > thanks, > > > mike --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/h2-database?hl=en -~----------~----~----~----~------~----~------~--~---
