diff options
author | drh <> | 2023-09-05 15:03:23 +0000 |
---|---|---|
committer | drh <> | 2023-09-05 15:03:23 +0000 |
commit | 5a05a68315c7f283dfccb89a2cb9bc6af9af16a2 (patch) | |
tree | dec39d41ad91a76feca39cf8be2de63758a60cd1 /src | |
parent | dd24b1c8a14f11587c3ea61142fd76ceaff912bb (diff) | |
download | sqlite-5a05a68315c7f283dfccb89a2cb9bc6af9af16a2.tar.gz sqlite-5a05a68315c7f283dfccb89a2cb9bc6af9af16a2.zip |
Fix a few SQLITE_MISUSE returns so that they call sqlite3MisuseError().
FossilOrigin-Name: 93f74490faf8cc07e107afdab6737c6e5141ae1f01a05142bfcede2dd1b2ba4e
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/vdbeapi.c | 4 | ||||
-rw-r--r-- | src/vtab.c | 2 | ||||
-rw-r--r-- | src/where.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c index b8f262261..b6d31c1c5 100644 --- a/src/main.c +++ b/src/main.c @@ -2473,7 +2473,7 @@ int sqlite3_wal_checkpoint_v2( if( eMode<SQLITE_CHECKPOINT_PASSIVE || eMode>SQLITE_CHECKPOINT_TRUNCATE ){ /* EVIDENCE-OF: R-03996-12088 The M parameter must be a valid checkpoint ** mode: */ - return SQLITE_MISUSE; + return SQLITE_MISUSE_BKPT; } sqlite3_mutex_enter(db->mutex); diff --git a/src/vdbeapi.c b/src/vdbeapi.c index 79b5de9f0..1213dbe6d 100644 --- a/src/vdbeapi.c +++ b/src/vdbeapi.c @@ -907,7 +907,7 @@ static int valueFromValueList( ValueList *pRhs; *ppOut = 0; - if( pVal==0 ) return SQLITE_MISUSE; + if( pVal==0 ) return SQLITE_MISUSE_BKPT; if( (pVal->flags & MEM_Dyn)==0 || pVal->xDel!=sqlite3VdbeValueListFree ){ return SQLITE_ERROR; }else{ @@ -1508,7 +1508,7 @@ static int vdbeUnbind(Vdbe *p, unsigned int i){ } sqlite3_mutex_enter(p->db->mutex); if( p->eVdbeState!=VDBE_READY_STATE ){ - sqlite3Error(p->db, SQLITE_MISUSE); + sqlite3Error(p->db, SQLITE_MISUSE_BKPT); sqlite3_mutex_leave(p->db->mutex); sqlite3_log(SQLITE_MISUSE, "bind on a busy prepared statement: [%s]", p->zSql); diff --git a/src/vtab.c b/src/vtab.c index 741518991..a9cfcb9d7 100644 --- a/src/vtab.c +++ b/src/vtab.c @@ -821,7 +821,7 @@ int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){ sqlite3_mutex_enter(db->mutex); pCtx = db->pVtabCtx; if( !pCtx || pCtx->bDeclared ){ - sqlite3Error(db, SQLITE_MISUSE); + sqlite3Error(db, SQLITE_MISUSE_BKPT); sqlite3_mutex_leave(db->mutex); return SQLITE_MISUSE_BKPT; } diff --git a/src/where.c b/src/where.c index 213df4223..01ae180ae 100644 --- a/src/where.c +++ b/src/where.c @@ -4097,7 +4097,7 @@ int sqlite3_vtab_rhs_value( sqlite3_value *pVal = 0; int rc = SQLITE_OK; if( iCons<0 || iCons>=pIdxInfo->nConstraint ){ - rc = SQLITE_MISUSE; /* EV: R-30545-25046 */ + rc = SQLITE_MISUSE_BKPT; /* EV: R-30545-25046 */ }else{ if( pH->aRhs[iCons]==0 ){ WhereTerm *pTerm = &pH->pWC->a[pIdxInfo->aConstraint[iCons].iTermOffset]; |