mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Change the xIntegrity virtual table method signature so that it returns
an integer error code and writes the error message into a parameter. FossilOrigin-Name: f1d4024a8ca06cf954aaf1f612684d1a5d28492bde757695db3f22c50c649709
This commit is contained in:
@@ -8141,7 +8141,7 @@ case OP_VCheck: { /* out2 */
|
||||
Table *pTab;
|
||||
sqlite3_vtab *pVtab;
|
||||
const sqlite3_module *pModule;
|
||||
char *zErr;
|
||||
char *zErr = 0;
|
||||
|
||||
pOut = &aMem[pOp->p2];
|
||||
sqlite3VdbeMemSetNull(pOut); /* Innocent until proven guilty */
|
||||
@@ -8156,7 +8156,11 @@ case OP_VCheck: { /* out2 */
|
||||
assert( pModule!=0 );
|
||||
assert( pModule->iVersion>=4 );
|
||||
assert( pModule->xIntegrity!=0 );
|
||||
zErr = pModule->xIntegrity(pVtab);
|
||||
rc = pModule->xIntegrity(pVtab, &zErr);
|
||||
if( rc ){
|
||||
sqlite3_free(zErr);
|
||||
goto abort_due_to_error;
|
||||
}
|
||||
if( zErr ){
|
||||
sqlite3VdbeMemSetStr(pOut, zErr, -1, SQLITE_UTF8, sqlite3_free);
|
||||
}
|
||||
|
Reference in New Issue
Block a user