mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Support for a future file format that includes 'short' records. (CVS 2351)
FossilOrigin-Name: 173aeb256e2c09098a4392874f8623e8a760d951
This commit is contained in:
17
src/main.c
17
src/main.c
@@ -14,7 +14,7 @@
|
||||
** other files are for internal use by SQLite and should not be
|
||||
** accessed by users of the library.
|
||||
**
|
||||
** $Id: main.c,v 1.280 2005/02/06 02:45:42 drh Exp $
|
||||
** $Id: main.c,v 1.281 2005/02/19 08:18:06 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@@ -257,12 +257,23 @@ static int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg){
|
||||
/* This happens if the database was initially empty */
|
||||
db->file_format = 1;
|
||||
}
|
||||
|
||||
if( db->file_format==2 ){
|
||||
/* File format 2 is treated exactly as file format 1. New
|
||||
** databases are created with file format 1.
|
||||
*/
|
||||
db->file_format = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** file_format==1 Version 3.0.0.
|
||||
** file_format==1 Version 3.0.0.
|
||||
** file_format==2 Version 3.1.3.
|
||||
**
|
||||
** Version 3.0 can only use files with file_format==1. Version 3.1.3
|
||||
** can read and write files with file_format==1 or file_format==2.
|
||||
*/
|
||||
if( meta[1]>1 ){
|
||||
if( meta[1]>2 ){
|
||||
sqlite3BtreeCloseCursor(curMain);
|
||||
sqlite3SetString(pzErrMsg, "unsupported file format", (char*)0);
|
||||
return SQLITE_ERROR;
|
||||
|
Reference in New Issue
Block a user