Hi, Using H2 Version 1.3.175 (2014-01-18) with options ;MV_STORE=TRUE;MVCC=TRUE. There is a problem with spatial index when I is used in combination with mvstore. To following sql requests lead to an exception:
create table coords as select (RAND() * 50 ) X, (RAND() * 50 ) Y from system_range(1, 20000); create table geoms (id integer primary key auto_increment, the_geom geometry); create spatial index on geoms(the_geom); insert into GEOMS(the_geom) select ('POLYGON((' || (1 + X)::varchar || ' ' || (1 + Y )::varchar || ', ' || (2 + X )::varchar || ' ' || (2 + Y )::varchar || ', ' || (3 + X )::varchar || ' ' || (1 + Y )::varchar || ', ' || (1 + X)::varchar || ' ' || (1 + Y )::varchar || '))')::geometry the_geom from COORDS; insert into GEOMS(the_geom) select ('POLYGON((' || (1 + X)::varchar || ' ' || (1 + Y )::varchar || ', ' || (2 + X )::varchar || ' ' || (2 + Y )::varchar || ', ' || (3 + X )::varchar || ' ' || (1 + Y )::varchar || ', ' || (1 + X)::varchar || ' ' || (1 + Y )::varchar || '))')::geometry the_geom from COORDS; The exception: > > > insert into GEOMS(the_geom) select ('POLYGON((' || (1 + X)::varchar || ' ' > || (1 + Y )::varchar || ', ' || (2 + X )::varchar || ' ' || (2 + Y > )::varchar || ', ' || (3 + X )::varchar || ' ' || (1 + Y )::varchar || ', > ' || (1 + X)::varchar || ' ' || (1 + Y )::varchar || '))')::geometry > the_geom from COORDS; > General error: "java.lang.IllegalStateException: Corrupt page count -635 > [1.3.175/3]" > [50000-175]<https://localhost:8082/query.do?jsessionid=2084f6859c202b6be4b35e8d86f708da#>HY000/50000 > > (Aide)<http://h2database.com/javadoc/org/h2/constant/ErrorCode.html#c50000> > org.h2.jdbc.JdbcSQLException: General error: > "java.lang.IllegalStateException: Corrupt page count -635 [1.3.175/3]" > [50000-175] > at > org.h2.message.DbException.getJdbcSQLException(DbException.java:332<http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=332&build=175> > ) > at > org.h2.message.DbException.get(DbException.java:161<http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=161&build=175> > ) > at > org.h2.message.DbException.convert(DbException.java:284<http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=284&build=175> > ) > at > org.h2.message.DbException.toSQLException(DbException.java:257<http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=257&build=175> > ) > at > org.h2.message.TraceObject.logAndConvert(TraceObject.java:368<http://h2database.com/html/source.html?file=org/h2/message/TraceObject.java&line=368&build=175> > ) > at > org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:158<http://h2database.com/html/source.html?file=org/h2/jdbc/JdbcStatement.java&line=158&build=175> > ) > at > org.h2.server.web.WebApp.getResult(WebApp.java:1321<http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=1321&build=175> > ) > at > org.h2.server.web.WebApp.query(WebApp.java:1010<http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=1010&build=175> > ) > at > org.h2.server.web.WebApp$1.next(WebApp.java:972<http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=972&build=175> > ) > at > org.h2.server.web.WebApp$1.next(WebApp.java:959<http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=959&build=175> > ) > at > org.h2.server.web.WebThread.process(WebThread.java:167<http://h2database.com/html/source.html?file=org/h2/server/web/WebThread.java&line=167&build=175> > ) > at > org.h2.server.web.WebThread.run(WebThread.java:94<http://h2database.com/html/source.html?file=org/h2/server/web/WebThread.java&line=94&build=175> > ) > at java.lang.Thread.run(Thread.java:744) > Caused by: java.lang.IllegalStateException: Corrupt page count -635 > [1.3.175/3] > at > org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:716<http://h2database.com/html/source.html?file=org/h2/mvstore/DataUtils.java&line=716&build=175> > ) > at > org.h2.mvstore.MVStore.applyFreedSpace(MVStore.java:1060<http://h2database.com/html/source.html?file=org/h2/mvstore/MVStore.java&line=1060&build=175> > ) > at > org.h2.mvstore.MVStore.storeNow(MVStore.java:893<http://h2database.com/html/source.html?file=org/h2/mvstore/MVStore.java&line=893&build=175> > ) > at > org.h2.mvstore.MVStore.commitAndSave(MVStore.java:831<http://h2database.com/html/source.html?file=org/h2/mvstore/MVStore.java&line=831&build=175> > ) > at > org.h2.mvstore.MVStore.beforeWrite(MVStore.java:1669<http://h2database.com/html/source.html?file=org/h2/mvstore/MVStore.java&line=1669&build=175> > ) > at > org.h2.mvstore.MVMap.beforeWrite(MVMap.java:902<http://h2database.com/html/source.html?file=org/h2/mvstore/MVMap.java&line=902&build=175> > ) > at > org.h2.mvstore.MVMap.put(MVMap.java:107<http://h2database.com/html/source.html?file=org/h2/mvstore/MVMap.java&line=107&build=175> > ) > at > org.h2.mvstore.db.TransactionStore.commit(TransactionStore.java:327<http://h2database.com/html/source.html?file=org/h2/mvstore/db/TransactionStore.java&line=327&build=175> > ) > at > org.h2.mvstore.db.TransactionStore$Transaction.commit(TransactionStore.java:746<http://h2database.com/html/source.html?file=org/h2/mvstore/db/TransactionStore.java&line=746&build=175> > ) > at > org.h2.engine.Session.commit(Session.java:482<http://h2database.com/html/source.html?file=org/h2/engine/Session.java&line=482&build=175> > ) > at > org.h2.command.Command.stop(Command.java:151<http://h2database.com/html/source.html?file=org/h2/command/Command.java&line=151&build=175> > ) > at > org.h2.command.Command.executeUpdate(Command.java:283<http://h2database.com/html/source.html?file=org/h2/command/Command.java&line=283&build=175> > ) > at > org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:181<http://h2database.com/html/source.html?file=org/h2/jdbc/JdbcStatement.java&line=181&build=175> > ) > at > org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:156<http://h2database.com/html/source.html?file=org/h2/jdbc/JdbcStatement.java&line=156&build=175> > ) > ... 7 more Thanks for support Nicolas Fortin -Atelier SIG, FR CNRS 2488 -- 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/groups/opt_out.