mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Bring the documenation and implementation of sqlite3_collation_needed() into
agreement. Use a more efficient implementation of sqlite3ErrStr(). sqlite3_result_error_code() now calls sqlite3ErrStr() if no prior error string was set. (CVS 6550) FossilOrigin-Name: cb9af8293624da35c32077d0f46d5b0cf826dcf5
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
** This file contains code use to implement APIs that are part of the
|
||||
** VDBE.
|
||||
**
|
||||
** $Id: vdbeapi.c,v 1.163 2009/04/14 12:58:20 drh Exp $
|
||||
** $Id: vdbeapi.c,v 1.164 2009/04/27 18:46:06 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "vdbeInt.h"
|
||||
@@ -400,6 +400,10 @@ void sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){
|
||||
}
|
||||
void sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
|
||||
pCtx->isError = errCode;
|
||||
if( pCtx->s.flags & MEM_Null ){
|
||||
sqlite3VdbeMemSetStr(&pCtx->s, sqlite3ErrStr(errCode), -1,
|
||||
SQLITE_UTF8, SQLITE_STATIC);
|
||||
}
|
||||
}
|
||||
|
||||
/* Force an SQLITE_TOOBIG error. */
|
||||
|
Reference in New Issue
Block a user