Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | More missing db_unprotect() calls. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | sec2020 |
| Files: | files | file ages | folders |
| SHA3-256: |
06d3789a2ad847c6e8b3548531835399 |
| User & Date: | drh 2020-08-18 13:17:56.962 |
Context
|
2020-08-18
| ||
| 14:02 | Merge in the latest trunk changes. check-in: 917917aa55 user: drh tags: sec2020 | |
| 13:17 | More missing db_unprotect() calls. check-in: 06d3789a2a user: drh tags: sec2020 | |
| 12:17 | When writing files to disk for a check-out, refuse to write through a symbolic link to a directory. Ticket [f9831fdef1d4edcc]. check-in: a64e384f0c user: drh tags: sec2020 | |
Changes
Changes to src/clone.c.
| ︙ | ︙ | |||
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
}
db_end_transaction(0);
fossil_print("Vacuuming the database... "); fflush(stdout);
if( db_int(0, "PRAGMA page_count")>1000
&& db_int(0, "PRAGMA page_size")<8192 ){
db_multi_exec("PRAGMA page_size=8192;");
}
db_multi_exec("VACUUM");
fossil_print("\nproject-id: %s\n", db_get("project-code", 0));
fossil_print("server-id: %s\n", db_get("server-code", 0));
zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin);
fossil_print("admin-user: %s (password is \"%s\")\n", g.zLogin, zPassword);
}
/*
| > > | 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
}
db_end_transaction(0);
fossil_print("Vacuuming the database... "); fflush(stdout);
if( db_int(0, "PRAGMA page_count")>1000
&& db_int(0, "PRAGMA page_size")<8192 ){
db_multi_exec("PRAGMA page_size=8192;");
}
db_unprotect(PROTECT_ALL);
db_multi_exec("VACUUM");
db_protect_pop();
fossil_print("\nproject-id: %s\n", db_get("project-code", 0));
fossil_print("server-id: %s\n", db_get("server-code", 0));
zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin);
fossil_print("admin-user: %s (password is \"%s\")\n", g.zLogin, zPassword);
}
/*
|
| ︙ | ︙ |
Changes to src/db.c.
| ︙ | ︙ | |||
2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 |
/* If the localdb has a lot of unused free space,
** then VACUUM it as we shut down.
*/
if( db_database_slot("localdb")>=0 ){
int nFree = db_int(0, "PRAGMA localdb.freelist_count");
int nTotal = db_int(0, "PRAGMA localdb.page_count");
if( nFree>nTotal/4 ){
db_multi_exec("VACUUM localdb;");
}
}
if( g.db ){
int rc;
sqlite3_wal_checkpoint(g.db, 0);
rc = sqlite3_close(g.db);
| > > | 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 |
/* If the localdb has a lot of unused free space,
** then VACUUM it as we shut down.
*/
if( db_database_slot("localdb")>=0 ){
int nFree = db_int(0, "PRAGMA localdb.freelist_count");
int nTotal = db_int(0, "PRAGMA localdb.page_count");
if( nFree>nTotal/4 ){
db_unprotect(PROTECT_ALL);
db_multi_exec("VACUUM localdb;");
db_protect_pop();
}
}
if( g.db ){
int rc;
sqlite3_wal_checkpoint(g.db, 0);
rc = sqlite3_close(g.db);
|
| ︙ | ︙ |
Changes to src/import.c.
| ︙ | ︙ | |||
1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 |
}
if( !incrFlag ){
if( forceFlag ) file_delete(g.argv[2]);
db_create_repository(g.argv[2]);
}
db_open_repository(g.argv[2]);
db_open_config(0, 0);
db_begin_transaction();
if( !incrFlag ){
db_initial_setup(0, 0, zDefaultUser);
db_set("main-branch", gimport.zTrunkName, 0);
}
| > | 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 |
}
if( !incrFlag ){
if( forceFlag ) file_delete(g.argv[2]);
db_create_repository(g.argv[2]);
}
db_open_repository(g.argv[2]);
db_open_config(0, 0);
db_unprotect(PROTECT_ALL);
db_begin_transaction();
if( !incrFlag ){
db_initial_setup(0, 0, zDefaultUser);
db_set("main-branch", gimport.zTrunkName, 0);
}
|
| ︙ | ︙ |
Changes to src/sync.c.
| ︙ | ︙ | |||
543 544 545 546 547 548 549 550 551 |
if( file_delete(zDest) ){
fossil_fatal("unable to delete old copy of \"%s\"", zDest);
}
}else{
fossil_fatal("backup \"%s\" already exists", zDest);
}
}
db_multi_exec("VACUUM repository INTO %Q", zDest);
}
| > | 543 544 545 546 547 548 549 550 551 552 |
if( file_delete(zDest) ){
fossil_fatal("unable to delete old copy of \"%s\"", zDest);
}
}else{
fossil_fatal("backup \"%s\" already exists", zDest);
}
}
db_unprotect(PROTECT_ALL);
db_multi_exec("VACUUM repository INTO %Q", zDest);
}
|