Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Correct /doc webpage in the case of a read-only database containing a vcache table lacking the desired vid |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
b20f6cbaf4aabb5e603ebbf74803e53e |
| User & Date: | andygoth 2017-09-21 00:56:39.884 |
Context
|
2017-09-21
| ||
| 20:45 | Update the built-in SQLite to the latest 3.21.0 alpha that includes the enhancements to the Windows VFS that help it better deal with read-only repository files. ... (check-in: e97d4443d5 user: drh tags: trunk) | |
| 09:56 | (cherry-pick): Correct /doc webpage in the case of a read-only database containing a vcache table lacking the desired vid ... (Closed-Leaf check-in: 1fdcb20707 user: jan.nijtmans tags: branch-2.3) | |
| 00:56 | Correct /doc webpage in the case of a read-only database containing a vcache table lacking the desired vid ... (check-in: b20f6cbaf4 user: andygoth tags: trunk) | |
|
2017-09-20
| ||
| 20:15 | Correct typo in documentation ... (check-in: aad384d5d1 user: andygoth tags: trunk) | |
Changes
Changes to src/doc.c.
| ︙ | ︙ | |||
462 463 464 465 466 467 468 469 |
/*
** Look for a file named zName in the check-in with RID=vid. Load the content
** of that file into pContent and return the RID for the file. Or return 0
** if the file is not found or could not be loaded.
*/
int doc_load_content(int vid, const char *zName, Blob *pContent){
int rid; /* The RID of the file being loaded */
| > | | | 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 |
/*
** Look for a file named zName in the check-in with RID=vid. Load the content
** of that file into pContent and return the RID for the file. Or return 0
** if the file is not found or could not be loaded.
*/
int doc_load_content(int vid, const char *zName, Blob *pContent){
int writable = db_is_writeable("repository");
int rid; /* The RID of the file being loaded */
if( !db_table_exists("repository", "vcache") || !writable ){
db_multi_exec(
"CREATE %s TABLE IF NOT EXISTS vcache(\n"
" vid INTEGER, -- check-in ID\n"
" fname TEXT, -- filename\n"
" rid INTEGER, -- artifact ID\n"
" PRIMARY KEY(vid,fname)\n"
") WITHOUT ROWID", writable ? "" : "TEMPORARY"
);
}
if( !db_exists("SELECT 1 FROM vcache WHERE vid=%d", vid) ){
db_multi_exec(
"DELETE FROM vcache;\n"
"CREATE VIRTUAL TABLE IF NOT EXISTS temp.foci USING files_of_checkin;\n"
"INSERT INTO vcache(vid,fname,rid)"
|
| ︙ | ︙ |