Add serial-types 8 and 9 for integer constants of 0 and 1 that use zero

bytes of storage.  Make the default file format 4.  Add the
SQLITE_DEFAULT_FILE_FORMAT compile-time option to lower the default
file format number so that newly created databases can be read and
written by older versions of SQLite. (CVS 2845)

FossilOrigin-Name: ae301db8a61a74bc72f67f5766811d89a3b3ec72
This commit is contained in:
drh
2005-12-29 19:23:06 +00:00
parent aa81608eb0
commit d946db0064
11 changed files with 95 additions and 74 deletions
+12 -2
View File
@@ -11,7 +11,7 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
** @(#) $Id: sqliteInt.h,v 1.443 2005/12/29 01:11:37 drh Exp $
** @(#) $Id: sqliteInt.h,v 1.444 2005/12/29 19:23:07 drh Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_
@@ -140,6 +140,17 @@
*/
#define SQLITE_MAX_VARIABLE_NUMBER 999
/*
** The "file format" number is an integer that is incremented whenever
** the VDBE-level file format changes. The following macros define the
** the default file format for new databases and the maximum file format
** that the library can read.
*/
#define SQLITE_MAX_FILE_FORMAT 4
#ifndef SQLITE_DEFAULT_FILE_FORMAT
# define SQLITE_DEFAULT_FILE_FORMAT 4
#endif
/*
** Provide a default value for TEMP_STORE in case it is not specified
** on the command-line
@@ -360,7 +371,6 @@ struct Db {
u8 inTrans; /* 0: not writable. 1: Transaction. 2: Checkpoint */
u8 safety_level; /* How aggressive at synching data to disk */
u8 file_format; /* Schema format version for this file */
u8 descIndex; /* True if any index uses the DESC attribute */
int cache_size; /* Number of pages to use in the cache */
Table *pSeqTab; /* The sqlite_sequence table used by AUTOINCREMENT */
void *pAux; /* Auxiliary data. Usually NULL */