2

When I did 'vacuum ;', just found message in below.

" database disk image is malformed."

So, I did like those.

C>sqlite [malformed.db] sqlite3>.mode insert sqlite3>.output a.sql sqlite3>.dump

and continues...

C>sqlite3 new.db sqlite3>.read a.sql

finally I found the new.db which file size is 0 byte.

any idea?

Inki Hong
  • 21
  • 1
  • 2

1 Answers1

0

For some reason, this very process that you described, when the database is malformed adds one last line to sql file, which says "rollback" (-- due to errors, it elaborates).

Reminds some anecodes with genies, doesn't it?

While it is intented to prevent disasters when importing data on existing bases, it is a disaster if all you are trying to do is reconstruct your database from scratch.

So, remove this line, replace it with "end transaction;", re-run and you are hopefully ok.

Mudragreas
  • 39
  • 4