mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Remove the obsolete sqlite3SafetyOn() mechanism. Add additional logging
output for CORRUPT, and CANTOPEN errors. FossilOrigin-Name: 7c4cca6d1a23a6d1591b62f58c3716a944969947
This commit is contained in:
@@ -95,13 +95,6 @@ int sqlite3_blob_open(
|
||||
memset(pParse, 0, sizeof(Parse));
|
||||
pParse->db = db;
|
||||
|
||||
if( sqlite3SafetyOn(db) ){
|
||||
sqlite3DbFree(db, zErr);
|
||||
sqlite3StackFree(db, pParse);
|
||||
sqlite3_mutex_leave(db->mutex);
|
||||
return SQLITE_MISUSE;
|
||||
}
|
||||
|
||||
sqlite3BtreeEnterAll(db);
|
||||
pTab = sqlite3LocateTable(pParse, 0, zTable, zDb);
|
||||
if( pTab && IsVirtual(pTab) ){
|
||||
@@ -121,7 +114,6 @@ int sqlite3_blob_open(
|
||||
pParse->zErrMsg = 0;
|
||||
}
|
||||
rc = SQLITE_ERROR;
|
||||
(void)sqlite3SafetyOff(db);
|
||||
sqlite3BtreeLeaveAll(db);
|
||||
goto blob_open_out;
|
||||
}
|
||||
@@ -136,7 +128,6 @@ int sqlite3_blob_open(
|
||||
sqlite3DbFree(db, zErr);
|
||||
zErr = sqlite3MPrintf(db, "no such column: \"%s\"", zColumn);
|
||||
rc = SQLITE_ERROR;
|
||||
(void)sqlite3SafetyOff(db);
|
||||
sqlite3BtreeLeaveAll(db);
|
||||
goto blob_open_out;
|
||||
}
|
||||
@@ -177,7 +168,6 @@ int sqlite3_blob_open(
|
||||
sqlite3DbFree(db, zErr);
|
||||
zErr = sqlite3MPrintf(db, "cannot open %s column for writing", zFault);
|
||||
rc = SQLITE_ERROR;
|
||||
(void)sqlite3SafetyOff(db);
|
||||
sqlite3BtreeLeaveAll(db);
|
||||
goto blob_open_out;
|
||||
}
|
||||
@@ -227,8 +217,7 @@ int sqlite3_blob_open(
|
||||
}
|
||||
|
||||
sqlite3BtreeLeaveAll(db);
|
||||
rc = sqlite3SafetyOff(db);
|
||||
if( NEVER(rc!=SQLITE_OK) || db->mallocFailed ){
|
||||
if( db->mallocFailed ){
|
||||
goto blob_open_out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user