Fossil SCM
Make sure new artifacts are entered into the unclustered table. Ticket [4b72e10dca].
Commit
1f8d2501b03cb07adcf7ef01f7ff156997769935
Parent
141c31792b66447…
1 file changed
+6
-1
+6
-1
| --- src/content.c | ||
| +++ src/content.c | ||
| @@ -490,11 +490,11 @@ | ||
| 490 | 490 | /* |
| 491 | 491 | ** Create a new phantom with the given UUID and return its artifact ID. |
| 492 | 492 | */ |
| 493 | 493 | int content_new(const char *zUuid){ |
| 494 | 494 | int rid; |
| 495 | - static Stmt s1, s2; | |
| 495 | + static Stmt s1, s2, s3; | |
| 496 | 496 | |
| 497 | 497 | assert( g.repositoryOpen ); |
| 498 | 498 | db_begin_transaction(); |
| 499 | 499 | if( uuid_is_shunned(zUuid) ){ |
| 500 | 500 | return 0; |
| @@ -509,10 +509,15 @@ | ||
| 509 | 509 | db_static_prepare(&s2, |
| 510 | 510 | "INSERT INTO phantom VALUES(:rid)" |
| 511 | 511 | ); |
| 512 | 512 | db_bind_int(&s2, ":rid", rid); |
| 513 | 513 | db_exec(&s2); |
| 514 | + db_static_prepare(&s3, | |
| 515 | + "INSERT INTO unclustered VALUES(:rid)" | |
| 516 | + ); | |
| 517 | + db_bind_int(&s3, ":rid", rid); | |
| 518 | + db_exec(&s3); | |
| 514 | 519 | bag_insert(&contentCache.missing, rid); |
| 515 | 520 | db_end_transaction(0); |
| 516 | 521 | return rid; |
| 517 | 522 | } |
| 518 | 523 | |
| 519 | 524 |
| --- src/content.c | |
| +++ src/content.c | |
| @@ -490,11 +490,11 @@ | |
| 490 | /* |
| 491 | ** Create a new phantom with the given UUID and return its artifact ID. |
| 492 | */ |
| 493 | int content_new(const char *zUuid){ |
| 494 | int rid; |
| 495 | static Stmt s1, s2; |
| 496 | |
| 497 | assert( g.repositoryOpen ); |
| 498 | db_begin_transaction(); |
| 499 | if( uuid_is_shunned(zUuid) ){ |
| 500 | return 0; |
| @@ -509,10 +509,15 @@ | |
| 509 | db_static_prepare(&s2, |
| 510 | "INSERT INTO phantom VALUES(:rid)" |
| 511 | ); |
| 512 | db_bind_int(&s2, ":rid", rid); |
| 513 | db_exec(&s2); |
| 514 | bag_insert(&contentCache.missing, rid); |
| 515 | db_end_transaction(0); |
| 516 | return rid; |
| 517 | } |
| 518 | |
| 519 |
| --- src/content.c | |
| +++ src/content.c | |
| @@ -490,11 +490,11 @@ | |
| 490 | /* |
| 491 | ** Create a new phantom with the given UUID and return its artifact ID. |
| 492 | */ |
| 493 | int content_new(const char *zUuid){ |
| 494 | int rid; |
| 495 | static Stmt s1, s2, s3; |
| 496 | |
| 497 | assert( g.repositoryOpen ); |
| 498 | db_begin_transaction(); |
| 499 | if( uuid_is_shunned(zUuid) ){ |
| 500 | return 0; |
| @@ -509,10 +509,15 @@ | |
| 509 | db_static_prepare(&s2, |
| 510 | "INSERT INTO phantom VALUES(:rid)" |
| 511 | ); |
| 512 | db_bind_int(&s2, ":rid", rid); |
| 513 | db_exec(&s2); |
| 514 | db_static_prepare(&s3, |
| 515 | "INSERT INTO unclustered VALUES(:rid)" |
| 516 | ); |
| 517 | db_bind_int(&s3, ":rid", rid); |
| 518 | db_exec(&s3); |
| 519 | bag_insert(&contentCache.missing, rid); |
| 520 | db_end_transaction(0); |
| 521 | return rid; |
| 522 | } |
| 523 | |
| 524 |