mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-18 10:21:03 +03:00
Minor simplification of schema error reporting.
FossilOrigin-Name: a8846aeed9992c6c9f1c8bd6e996a4cbe891751e
This commit is contained in:
@@ -28,11 +28,10 @@ static void corruptSchema(
|
||||
if( !db->mallocFailed && (db->flags & SQLITE_RecoveryMode)==0 ){
|
||||
char *z;
|
||||
if( zObj==0 ) zObj = "?";
|
||||
z = sqlite3_mprintf("malformed database schema (%s)", zObj);
|
||||
if( z && zExtra ) z = sqlite3_mprintf("%z - %s", z, zExtra);
|
||||
z = sqlite3MPrintf(db, "malformed database schema (%s)", zObj);
|
||||
if( zExtra ) z = sqlite3MPrintf(db, "%z - %s", z, zExtra);
|
||||
sqlite3DbFree(db, *pData->pzErrMsg);
|
||||
*pData->pzErrMsg = z;
|
||||
if( z==0 ) sqlite3OomFault(db);
|
||||
}
|
||||
pData->rc = db->mallocFailed ? SQLITE_NOMEM : SQLITE_CORRUPT_BKPT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user