Hi,

I see it has been fixed Nov 26, 2023  
https://github.com/h2database/h2database/commit/51427805f05782adda33f3c1ccc464544e0d2273
 

by throwing a MVStoreException in Chunk.readChunkHeader()


Still have this question: I was also wondering where the mv.txt dump file 
is used for. I only need the h2.sql dump to recover the database.

Does anyone has got know when a new release will be released, so we can use 
this patch? The last release is from Sept 2023?

Thanks for you reply in advance!

Olaf

Op maandag 13 mei 2024 om 11:51:07 UTC+2 schreef Olaf van der Meer:

> Hi, 
>
> I am trying to repair a corrupt database, but the recover runs in an error:
> Caused by: java.lang.NullPointerException
> org.h2.mvstore.DataUtils.parseMap(DataUtils.java:804)
> org.h2.mvstore.Chunk.<init>(Chunk.java:171)
> org.h2.mvstore.SFChunk.<init>(SFChunk.java:26)
> org.h2.mvstore.MVStoreTool.dump(MVStoreTool.java:151)
> org.h2.tools.Recover.process(Recover.java:242)
> org.h2.tools.Recover.execute(Recover.java:226)
>
> I noticed someone else has report this too 
> https://github.com/h2database/h2database/issues/4020 
>
> I have looked into the MvStoreTool.java and changed the try .. catch 
> arround the line 151 to catch all exceptions: 
>                 try {
>                   c = new SFChunk(Chunk.readChunkHeader(buffer));
>                 //} catch (MVStoreException e) {
>                 } catch (Exception e) {
>                     pos += blockSize;
>                     continue;
>                 }
>
> Now it can run further and the recover produces an h2.sql dump. 
> Is this a good fix for this issue?
>
> I was also wondering where wondering where the mv.txt dump file is used 
> for. 
> I only need the h2.sql dump to recover the database.
>
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/138933a2-bea4-4ff1-bad3-c554f97bbb28n%40googlegroups.com.

Reply via email to