Fossil SCM
Do not delete phantom artifacts from the unclustered table.
Commit
3fa7965c640d63c40f4adc2c0458f3dc1fe810fe
Parent
b6c9d35b1c1ec94…
1 file changed
+2
-1
+2
-1
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -700,11 +700,12 @@ | ||
| 700 | 700 | blob_appendf(&deleteWhere, ",%d", rid); |
| 701 | 701 | } |
| 702 | 702 | } |
| 703 | 703 | db_finalize(&q); |
| 704 | 704 | db_multi_exec( |
| 705 | - "DELETE FROM unclustered WHERE rid NOT IN (0 %s)", | |
| 705 | + "DELETE FROM unclustered WHERE rid NOT IN (0 %s)" | |
| 706 | + " AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=unclustered.rid)", | |
| 706 | 707 | blob_str(&deleteWhere) |
| 707 | 708 | ); |
| 708 | 709 | blob_reset(&deleteWhere); |
| 709 | 710 | if( nRow>0 ){ |
| 710 | 711 | md5sum_blob(&cluster, &cksum); |
| 711 | 712 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -700,11 +700,12 @@ | |
| 700 | blob_appendf(&deleteWhere, ",%d", rid); |
| 701 | } |
| 702 | } |
| 703 | db_finalize(&q); |
| 704 | db_multi_exec( |
| 705 | "DELETE FROM unclustered WHERE rid NOT IN (0 %s)", |
| 706 | blob_str(&deleteWhere) |
| 707 | ); |
| 708 | blob_reset(&deleteWhere); |
| 709 | if( nRow>0 ){ |
| 710 | md5sum_blob(&cluster, &cksum); |
| 711 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -700,11 +700,12 @@ | |
| 700 | blob_appendf(&deleteWhere, ",%d", rid); |
| 701 | } |
| 702 | } |
| 703 | db_finalize(&q); |
| 704 | db_multi_exec( |
| 705 | "DELETE FROM unclustered WHERE rid NOT IN (0 %s)" |
| 706 | " AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=unclustered.rid)", |
| 707 | blob_str(&deleteWhere) |
| 708 | ); |
| 709 | blob_reset(&deleteWhere); |
| 710 | if( nRow>0 ){ |
| 711 | md5sum_blob(&cluster, &cksum); |
| 712 |