mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-18 10:21:03 +03:00
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:
@@ -13,7 +13,7 @@
|
||||
** interface, and routines that contribute to loading the database schema
|
||||
** from disk.
|
||||
**
|
||||
** $Id: prepare.c,v 1.10 2005/12/16 01:06:17 drh Exp $
|
||||
** $Id: prepare.c,v 1.11 2005/12/29 19:23:07 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@@ -258,13 +258,13 @@ static int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg){
|
||||
** file_format==1 Version 3.0.0.
|
||||
** file_format==2 Version 3.1.3. // ALTER TABLE ADD COLUMN
|
||||
** file_format==3 Version 3.1.4. // ditto but with non-NULL defaults
|
||||
** file_format==4 Version 3.3.0. // DESC indices
|
||||
** file_format==4 Version 3.3.0. // DESC indices. Boolean constants
|
||||
*/
|
||||
pDb->file_format = meta[1];
|
||||
if( pDb->file_format==0 ){
|
||||
pDb->file_format = 1;
|
||||
}
|
||||
if( pDb->file_format>4 ){
|
||||
if( pDb->file_format>SQLITE_MAX_FILE_FORMAT ){
|
||||
sqlite3BtreeCloseCursor(curMain);
|
||||
sqlite3SetString(pzErrMsg, "unsupported file format", (char*)0);
|
||||
return SQLITE_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user