1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +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:
drh
2005-06-14 16:04:05 +00:00
parent 3f73708ce4
commit 556b2a2322
4 changed files with 25 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
C Fix\sa\sbug\sin\sthe\sdefault\sbusy\shandler\sfor\ssystems\sthat\slack\susleep().\nTicket\s#1284.\s(CVS\s2514)
D 2005-06-14T02:24:32
C Provide\sthe\sSQLITE_FILE_HEADER\scommand-line\soption\sfor\schanging\sthe\stext\nthat\sappears\sat\sthe\sbeginning\sof\sdatabases.\s(CVS\s2515)
D 2005-06-14T16:04:06
F Makefile.in 8129e7f261d405db783676f9ca31e0841768c652
F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -30,7 +30,7 @@ F sqlite3.pc.in 985b9bf34192a549d7d370e0f0b6b34a4f61369a
F src/alter.c 03041f2464e22532601254f87cb49997fa21dcdf
F src/attach.c 3615dbe960cbee4aa5ea300b8a213dad36527b0f
F src/auth.c 18c5a0befe20f3a58a41e3ddd78f372faeeefe1f
F src/btree.c d2e09ebf755bfd665727133361b22c6a915b12d7
F src/btree.c a167f412cf5b269bffba925ac55a1c0a2f749e29
F src/btree.h 41a71ce027db9ddee72cb43df2316bbe3a1d92af
F src/build.c b6db069ef2e1e1b21460857f498d45a9c0080fe8
F src/callback.c 0910b611e0c158f107ee3ff86f8a371654971e2b
@@ -75,7 +75,7 @@ F src/tokenize.c d89743f2c0d05d49b5b4d6462432a1f3cc4765f1
F src/trigger.c f51dec15921629591cb98bf2e350018e268b109a
F src/update.c e96c7b342cd8903c672162f4cf84d2c737943347
F src/utf.c bda5eb85039ef16f2d17004c1e18c96e1ab0a80c
F src/util.c 96008b52604d08b9cc57ed37350149d6ac8a1bf3
F src/util.c 1cdce9ae9fd17307e00848d63e3bc3300ca7c9fc
F src/vacuum.c 829d9e1a6d7c094b80e0899686670932eafd768c
F src/vdbe.c c2511f392598928254504e3b2c5ec47f4fef2b53
F src/vdbe.h 75e466d84d362b0c4498978a9d6b1e6bd32ecf3b
@@ -281,7 +281,7 @@ F www/tclsqlite.tcl 425be741b8ae664f55cb1ef2371aab0a75109cf9
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
F www/whentouse.tcl 528299b8316726dbcc5548e9aa0648c8b1bd055b
P 95256d953c179372dcc5ead6c407672c8161a8c1
R 815fb7da58112e0d675890ca68b74255
P a42cb81d1173532537aed4e71091d4cd3f3a88a0
R 3034c179d87c7ef731d375237e170820
U drh
Z 492e3cae79332462e050d4e103baeade
Z 61021d8b64c85b9238f7e2438ffbd52e

View File

@@ -1 +1 @@
a42cb81d1173532537aed4e71091d4cd3f3a88a0
3d7ee5b92d7e30f90cb7a8b3efd649b36480b61b

View File

@@ -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

View File

@@ -14,7 +14,7 @@
** This file contains functions for allocating memory, comparing
** strings, and stuff like that.
**
** $Id: util.c,v 1.136 2005/06/06 15:06:39 drh Exp $
** $Id: util.c,v 1.137 2005/06/14 16:04:06 drh Exp $
*/
#include "sqliteInt.h"
#include <stdarg.h>
@@ -372,8 +372,8 @@ void sqlite3SetString(char **pz, ...){
zResult += strlen(zResult);
}
va_end(ap);
#ifdef SQLITE_DEBUG
#if SQLITE_DEBUG>1
#ifdef SQLITE_MEMDEBUG
#if SQLITE_MEMDEBUG>1
fprintf(stderr,"string at 0x%x is %s\n", (int)*pz, *pz);
#endif
#endif