mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Split the sqlite3Error() routine into sqlite3Error() and
sqlite3ErrorWithMsg(), for a slight size reduction and performance increase. FossilOrigin-Name: cf561d1f0bb60b3d638632d20bd686dda4fa4a04
This commit is contained in:
@@ -770,7 +770,7 @@ static Mem *columnMem(sqlite3_stmt *pStmt, int i){
|
||||
}else{
|
||||
if( pVm && ALWAYS(pVm->db) ){
|
||||
sqlite3_mutex_enter(pVm->db->mutex);
|
||||
sqlite3Error(pVm->db, SQLITE_RANGE, 0);
|
||||
sqlite3Error(pVm->db, SQLITE_RANGE);
|
||||
}
|
||||
pOut = (Mem*)columnNullValue();
|
||||
}
|
||||
@@ -1035,14 +1035,14 @@ static int vdbeUnbind(Vdbe *p, int i){
|
||||
}
|
||||
sqlite3_mutex_enter(p->db->mutex);
|
||||
if( p->magic!=VDBE_MAGIC_RUN || p->pc>=0 ){
|
||||
sqlite3Error(p->db, SQLITE_MISUSE, 0);
|
||||
sqlite3Error(p->db, SQLITE_MISUSE);
|
||||
sqlite3_mutex_leave(p->db->mutex);
|
||||
sqlite3_log(SQLITE_MISUSE,
|
||||
"bind on a busy prepared statement: [%s]", p->zSql);
|
||||
return SQLITE_MISUSE_BKPT;
|
||||
}
|
||||
if( i<1 || i>p->nVar ){
|
||||
sqlite3Error(p->db, SQLITE_RANGE, 0);
|
||||
sqlite3Error(p->db, SQLITE_RANGE);
|
||||
sqlite3_mutex_leave(p->db->mutex);
|
||||
return SQLITE_RANGE;
|
||||
}
|
||||
@@ -1050,7 +1050,7 @@ static int vdbeUnbind(Vdbe *p, int i){
|
||||
pVar = &p->aVar[i];
|
||||
sqlite3VdbeMemRelease(pVar);
|
||||
pVar->flags = MEM_Null;
|
||||
sqlite3Error(p->db, SQLITE_OK, 0);
|
||||
sqlite3Error(p->db, SQLITE_OK);
|
||||
|
||||
/* If the bit corresponding to this variable in Vdbe.expmask is set, then
|
||||
** binding a new value to this variable invalidates the current query plan.
|
||||
@@ -1092,7 +1092,7 @@ static int bindText(
|
||||
if( rc==SQLITE_OK && encoding!=0 ){
|
||||
rc = sqlite3VdbeChangeEncoding(pVar, ENC(p->db));
|
||||
}
|
||||
sqlite3Error(p->db, rc, 0);
|
||||
sqlite3Error(p->db, rc);
|
||||
rc = sqlite3ApiExit(p->db, rc);
|
||||
}
|
||||
sqlite3_mutex_leave(p->db->mutex);
|
||||
|
Reference in New Issue
Block a user