diff options
author | drh <drh@noemail.net> | 2013-05-03 15:23:24 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2013-05-03 15:23:24 +0000 |
commit | bce5beee18befa9b3ee47938e9e4c3e2e572cf3c (patch) | |
tree | a0cf46c116eed0a7be36027c725506009db5d497 /src/pragma.c | |
parent | 32c12fe2bb8e4405db53918204d192760655e51a (diff) | |
parent | 8a28a310281f08c81d0f1c1461ba71f6bf32397c (diff) | |
download | sqlite-bce5beee18befa9b3ee47938e9e4c3e2e572cf3c.tar.gz sqlite-bce5beee18befa9b3ee47938e9e4c3e2e572cf3c.zip |
Allocate meta(8) in the header as the "application ID" and add the
"PRAGMA application_id" command to query and set it.
FossilOrigin-Name: b2efe4f225adc5f4c2e3080bf459cc52fff82e18
Diffstat (limited to 'src/pragma.c')
-rw-r--r-- | src/pragma.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pragma.c b/src/pragma.c index 65efbd8b2..3056a7d8e 100644 --- a/src/pragma.c +++ b/src/pragma.c @@ -1567,6 +1567,11 @@ void sqlite3Pragma( ** PRAGMA [database.]user_version ** PRAGMA [database.]user_version = <integer> ** + ** PRAGMA [database.]freelist_count = <integer> + ** + ** PRAGMA [database.]application_id + ** PRAGMA [database.]application_id = <integer> + ** ** The pragma's schema_version and user_version are used to set or get ** the value of the schema-version and user-version, respectively. Both ** the schema-version and the user-version are 32-bit signed integers @@ -1588,10 +1593,14 @@ void sqlite3Pragma( if( sqlite3StrICmp(zLeft, "schema_version")==0 || sqlite3StrICmp(zLeft, "user_version")==0 || sqlite3StrICmp(zLeft, "freelist_count")==0 + || sqlite3StrICmp(zLeft, "application_id")==0 ){ int iCookie; /* Cookie index. 1 for schema-cookie, 6 for user-cookie. */ sqlite3VdbeUsesBtree(v, iDb); switch( zLeft[0] ){ + case 'a': case 'A': + iCookie = BTREE_APPLICATION_ID; + break; case 'f': case 'F': iCookie = BTREE_FREE_PAGE_COUNT; break; |