mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-12-23 08:21:09 +00:00
automatically convert Legacy sqlite db to WAL mode
This commit is contained in:
parent
3e71bc9b10
commit
c907a6d57f
1 changed files with 3 additions and 1 deletions
|
|
@ -631,7 +631,9 @@ impl Database {
|
|||
// Now check the Header Version to see which mode the DB file really is on
|
||||
match read_version {
|
||||
Version::Legacy => {
|
||||
return Err(LimboError::InvalidArgument(format!("Database is in Legacy mode. Use `pragma journal_mode = 'wal'` in sqlite to enable wal mode")));
|
||||
// just treat it as WAL mode
|
||||
header_mut.read_version = RawVersion::from(Version::Wal);
|
||||
header_mut.write_version = RawVersion::from(Version::Wal);
|
||||
}
|
||||
Version::Wal => {
|
||||
if self.mvcc_enabled() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue