mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Provide the SQLITE_FILE_HEADER command-line option for changing the text
that appears at the beginning of databases. (CVS 2515) FossilOrigin-Name: 3d7ee5b92d7e30f90cb7a8b3efd649b36480b61b
This commit is contained in:
17
src/btree.c
17
src/btree.c
@@ -9,7 +9,7 @@
|
||||
** May you share freely, never taking more than you give.
|
||||
**
|
||||
*************************************************************************
|
||||
** $Id: btree.c,v 1.261 2005/05/24 20:19:58 drh Exp $
|
||||
** $Id: btree.c,v 1.262 2005/06/14 16:04:06 drh Exp $
|
||||
**
|
||||
** This file implements a external (disk-based) database using BTrees.
|
||||
** For a detailed discussion of BTrees, refer to
|
||||
@@ -234,8 +234,19 @@ typedef struct MemPage MemPage;
|
||||
/*
|
||||
** This is a magic string that appears at the beginning of every
|
||||
** SQLite database in order to identify the file as a real database.
|
||||
** 123456789 123456 */
|
||||
static const char zMagicHeader[] = "SQLite format 3";
|
||||
**
|
||||
** You can change this value at compile-time by specifying a
|
||||
** -DSQLITE_FILE_HEADER="..." on the compiler command-line. The
|
||||
** header must be exactly 16 bytes including the zero-terminator so
|
||||
** the string itself should be 15 characters long. If you change
|
||||
** the header, then your custom library will not be able to read
|
||||
** databases generated by the standard tools and the standard tools
|
||||
** will not be able to read databases created by your custom library.
|
||||
*/
|
||||
#ifndef SQLITE_FILE_HEADER /* 123456789 123456 */
|
||||
# define SQLITE_FILE_HEADER "SQLite format 3"
|
||||
#endif
|
||||
static const char zMagicHeader[] = SQLITE_FILE_HEADER;
|
||||
|
||||
/*
|
||||
** Page type flags. An ORed combination of these flags appear as the
|
||||
|
Reference in New Issue
Block a user