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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user