Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch application-id Excluding Merge-Ins
This is equivalent to a diff from faedaeac to 5a500848
2013-05-03
| ||
15:23 | Allocate meta(8) in the header as the "application ID" and add the "PRAGMA application_id" command to query and set it. (check-in: b2efe4f2 user: drh tags: trunk) | |
2013-05-02
| ||
17:37 | Minor fixes for compilation with SQLITE_OMIT_WAL defined. (check-in: b81e87e7 user: dan tags: trunk) | |
00:15 | Begin inserting some experimental code for the next generation query planner. (check-in: ccaf4c3f user: drh tags: nextgen-query-plan-exp) | |
2013-05-01
| ||
20:40 | Fix comments in the magic number file. (Closed-Leaf check-in: 5a500848 user: drh tags: application-id) | |
20:36 | Preserve the application-ID across VACUUM. Updates to the magic number file. (check-in: 4a190bea user: drh tags: application-id) | |
19:49 | Allocate 4 bytes of unused header space for an "Application ID". Add the "PRAGMA application_id" command to set and query this identifier. Add the "magic.txt" file to show how the posix file command might use this application id. (check-in: 28c9e7fd user: drh tags: application-id) | |
17:58 | Do not use a transitive constraint to an IN operator where the RHS is a constant if there exists a direct == operator to another table in an outer loop. (check-in: faedaeac user: drh tags: trunk) | |
17:22 | Avoid redundant constraint checking due to transitive constraints. (check-in: 329478cb user: drh tags: trunk) | |
Added magic.txt.
|
Changes to src/btree.h.
︙ | |||
136 137 138 139 140 141 142 143 144 145 146 147 148 149 | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | + | #define BTREE_SCHEMA_VERSION 1 #define BTREE_FILE_FORMAT 2 #define BTREE_DEFAULT_CACHE_SIZE 3 #define BTREE_LARGEST_ROOT_PAGE 4 #define BTREE_TEXT_ENCODING 5 #define BTREE_USER_VERSION 6 #define BTREE_INCR_VACUUM 7 #define BTREE_APPLICATION_ID 8 /* ** Values that may be OR'd together to form the second argument of an ** sqlite3BtreeCursorHints() call. */ #define BTREE_BULKLOAD 0x00000001 |
︙ |
Changes to src/pragma.c.
︙ | |||
1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 | 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 | + + + + + | #ifndef SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS /* ** PRAGMA [database.]schema_version ** PRAGMA [database.]schema_version = <integer> ** ** 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 ** stored in the database header. ** ** The schema-cookie is usually only manipulated internally by SQLite. It |
︙ | |||
1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 | 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 | + + + + | ** ** The user-version is not used internally by SQLite. It may be used by ** applications for any purpose. */ 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; case 's': case 'S': iCookie = BTREE_SCHEMA_VERSION; break; default: |
︙ |
Changes to src/vacuum.c.
︙ | |||
285 286 287 288 289 290 291 292 293 294 295 296 297 298 | 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | + | ** connections to the same database will know to reread the schema. */ static const unsigned char aCopy[] = { BTREE_SCHEMA_VERSION, 1, /* Add one to the old schema cookie */ BTREE_DEFAULT_CACHE_SIZE, 0, /* Preserve the default page cache size */ BTREE_TEXT_ENCODING, 0, /* Preserve the text encoding */ BTREE_USER_VERSION, 0, /* Preserve the user version */ BTREE_APPLICATION_ID, 0, /* Preserve the application id */ }; assert( 1==sqlite3BtreeIsInTrans(pTemp) ); assert( 1==sqlite3BtreeIsInTrans(pMain) ); /* Copy Btree meta values */ for(i=0; i<ArraySize(aCopy); i+=2){ |
︙ |
Changes to test/pragma.test.
︙ | |||
932 933 934 935 936 937 938 939 940 941 942 943 944 945 | 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 | + + + + + + + + + + | } return "disk" } } return "unknown" } # Application_ID # do_test pragma-8.3.1 { execsql { PRAGMA application_id; } } {0} do_test pragma-8.3.2 { execsql {PRAGMA Application_ID(12345); PRAGMA application_id;} } {12345} # Test temp_store and temp_store_directory pragmas # ifcapable pager_pragmas { do_test pragma-9.1 { db close sqlite3 db test.db |
︙ |
Changes to tool/showdb.c.
︙ | |||
172 173 174 175 176 177 178 | 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | - + | print_decode_line(aData, 40, 4, "Schema cookie"); print_decode_line(aData, 44, 4, "Schema format version"); print_decode_line(aData, 48, 4, "Default page cache size"); print_decode_line(aData, 52, 4, "Largest auto-vac root page"); print_decode_line(aData, 56, 4, "Text encoding"); print_decode_line(aData, 60, 4, "User version"); print_decode_line(aData, 64, 4, "Incremental-vacuum mode"); |
︙ |