mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +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:
@@ -146,7 +146,7 @@ int sqlite3_get_table(
|
||||
assert( sizeof(res.azResult[0])>= sizeof(res.nData) );
|
||||
res.azResult[0] = (char*)res.nData;
|
||||
}
|
||||
if( rc==SQLITE_ABORT ){
|
||||
if( (rc&0xff)==SQLITE_ABORT ){
|
||||
sqlite3_free_table(&res.azResult[1]);
|
||||
if( res.zErrMsg ){
|
||||
if( pzErrMsg ){
|
||||
@@ -156,12 +156,12 @@ int sqlite3_get_table(
|
||||
sqliteFree(res.zErrMsg);
|
||||
}
|
||||
db->errCode = res.rc;
|
||||
return res.rc;
|
||||
return res.rc & db->errMask;
|
||||
}
|
||||
sqliteFree(res.zErrMsg);
|
||||
if( rc!=SQLITE_OK ){
|
||||
sqlite3_free_table(&res.azResult[1]);
|
||||
return rc;
|
||||
return rc & db->errMask;
|
||||
}
|
||||
if( res.nAlloc>res.nData ){
|
||||
char **azNew;
|
||||
@@ -176,7 +176,7 @@ int sqlite3_get_table(
|
||||
*pazResult = &res.azResult[1];
|
||||
if( pnColumn ) *pnColumn = res.nColumn;
|
||||
if( pnRow ) *pnRow = res.nRow;
|
||||
return rc;
|
||||
return rc & db->errMask;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user