Fossil

Check-in [0c0f268f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the db_is_writable() routine to return FALSE if the database is not even open.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0c0f268ff3fd2b0b12d936ac0e3c9b7418e908af
User & Date: drh 2012-07-19 15:41:24.387
References
2012-07-19
18:03
Merged in [0c0f268ff3], minor th1-internal doc addition. ... (check-in: 56db3533 user: stephan tags: th1-query-api)
Context
2012-07-19
18:41
/ci_edit now auto-checks the Add Tag checkbox if the user types in the tag name field. Thanks to Nolan D. for the suggestion and Steve H. for the graceful solution. ... (check-in: 542f989a user: stephan tags: trunk)
18:03
Merged in [0c0f268ff3], minor th1-internal doc addition. ... (check-in: 56db3533 user: stephan tags: th1-query-api)
15:41
Fix the db_is_writable() routine to return FALSE if the database is not even open. ... (check-in: 0c0f268f user: drh tags: trunk)
2012-07-17
16:55
Separate the download links on the "info" and "ci" pages onto a separate line with a separate label. ... (check-in: 7ee938f4 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/db.c.
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
                   "   AND value<>'%s'", AUX_SCHEMA);
}

/*
** Return true if the database is writeable
*/
int db_is_writeable(const char *zName){
  return !sqlite3_db_readonly(g.db, db_name(zName));
}

/*
** Verify that the repository schema is correct.  If it is not correct,
** issue a fatal error and die.
*/
void db_verify_schema(void){







|







1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
                   "   AND value<>'%s'", AUX_SCHEMA);
}

/*
** Return true if the database is writeable
*/
int db_is_writeable(const char *zName){
  return g.db!=0 && !sqlite3_db_readonly(g.db, db_name(zName));
}

/*
** Verify that the repository schema is correct.  If it is not correct,
** issue a fatal error and die.
*/
void db_verify_schema(void){