Hi

It seams to me that the bug, supposedly fixed in 1.4.189, is not completely 
fixed:

   - An ArrayIndexOutOfBoundsException was thrown in some cases when 
   opening an old version 1.3 database, or an 1.4 database with both 
   "mv_store=false" and the system property "h2.storeLocalTime" set to false. 
   It mainly showed up with an index on a time, date, or timestamp column. The 
   system property "h2.storeLocalTime" is no longer supported (MVStore 
   databases always store local time, and PageStore now databases never do).


I am using H2 1.4.190 and a database created with 1.3.174.

When I run agressive "power-fail" tests (the database is running on an 
embedded device) after about 95 cycles I get the following exception on 
this query:

2015-11-06 10:36:48,499 WARN  [Timer-1] Error executing update query: 
> prep245: DELETE FROM LOGGER_MANAGER.logging_event WHERE 
> logging_event.logger_name = ? AND logging_event.event_id NOT IN (SELECT 
> logging_event.event_id FROM LOGGER_MANAGER.logging_event WHERE 
> logging_event.logger_name = ? ORDER BY logging_event.timestmp DESC LIMIT ?) 
> {1: 'SYSTEM', 2: 'SYSTEM', 3: 3200} [CUDB.java:285]
> org.h2.jdbc.JdbcSQLException: General error: 
> "java.lang.ArrayIndexOutOfBoundsException: 0"; SQL statement:
> DELETE FROM LOGGER_MANAGER.logging_event WHERE logging_event.logger_name = 
> ? AND logging_event.event_id NOT IN (SELECT logging_event.event_id FROM 
> LOGGER_MANAGER.logging_event WHERE logging_event.logger_name = ? ORDER BY 
> logging_event.timestmp DESC LIMIT ?) [50000-190]
>         at 
> org.h2.message.DbException.getJdbcSQLException(DbException.java:345) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.message.DbException.get(DbException.java:168) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.message.DbException.convert(DbException.java:295) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.command.Command.executeUpdate(Command.java:261) 
> ~[h2-1.4.190.jar:1.4.190]
>         at 
> org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:157)
>  
> ~[h2-1.4.190.jar:1.4.190]
>         at 
> org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:143)
>  
> ~[h2-1.4.190.jar:1.4.190]
>         at ch.asdf.cu.infrastructure.db.CUDB.executeUpdate(CUDB.java:278) 
> ~[infrastructure-1.6.8.jar:na]
>         at 
> ch.asdf.cu.services.loggerManager.impl.db.LoggerManagerDB.cleanLogEntries(LoggerManagerDB.java:49)
>  
> [infrastructure-1.6.8.jar:na]
>         at 
> ch.asdf.cu.services.loggerManager.impl.CleanDbTask.run(CleanDbTask.java:34) 
> [infrastructure-1.6.8.jar:na]
>         at java.util.TimerThread.mainLoop(Timer.java:534) [na:1.6.0_0]
>         at java.util.TimerThread.run(Timer.java:484) [na:1.6.0_0]
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
>         at org.h2.index.PageDataLeaf.getRowAt(PageDataLeaf.java:332) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.index.PageDataLeaf.getRowWithKey(PageDataLeaf.java:455) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.index.PageDataNode.getRowWithKey(PageDataNode.java:280) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.index.PageDataNode.getRowWithKey(PageDataNode.java:280) 
> ~[h2-1.4.190.jar:1.4.190]
>         at 
> org.h2.index.PageDataIndex.getRowWithKey(PageDataIndex.java:426) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.index.PageDataIndex.getRow(PageDataIndex.java:415) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.table.RegularTable.getRow(RegularTable.java:106) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.index.PageBtreeIndex.getRow(PageBtreeIndex.java:301) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.index.PageBtreeCursor.get(PageBtreeCursor.java:45) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.index.MultiVersionCursor.get(MultiVersionCursor.java:82) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.index.IndexCursor.get(IndexCursor.java:260) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.table.TableFilter.getValue(TableFilter.java:897) 
> ~[h2-1.4.190.jar:1.4.190]
>         at 
> org.h2.expression.ExpressionColumn.getValue(ExpressionColumn.java:186) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.command.dml.Select.queryFlat(Select.java:538) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.command.dml.Select.queryWithoutCache(Select.java:643) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.command.dml.Query.query(Query.java:322) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.command.dml.Query.query(Query.java:290) 
> ~[h2-1.4.190.jar:1.4.190]
>         at 
> org.h2.expression.ConditionInSelect.getValue(ConditionInSelect.java:47) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.expression.ConditionNot.getValue(ConditionNot.java:32) 
> ~[h2-1.4.190.jar:1.4.190]
>         at 
> org.h2.expression.ConditionAndOr.getValue(ConditionAndOr.java:93) 
> ~[h2-1.4.190.jar:1.4.190]
>         at 
> org.h2.expression.Expression.getBooleanValue(Expression.java:178) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.command.dml.Delete.update(Delete.java:72) 
> ~[h2-1.4.190.jar:1.4.190]
>         at 
> org.h2.command.CommandContainer.update(CommandContainer.java:78) 
> ~[h2-1.4.190.jar:1.4.190]
>         at org.h2.command.Command.executeUpdate(Command.java:253) 
> ~[h2-1.4.190.jar:1.4.190]
>         ... 7 common frames omitted


Wenn running the query without 'ORDER BY logging_event.timestmp DESC' it 
works.

Export to SQL file fails.

Database URL is:
jdbc:h2:/var/lib/h2/cweb;AUTO_SERVER=TRUE;FILE_LOCK=SOCKET;MVCC=TRUE;AUTO_RECONNECT=TRUE;DB_CLOSE_DELAY=-1;TRACE_LEVEL_FILE=0;DB_CLOSE_ON_EXIT=FALSE;MV_STORE=FALSE"

Environment:

   - Debian 5.0.3
   - Linux cu 2.6.26 #20 SMP Fri Feb 25 13:26:15 CST 2011 i686 GNU/Linux
   - OpenJDK  Runtime Environment (build 1.6.0_0-b11)
   - Tomcat 6
   

Thanks and kind regards,
Alex

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to