mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Add support for extended result codes - additional result information
carried in the higher bits of the integer return codes. This must be enabled using the sqlite3_extended_result_code() API. Only a few extra result codes are currently defined. (CVS 3422) FossilOrigin-Name: ba579ddc4361fc6e8ea66f9385770d70dfe94751
This commit is contained in:
13
src/pager.c
13
src/pager.c
@@ -18,7 +18,7 @@
|
||||
** file simultaneously, or one process from reading the database while
|
||||
** another is writing.
|
||||
**
|
||||
** @(#) $Id: pager.c,v 1.271 2006/08/08 13:51:43 drh Exp $
|
||||
** @(#) $Id: pager.c,v 1.272 2006/09/15 07:28:50 drh Exp $
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_DISKIO
|
||||
#include "sqliteInt.h"
|
||||
@@ -476,12 +476,13 @@ static u32 retrieve32bits(PgHdr *p, int offset){
|
||||
** will immediately return the same error code.
|
||||
*/
|
||||
static int pager_error(Pager *pPager, int rc){
|
||||
int rc2 = rc & 0xff;
|
||||
assert( pPager->errCode==SQLITE_FULL || pPager->errCode==SQLITE_OK );
|
||||
if(
|
||||
rc==SQLITE_FULL ||
|
||||
rc==SQLITE_IOERR ||
|
||||
rc==SQLITE_CORRUPT ||
|
||||
rc==SQLITE_PROTOCOL
|
||||
rc2==SQLITE_FULL ||
|
||||
rc2==SQLITE_IOERR ||
|
||||
rc2==SQLITE_CORRUPT ||
|
||||
rc2==SQLITE_PROTOCOL
|
||||
){
|
||||
pPager->errCode = rc;
|
||||
}
|
||||
@@ -2578,7 +2579,7 @@ int sqlite3pager_release_memory(int nReq){
|
||||
** The error will be returned to the user (or users, in the case
|
||||
** of a shared pager cache) of the pager for which the error occured.
|
||||
*/
|
||||
assert( rc==SQLITE_IOERR || rc==SQLITE_FULL );
|
||||
assert( (rc&0xff)==SQLITE_IOERR || rc==SQLITE_FULL );
|
||||
assert( p->state>=PAGER_RESERVED );
|
||||
pager_error(p, rc);
|
||||
}
|
||||
|
Reference in New Issue
Block a user