/ Check-in [4c21ee2d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove obsolete bits from the bitvector that defines disabled optimizations in the SQLITE_TESTCTRL_OPTIMIZATIONS verb of sqlite3_test_control().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4c21ee2d26466f83dec525153e2b1506bd956701
User & Date: drh 2012-09-17 19:12:39
Context
2012-09-18
13:20
Update the vdbe-compress.tcl script so that it accepts variable declarations inside of #ifdef...#endif. This enhancement is needed due to the change of check-in [39866c0ede5d6ef4]. check-in: e7db056a user: drh tags: trunk
2012-09-17
19:26
Merge recent trunk changes into the fullscan-covering-index branch. check-in: 1c0bf030 user: drh tags: fullscan-covering-index
19:12
Remove obsolete bits from the bitvector that defines disabled optimizations in the SQLITE_TESTCTRL_OPTIMIZATIONS verb of sqlite3_test_control(). check-in: 4c21ee2d user: drh tags: trunk
18:56
Remove an unnecessary parameter from sqlite3Utf8Read() resulting in a slight performance increase. check-in: 8b962c94 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/sqliteInt.h.

958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
#define SQLITE_EnableTrigger  0x40000000  /* True to enable triggers */

/*
** Bits of the sqlite3.flags field that are used by the
** sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS,...) interface.
** These must be the low-order bits of the flags field.
*/
#define SQLITE_QueryFlattener 0x01        /* Disable query flattening */
#define SQLITE_ColumnCache    0x02        /* Disable the column cache */
#define SQLITE_IndexSort      0x04        /* Disable indexes for sorting */
#define SQLITE_IndexSearch    0x08        /* Disable indexes for searching */
#define SQLITE_IndexCover     0x10        /* Disable index covering table */
#define SQLITE_GroupByOrder   0x20        /* Disable GROUPBY cover of ORDERBY */
#define SQLITE_FactorOutConst 0x40        /* Disable factoring out constants */
#define SQLITE_IdxRealAsInt   0x80        /* Store REAL as INT in indices */
#define SQLITE_DistinctOpt    0x80        /* DISTINCT using indexes */
#define SQLITE_OptMask        0xff        /* Mask of all disablable opts */

/*
** Possible values for the sqlite.magic field.
** The numbers are obtained at random and have no special meaning, other
** than being distinct from one another.
*/
#define SQLITE_MAGIC_OPEN     0xa029a697  /* Database is open */







|
|
<
<
<
|
|
|
|
|







958
959
960
961
962
963
964
965
966



967
968
969
970
971
972
973
974
975
976
977
978
#define SQLITE_EnableTrigger  0x40000000  /* True to enable triggers */

/*
** Bits of the sqlite3.flags field that are used by the
** sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS,...) interface.
** These must be the low-order bits of the flags field.
*/
#define SQLITE_QueryFlattener 0x01   /* Disable query flattening */
#define SQLITE_ColumnCache    0x02   /* Disable the column cache */



#define SQLITE_GroupByOrder   0x04   /* Disable GROUPBY cover of ORDERBY */
#define SQLITE_FactorOutConst 0x08   /* Disable factoring out constants */
#define SQLITE_IdxRealAsInt   0x10   /* Store REAL as INT in indices */
#define SQLITE_DistinctOpt    0x20   /* DISTINCT using indexes */
#define SQLITE_OptMask        0xff   /* Mask of all disablable opts */

/*
** Possible values for the sqlite.magic field.
** The numbers are obtained at random and have no special meaning, other
** than being distinct from one another.
*/
#define SQLITE_MAGIC_OPEN     0xa029a697  /* Database is open */

Changes to src/test1.c.

5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944

5945
5946
5947
5948
5949
5950
5951
  static const struct {
    const char *zOptName;
    int mask;
  } aOpt[] = {
    { "all",              SQLITE_OptMask        },
    { "query-flattener",  SQLITE_QueryFlattener },
    { "column-cache",     SQLITE_ColumnCache    },
    { "index-sort",       SQLITE_IndexSort      },
    { "index-search",     SQLITE_IndexSearch    },
    { "index-cover",      SQLITE_IndexCover     },
    { "groupby-order",    SQLITE_GroupByOrder   },
    { "factor-constants", SQLITE_FactorOutConst },
    { "real-as-int",      SQLITE_IdxRealAsInt   },

  };

  if( objc!=4 ){
    Tcl_WrongNumArgs(interp, 1, objv, "DB OPT BOOLEAN");
    return TCL_ERROR;
  }
  if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;







<
<
<



>







5932
5933
5934
5935
5936
5937
5938



5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
  static const struct {
    const char *zOptName;
    int mask;
  } aOpt[] = {
    { "all",              SQLITE_OptMask        },
    { "query-flattener",  SQLITE_QueryFlattener },
    { "column-cache",     SQLITE_ColumnCache    },



    { "groupby-order",    SQLITE_GroupByOrder   },
    { "factor-constants", SQLITE_FactorOutConst },
    { "real-as-int",      SQLITE_IdxRealAsInt   },
    { "distinct-opt",     SQLITE_DistinctOpt    },
  };

  if( objc!=4 ){
    Tcl_WrongNumArgs(interp, 1, objv, "DB OPT BOOLEAN");
    return TCL_ERROR;
  }
  if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;