Enable cell overflow checking in sqlite3BtreeInitPage() using the
compile-time option SQLITE_ENABLE_OVERSIZE_CELL_CHECK. Change the tests so that they recognize different error messages depending on the setting of this macro. (CVS 6735) FossilOrigin-Name: 56bff6eb2fc5f0afbd96afc986671ec744bd40e1
This commit is contained in:
+2
-2
@@ -9,7 +9,7 @@
|
||||
** May you share freely, never taking more than you give.
|
||||
**
|
||||
*************************************************************************
|
||||
** $Id: btree.c,v 1.623 2009/06/09 11:34:11 danielk1977 Exp $
|
||||
** $Id: btree.c,v 1.624 2009/06/09 13:42:25 drh Exp $
|
||||
**
|
||||
** This file implements a external (disk-based) database using BTrees.
|
||||
** See the header comment on "btreeInt.h" for additional information.
|
||||
@@ -1153,7 +1153,7 @@ int sqlite3BtreeInitPage(MemPage *pPage){
|
||||
** past the end of a page boundary and causes SQLITE_CORRUPT to be
|
||||
** returned if it does.
|
||||
*/
|
||||
#if defined(SQLITE_OVERREAD_CHECK)
|
||||
#if defined(SQLITE_ENABLE_OVERSIZE_CELL_CHECK)
|
||||
{
|
||||
int iCellFirst; /* First allowable cell index */
|
||||
int iCellLast; /* Last possible cell index */
|
||||
|
||||
+11
-1
@@ -16,7 +16,7 @@
|
||||
** The focus of this file is providing the TCL testing layer
|
||||
** access to compile-time constants.
|
||||
**
|
||||
** $Id: test_config.c,v 1.48 2009/03/16 13:19:36 danielk1977 Exp $
|
||||
** $Id: test_config.c,v 1.49 2009/06/09 13:42:25 drh Exp $
|
||||
*/
|
||||
|
||||
#include "sqliteLimit.h"
|
||||
@@ -177,6 +177,16 @@ static void set_options(Tcl_Interp *interp){
|
||||
Tcl_SetVar2(interp, "sqlite_options", "columnmetadata", "0", TCL_GLOBAL_ONLY);
|
||||
#endif
|
||||
|
||||
#ifdef SQLITE_ENABLE_OVERSIZE_CELL_CHECK
|
||||
Tcl_SetVar2(interp, "sqlite_options", "oversize_cell_check", "1",
|
||||
TCL_GLOBAL_ONLY);
|
||||
#else
|
||||
Tcl_SetVar2(interp, "sqlite_options", "oversize_cell_check", "0",
|
||||
TCL_GLOBAL_ONLY);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef SQLITE_OMIT_COMPLETE
|
||||
Tcl_SetVar2(interp, "sqlite_options", "complete", "0", TCL_GLOBAL_ONLY);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user