aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/memdb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/memdb.c b/src/memdb.c
index 1cc9fc2e6..31b2324b9 100644
--- a/src/memdb.c
+++ b/src/memdb.c
@@ -331,8 +331,9 @@ static int memdbTruncate(sqlite3_file *pFile, sqlite_int64 size){
MemStore *p = ((MemFile*)pFile)->pStore;
int rc = SQLITE_OK;
memdbEnter(p);
- if( NEVER(size>p->sz) ){
- rc = SQLITE_FULL;
+ if( size>p->sz ){
+ /* This can only happen with a corrupt wal mode db */
+ rc = SQLITE_CORRUPT;
}else{
p->sz = size;
}