1. Create a database with 1.3 that uses columns of type DATETIME
2. Subsequently open it with 1.4
3. You'll get sporadic exceptions when executing SQL select statements. Here's a stack trace:
org.h2.jdbc.JdbcSQLException: General error: "java.lang.ArrayIndexOutOfBoundsException: 2048"
Caused by: java.lang.ArrayIndexOutOfBoundsException: 2048
at org.h2.store.Data.writeVarLong(Data.java:1259)
at org.h2.store.Data.writeValue(Data.java:526)
at org.h2.index.PageBtreeIndex.writeRow(PageBtreeIndex.java:394)
at org.h2.index.PageBtreeNode.writeData(PageBtreeNode.java:454)
at org.h2.index.PageBtreeNode.write(PageBtreeNode.java:427)
at org.h2.store.PageStore.writeBack(PageStore.java:1047)
at org.h2.util.CacheLRU.removeOld(CacheLRU.java:216)
at org.h2.util.CacheLRU.removeOldIfRequired(CacheLRU.java:142)
at org.h2.util.CacheLRU.put(CacheLRU.java:116)
at org.h2.store.PageStore.getPage(PageStore.java:858)
at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:234)
at org.h2.index.PageDataNode.getNextPage(PageDataNode.java:233)
at org.h2.index.PageDataLeaf.getNextPage(PageDataLeaf.java:400)
at org.h2.index.PageDataCursor.nextRow(PageDataCursor.java:95)
at org.h2.index.PageDataCursor.next(PageDataCursor.java:53)
at org.h2.index.IndexCursor.next(IndexCursor.java:278)
at org.h2.table.TableFilter.next(TableFilter.java:361)
at org.h2.command.dml.Select.queryFlat(Select.java:533)
at org.h2.command.dml.Select.queryWithoutCache(Select.java:646)
at org.h2.command.dml.Query.query(Query.java:323)
at org.h2.command.dml.Query.query(Query.java:291)
at org.h2.index.ViewIndex.find(ViewIndex.java:283)
at org.h2.index.ViewIndex.find(ViewIndex.java:179)
at org.h2.index.BaseIndex.find(BaseIndex.java:128)
at org.h2.index.IndexCursor.find(IndexCursor.java:160)
at org.h2.table.TableFilter.next(TableFilter.java:330)
at org.h2.command.dml.Select.queryGroup(Select.java:327)
at org.h2.command.dml.Select.queryWithoutCache(Select.java:641)
at org.h2.command.dml.Query.query(Query.java:323)
at org.h2.command.dml.Query.query(Query.java:291)
at org.h2.command.dml.Query.query(Query.java:37)
at org.h2.command.CommandContainer.query(CommandContainer.java:91)
at org.h2.command.Command.executeQuery(Command.java:197)
The same problem occurs if I override h2.storeLocalTime to be true on 1.3 and then open an existing database.
The problem is sporadic; I've been unable to create a short test case. But my findings are feasible, right?
I'd say this is a significant problem.