aboutsummaryrefslogtreecommitdiff
path: root/src/test2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test2.c')
-rw-r--r--src/test2.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/test2.c b/src/test2.c
index 5f1c12e14..f8665ba7f 100644
--- a/src/test2.c
+++ b/src/test2.c
@@ -13,7 +13,7 @@
** is not included in the SQLite library. It is used for automated
** testing of the SQLite library.
**
-** $Id: test2.c,v 1.66 2009/01/16 15:21:06 danielk1977 Exp $
+** $Id: test2.c,v 1.67 2009/01/16 16:23:38 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
@@ -418,13 +418,18 @@ static int page_unref(
const char **argv /* Text of each argument */
){
DbPage *pPage;
+ int rc;
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" PAGE\"", 0);
return TCL_ERROR;
}
pPage = (DbPage *)sqlite3TestTextToPtr(argv[1]);
- sqlite3PagerUnref(pPage);
+ rc = sqlite3PagerUnref(pPage);
+ if( rc!=SQLITE_OK ){
+ Tcl_AppendResult(interp, errorName(rc), 0);
+ return TCL_ERROR;
+ }
return TCL_OK;
}