Hello,
when we upgrade version of H2 we sometimes(sometimes not) got this
exception:
IllegalArgumentException: timeNanos out of range 86400300000000
at org.h2.value.ValueTimestamp.<init>(ValueTimestamp.java:54)
at org.h2.value.ValueTimestamp.fromDateValueAndNanos(ValueTimestamp.java:68)
at org.h2.value.ValueTimestamp.fromMillisNanos(ValueTimestamp.java:95)
at org.h2.store.Data.readValue(Data.java:786)
at org.h2.index.PageDataLeaf.readRow(PageDataLeaf.java:624)
SQL statement:
ALTER TABLE BILL_ITEM ADD COLUMN LUCKY_HOUR BOOLEAN DEFAULT FALSE
I know that on pages there is a recommendation of: create a backup of the
database (in the form of a SQL script) but honestly who is reading manuals?
Why there is no check? I know that track incompatible differences in binary
format is some work. But it can only check that the version match in very
simple way as:
if ( getSingleInt(SELECT VALUE FROM INFORMATION_SCHEMA.SETTINGS WHERE NAME
= 'CREATE_BUILD') != getSingleInt(SELECT VALUE FROM
INFORMATION_SCHEMA.SETTINGS WHERE NAME = 'info.BUILD_ID') ) throw new
IllegalStateException("Reimport database");
Sorry for being rude, but database which silently corrupts your data when
you upgrade is not production ready.
Sincerely Petr Holik
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.