Fossil SCM
Statement ordering: Don't read 'fingerprint' when there are no checkin's.
Commit
ffe7cc595e4c1835f2e55abf4aa09ba81667bcbb0e5a698f19e7a5f92d6f8333
Parent
fd8816ecf6eeea1…
1 file changed
+1
-1
M
src/db.c
+1
-1
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -4027,15 +4027,15 @@ | ||
| 4027 | 4027 | int db_fingerprint_ok(void){ |
| 4028 | 4028 | char *zCkout; /* The fingerprint recorded in the checkout database */ |
| 4029 | 4029 | char *zRepo; /* The fingerprint of the repository */ |
| 4030 | 4030 | int rc; /* Result */ |
| 4031 | 4031 | |
| 4032 | - zCkout = db_text(0,"SELECT value FROM localdb.vvar WHERE name='fingerprint'"); | |
| 4033 | 4032 | if( !db_lget_int("checkout", 0) ){ |
| 4034 | 4033 | /* We have an empty checkout, fingerprint is still NULL. */ |
| 4035 | 4034 | return 2; |
| 4036 | 4035 | } |
| 4036 | + zCkout = db_text(0,"SELECT value FROM localdb.vvar WHERE name='fingerprint'"); | |
| 4037 | 4037 | if( zCkout==0 ){ |
| 4038 | 4038 | /* This is an older checkout that does not record a fingerprint. |
| 4039 | 4039 | ** We have to assume everything is ok */ |
| 4040 | 4040 | return 2; |
| 4041 | 4041 | } |
| 4042 | 4042 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -4027,15 +4027,15 @@ | |
| 4027 | int db_fingerprint_ok(void){ |
| 4028 | char *zCkout; /* The fingerprint recorded in the checkout database */ |
| 4029 | char *zRepo; /* The fingerprint of the repository */ |
| 4030 | int rc; /* Result */ |
| 4031 | |
| 4032 | zCkout = db_text(0,"SELECT value FROM localdb.vvar WHERE name='fingerprint'"); |
| 4033 | if( !db_lget_int("checkout", 0) ){ |
| 4034 | /* We have an empty checkout, fingerprint is still NULL. */ |
| 4035 | return 2; |
| 4036 | } |
| 4037 | if( zCkout==0 ){ |
| 4038 | /* This is an older checkout that does not record a fingerprint. |
| 4039 | ** We have to assume everything is ok */ |
| 4040 | return 2; |
| 4041 | } |
| 4042 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -4027,15 +4027,15 @@ | |
| 4027 | int db_fingerprint_ok(void){ |
| 4028 | char *zCkout; /* The fingerprint recorded in the checkout database */ |
| 4029 | char *zRepo; /* The fingerprint of the repository */ |
| 4030 | int rc; /* Result */ |
| 4031 | |
| 4032 | if( !db_lget_int("checkout", 0) ){ |
| 4033 | /* We have an empty checkout, fingerprint is still NULL. */ |
| 4034 | return 2; |
| 4035 | } |
| 4036 | zCkout = db_text(0,"SELECT value FROM localdb.vvar WHERE name='fingerprint'"); |
| 4037 | if( zCkout==0 ){ |
| 4038 | /* This is an older checkout that does not record a fingerprint. |
| 4039 | ** We have to assume everything is ok */ |
| 4040 | return 2; |
| 4041 | } |
| 4042 |