Differences From:
File
src/rebuild.c
part of check-in
[e00384d26d]
- Moved the core logic of both "rebuild_database" and "create_repository_cmd" into their own functions, for sharing with "reconstruct_cmd".
by
aku on
2007-08-29 02:42:24.
[view]
To:
File
src/rebuild.c
part of check-in
[e1c1877c99]
- Sync using clusters appears to work. More testing is needed before we go
live.
by
drh on
2007-09-08 16:01:28.
Also file
src/rebuild.c
part of check-in
[bbcb6326c9]
- Pulled in the navbar and timeline changes.
by
aku on
2007-09-17 00:58:51.
[view]
@@ -53,8 +53,12 @@
free(zTable);
}
db_multi_exec(zRepositorySchema2);
+ db_multi_exec("INSERT INTO unclustered SELECT rid FROM blob");
+ db_multi_exec(
+ "DELETE FROM config WHERE name IN ('remote-code', 'remote-maxid')"
+ );
db_prepare(&s, "SELECT rid, size FROM blob");
while( db_step(&s)==SQLITE_ROW ){
int rid = db_column_int(&s, 0);
int size = db_column_int(&s, 1);
@@ -63,9 +67,9 @@
content_get(rid, &content);
manifest_crosslink(rid, &content);
blob_reset(&content);
}else{
- db_multi_exec("INSERT INTO phantom VALUES(%d)", rid);
+ db_multi_exec("INSERT OR IGNORE INTO phantom VALUES(%d)", rid);
}
}
return errCnt;
}