1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Fix the sqlite3_db_readonly() API so that it reports true if the database

is readonly because the file format write version (byte 18 of the header)
is too large.

FossilOrigin-Name: 8d8af114dac301335ec10671c1e9a5a6d8266a60
This commit is contained in:
drh
2014-05-21 08:21:07 +00:00
parent 27f2468422
commit 781597feca
6 changed files with 26 additions and 12 deletions

View File

@@ -3445,5 +3445,5 @@ const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName){
*/
int sqlite3_db_readonly(sqlite3 *db, const char *zDbName){
Btree *pBt = sqlite3DbNameToBtree(db, zDbName);
return pBt ? sqlite3PagerIsreadonly(sqlite3BtreePager(pBt)) : -1;
return pBt ? sqlite3BtreeIsReadonly(pBt) : -1;
}