mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Fix the zeroblob() function and related APIs so that they work with SQLITE_OMIT_INCRBLOB builds.
FossilOrigin-Name: bc401a75dd9f3c29c5969ae36264e68ccefc0937e44e232ca1f6b550f7fd6e22
This commit is contained in:
@@ -541,8 +541,12 @@ int sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){
|
||||
if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){
|
||||
return SQLITE_TOOBIG;
|
||||
}
|
||||
#ifndef SQLITE_OMIT_INCRBLOB
|
||||
sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n);
|
||||
return SQLITE_OK;
|
||||
#else
|
||||
return sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n);
|
||||
#endif
|
||||
}
|
||||
void sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
|
||||
pCtx->isError = errCode ? errCode : -1;
|
||||
@@ -1554,7 +1558,11 @@ int sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){
|
||||
Vdbe *p = (Vdbe *)pStmt;
|
||||
rc = vdbeUnbind(p, i);
|
||||
if( rc==SQLITE_OK ){
|
||||
#ifndef SQLITE_OMIT_INCRBLOB
|
||||
sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n);
|
||||
#else
|
||||
rc = sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n);
|
||||
#endif
|
||||
sqlite3_mutex_leave(p->db->mutex);
|
||||
}
|
||||
return rc;
|
||||
|
Reference in New Issue
Block a user