Fossil SCM
Fix a problem in the git-export database schema upgrade logic.
Commit
84949f51c801a3cdc6cabcd8dac95c9435b26ab66edd9d8ba08b7ce020231f9f
Parent
fdde65e7f1497f6…
1 file changed
+3
-3
+3
-3
| --- src/export.c | ||
| +++ src/export.c | ||
| @@ -1326,14 +1326,14 @@ | ||
| 1326 | 1326 | " uuid TEXT,\n" |
| 1327 | 1327 | " isfile BOOLEAN,\n" |
| 1328 | 1328 | " githash TEXT,\n" |
| 1329 | 1329 | " UNIQUE(uuid,isfile)\n" |
| 1330 | 1330 | ");" |
| 1331 | - "INSERT INTO mirror.mmark(id,uuid,githash,isfile)" | |
| 1331 | + "INSERT OR IGNORE INTO mirror.mmark(id,uuid,githash,isfile)" | |
| 1332 | 1332 | " SELECT id,uuid,githash," |
| 1333 | - " EXISTS(SELECT 1 FROM repository.event, repository.blob" | |
| 1334 | - " WHERE objid=blob.rid" | |
| 1333 | + " NOT EXISTS(SELECT 1 FROM repository.event, repository.blob" | |
| 1334 | + " WHERE event.objid=blob.rid" | |
| 1335 | 1335 | " AND blob.uuid=mmark_old.uuid)" |
| 1336 | 1336 | " FROM mirror.mmark_old;\n" |
| 1337 | 1337 | "DROP TABLE mirror.mmark_old;\n" |
| 1338 | 1338 | ); |
| 1339 | 1339 | } |
| 1340 | 1340 |
| --- src/export.c | |
| +++ src/export.c | |
| @@ -1326,14 +1326,14 @@ | |
| 1326 | " uuid TEXT,\n" |
| 1327 | " isfile BOOLEAN,\n" |
| 1328 | " githash TEXT,\n" |
| 1329 | " UNIQUE(uuid,isfile)\n" |
| 1330 | ");" |
| 1331 | "INSERT INTO mirror.mmark(id,uuid,githash,isfile)" |
| 1332 | " SELECT id,uuid,githash," |
| 1333 | " EXISTS(SELECT 1 FROM repository.event, repository.blob" |
| 1334 | " WHERE objid=blob.rid" |
| 1335 | " AND blob.uuid=mmark_old.uuid)" |
| 1336 | " FROM mirror.mmark_old;\n" |
| 1337 | "DROP TABLE mirror.mmark_old;\n" |
| 1338 | ); |
| 1339 | } |
| 1340 |
| --- src/export.c | |
| +++ src/export.c | |
| @@ -1326,14 +1326,14 @@ | |
| 1326 | " uuid TEXT,\n" |
| 1327 | " isfile BOOLEAN,\n" |
| 1328 | " githash TEXT,\n" |
| 1329 | " UNIQUE(uuid,isfile)\n" |
| 1330 | ");" |
| 1331 | "INSERT OR IGNORE INTO mirror.mmark(id,uuid,githash,isfile)" |
| 1332 | " SELECT id,uuid,githash," |
| 1333 | " NOT EXISTS(SELECT 1 FROM repository.event, repository.blob" |
| 1334 | " WHERE event.objid=blob.rid" |
| 1335 | " AND blob.uuid=mmark_old.uuid)" |
| 1336 | " FROM mirror.mmark_old;\n" |
| 1337 | "DROP TABLE mirror.mmark_old;\n" |
| 1338 | ); |
| 1339 | } |
| 1340 |