diff options
author | Yorhel <git@yorhel.nl> | 2014-03-14 10:29:24 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2014-03-14 10:29:24 +0100 |
commit | b31b3e902fe7e056e5ab77a01c3d8ecf8be81121 (patch) | |
tree | f93460c5398cb47acb5c5a3f21d6e4ddfb5f8d37 | |
parent | 313e9d64cd626bc6b15691d2a0804807f6d79ac1 (diff) |
db.c: The temporary hashdata-cleanup index really shouldn't be UNIQUE
It's possible to have a file with the same TTH shared multiple times,
after all.
-rw-r--r-- | src/db.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -643,7 +643,7 @@ void db_fl_purgedata() { // longer on average, but it should guarantee that a /gc actually finishes // within a matter of minutes rather than hours. db_queue_lock(); - db_queue_push_unlocked(DBF_NEXT, "CREATE UNIQUE INDEX hashfiles_tth_gc ON hashfiles (tth)", DBQ_END); + db_queue_push_unlocked(DBF_NEXT, "CREATE INDEX hashfiles_tth_gc ON hashfiles (tth)", DBQ_END); db_queue_push_unlocked(DBF_NEXT, "DELETE FROM hashdata WHERE NOT EXISTS(SELECT 1 FROM hashfiles WHERE tth = root)", DBQ_END); db_queue_push_unlocked(0, "DROP INDEX hashfiles_tth_gc", DBQ_END); db_queue_unlock(); |