Index: pages/34to35.in ================================================================== --- pages/34to35.in +++ pages/34to35.in @@ -50,11 +50,11 @@ HEADING 1 {Overview Of Changes} PARAGRAPH { A quick enumeration of the changes in SQLite version 3.5.0 - is provide here. Subsequent sections will describe these + is provided here. Subsequent sections will describe these changes in more detail. } PARAGRAPH {
When SQLite is ported to new operation systems (operating systems +
When SQLite is ported to new operating systems (operating systems other than Unix, Windows, and OS/2 for which ports are provided together with the core) two new functions, [sqlite3_os_init()] and [sqlite3_os_end()], must be provided as part of the port.
The [sqlite3_initialize()] interface can be called to explicitly initialize the SQLite subsystem. The [sqlite3_initialize()] interface is called automatically when invoking certain interfaces so the use of [sqlite3_initialize()] is not required, but it is recommended.
The [sqlite3_shutdown()] interface causes SQLite release any +
The [sqlite3_shutdown()] interface causes SQLite to release any system resources (memory allocations, mutexes, open file handles) - that it might have been allocated by [sqlite3_initialize()].
The [sqlite3_next_stmt()] interface allows an application to discover all [prepared statements] associated with a [database connection].
Added the [page_count] PRAGMA for returning the size of the underlying Index: pages/appfileformat.in ================================================================== --- pages/appfileformat.in +++ pages/appfileformat.in @@ -56,11 +56,11 @@
We make a distinction between a "file format" and an "application format". A file format is used to store a single object. So, for example, a GIF or JPEG file stores a single image, and an XHTML file stores text, so those are "file formats" and not "application formats". An EPUB file, in contrast, stores both text and images (as contained XHTML and GIF/JPEG -files) and so it is considered a "application format". This article is +files) and so it is considered an "application format". This article is about "application formats".
The boundary between a file format and an application format is fuzzy. This article calls JPEG a file format, but for an image editor, JPEG might be considered the application format. Much depends on context. @@ -153,11 +153,11 @@ the entire document.
But an SQLite database is not limited to a simple key/value structure like a pile-of-files database. An SQLite database can have dozens -or hundreds or thousands of different of tables, with dozens or +or hundreds or thousands of different tables, with dozens or hundreds or thousands of fields per table, each with different datatypes and constraints and particular meanings, all cross-referencing each other, appropriately and automatically indexed for rapid retrieval, and all stored efficiently and compactly in a single disk file. And all of this structure is succinctly documented for humans @@ -228,11 +228,11 @@
A pile-of-files format can be viewed as a key/value database. A key/value database is better than no database at all. But without transactions or indices or a high-level query language or a proper schema, -it much harder and more error prone to use a key/value database than +it is much harder and more error prone to use a key/value database than a relational database.
Accessible Content. Information held in an SQLite database file is accessible using commonly available open-source command-line tools - tools that @@ -296,11 +296,11 @@
SQLite also supports continuous update. Instead of collecting changes in memory and then writing them to disk only on a File/Save action, changes can be written back to the disk as they occur. This avoids loss of work on a system crash or power failure. An [automated undo/redo stack], managed using triggers, -can be kept in the on-disk database, meaning that undo/redo can occur +can be kept in the on-disk database, meaning that undo/redo can occur across session boundaries.
Easily Extensible.
As an application grows, new features can be added to an
SQLite application file format simply by adding new tables to the schema
Index: pages/atomiccommit.in
==================================================================
--- pages/atomiccommit.in
+++ pages/atomiccommit.in
@@ -789,11 +789,11 @@
When the original content of a database page is written into the rollback journal (as shown in section 3.5), -SQLite always writes a complete sectors worth of data, even if the +SQLite always writes a complete sector of data, even if the page size of the database is smaller than the sector size. Historically, the sector size in SQLite has been hard coded to 512 bytes and since the minimum page size is also 512 bytes, this has never been an issue. But beginning with SQLite version 3.3.14, it is possible for SQLite to use mass storage devices with a sector size larger than 512 @@ -1109,11 +1109,11 @@
-PRAGMA journal_mode=PERSIST;
The use of persistent journal mode provide a noticeable performance +
The use of persistent journal mode provides a noticeable performance improvement on many systems. Of course, the drawback is that the journal files remain on the disk, using disk space and cluttering directories, long after the transaction commits. The only safe way to delete a persistent journal file is to commit a transaction with journaling mode set to DELETE:
@@ -1238,11 +1238,11 @@SQLite uses the fsync() system call on Unix and the FlushFileBuffers() system call on w32 in order to sync the file system buffers onto disk -oxide as shown in step 3.7 and +oxide as shown in step 3.7 and step 3.10. Unfortunately, we have received reports that neither of these interfaces works as advertised on many systems. We hear that FlushFileBuffers() can be completely disabled using registry settings on some Windows versions. Some historical versions of Linux contain versions of fsync() which are no-ops on Index: pages/autoinc.in ================================================================== --- pages/autoinc.in +++ pages/autoinc.in @@ -97,11 +97,11 @@ ^The ROWID chosen for the new row is at least one larger than the largest ROWID that has ever before existed in that same table. ^If the table has never before contained any data, then a ROWID of 1 is used. ^If the table has previously held a row with the largest possible ROWID, then new INSERTs are not allowed and any attempt to insert a new row will fail with an -SQLITE_FULL error. ^(Only ROWID values from previously transactions that +SQLITE_FULL error. ^(Only ROWID values from previous transactions that were committed are considered. ROWID values that were rolled back are ignored and can be reused.)^
Index: pages/backup.in ================================================================== --- pages/backup.in +++ pages/backup.in @@ -124,16 +124,16 @@ pTo = (isSave ? pFile : pInMemory); /* Set up the backup procedure to copy from the "main" database of ** connection pFile to the main database of connection pInMemory. ** If something goes wrong, pBackup will be set to NULL and an error - ** code and message left in connection pTo. + ** code and message left in connection pTo. ** ** If the backup object is successfully created, call backup_step() ** to copy data from pFile to pInMemory. Then call backup_finish() ** to release resources associated with the pBackup object. If an - ** error occurred, then an error code and message will be left in + ** error occurred, then an error code and message will be left in ** connection pTo. If no error occurred, then the error code belonging ** to pTo is set to SQLITE_OK. */ pBackup = sqlite3_backup_init(pTo, "main", pFrom, "main"); if( pBackup ){ @@ -150,11 +150,11 @@ } }
- The C function to the right demonstrates of one of the simplest, + The C function to the right demonstrates one of the simplest, and most common, uses of the backup API: loading and saving the contents of an in-memory database to a file on disk. The backup API is used as follows in this example:
Whether or not the backup process is restarted as a result of writes to the source database mid-backup, the user can be sure that when the backup operation is completed the backup database contains a consistent and Index: pages/btreemodule.in ================================================================== --- pages/btreemodule.in +++ pages/btreemodule.in @@ -79,11 +79,11 @@ [h2 "Glossary"]
Current Status
Common LinksIndex: pages/news.in ================================================================== --- pages/news.in +++ pages/news.in @@ -16,10 +16,38 @@ regsub -all {[Tt]icket #(\d+)} $txt \ {\0} txt hd_resolve "$txt" hd_puts " " } + +newsitem {2016-04-18} {Release 3.12.2} { + Yikes! The 3.12.0 and 3.12.1 releases contain a backwards compatibility bug! + Tables that declare a column with type "INTEGER" PRIMARY KEY + (where the datatype name INTEGER is quoted) generate an incompatible + database file. The mistake came about because the developers have never + thought to put a typename in quotes before, and so there was no documentation + of that capability nor any tests. (There are tests now, though, of course.) + Instances of quoting the datatype name are probably infrequent in the wild, + so we do not expect the impact of this bug to be too severe. + Upgrading is still strongly recommended. + Fixes for three other minor issues were included in this patch release. + The other issues would have normally been deferred until the next scheduled + release, but since a patch release is being issued anyhow, they might as + well be included. +} + +newsitem {2016-04-08} {Release 3.12.1} { + SQLite [version 3.12.1] is an emergency patch release to address a + [https://www.sqlite.org/src/info/7f7f8026eda38|crash bug] that snuck + into [version 3.12.0]. Upgrading from version 3.12.0 is highly + recommended. + Another minor problem involving datatypes on [view] columns, and + a query planner deficiency are fixed at the same time. These two + issues did not justify a new release on their own, but since a release + is being issued to deal with the crash bug, we included these other + fixes for good measure. +} newsitem {2016-03-29} {Release 3.12.0} { SQLite [version 3.12.0] is a regularly scheduled maintenance release. A notable change in this release is an [increase in the default page size] for newly created database files. Index: pages/not-found.in ================================================================== --- pages/not-found.in +++ pages/not-found.in @@ -1,7 +1,7 @@ Page Not found+Page Not FoundThe document you seek is not available. Please consider one of the links below or use the Search feature on the right-hand side of the menu bar above. Index: pages/onefile.in ================================================================== --- pages/onefile.in +++ pages/onefile.in @@ -15,11 +15,11 @@ architectures. The SQLite database file format is also stable. -All releases of of SQLite version 3 can read and write database +All releases of SQLite version 3 can read and write database files created by the very first SQLite 3 release (version 3.0.0) going back to 2004-06-18. This is "backwards compatibility". The developers promise to maintain backwards compatibility of the database file format for all future releases of SQLite 3. "Forwards compatibility" means that older releases Index: pages/partialindex.in ================================================================== --- pages/partialindex.in +++ pages/partialindex.in @@ -36,11 +36,11 @@ ^The expression following the WHERE clause may contain operators, literal values, and names of columns in the table being indexed. -^The WHERE clause may not contains subqueries, references to other +^The WHERE clause may not contain subqueries, references to other tables, functions, or [bound parameters]. The LIKE, GLOB, MATCH, and REGEXP operators in SQLite are implemented as functions by the same name. ^Since functions are prohibited in the WHERE clause of a CREATE INDEX statement, so too are the LIKE, GLOB, MATCH, and REGEXP operators. Index: pages/pgszchng2016.in ================================================================== --- pages/pgszchng2016.in +++ pages/pgszchng2016.in @@ -22,11 +22,11 @@ page size for new database files has been increased to 4096 bytes.The upper bound on the database [cache_size|cache size] has -traditionally defaulted to 2000 page. SQLite [version 3.12.0] also +traditionally defaulted to 2000 pages. SQLite [version 3.12.0] also changes this default setting to be "-2000" which means 2000*1024 bytes, regardless of page size. So, the upper bound on the amount of memory used for the page cache is unchanged. Index: pages/pragma.in ================================================================== --- pages/pragma.in +++ pages/pragma.in @@ -800,12 +800,13 @@ the default page size was almost always 1024 bytes, but beginning with SQLite [version 3.12.0] in 2016, the default page size increased to 4096.^The page_size pragma will only cause an immediate change in the - page size if it is issued while the database is still empty, prior - to the first CREATE TABLE statement. ^(If the page_size pragma is + page size if it is issued while the database is still empty (prior + to the first CREATE statement) and if the database is not in + [WAL mode]. ^(If the page_size pragma is used to specify a new page size just prior to running the [VACUUM] command and if the database is not in [WAL | WAL journal mode] then [VACUUM] will change the page size to the new value.)^ Index: pages/quickstart.in ================================================================== --- pages/quickstart.in +++ pages/quickstart.in @@ -18,11 +18,11 @@At a shell or DOS prompt, enter: "sqlite3 test.db". This will create a new database named "test.db". (You can use a different name if you like.) Enter SQL commands at the prompt to create and populate the new database. Additional documentation is available [CLI | here] Additional documentation is available [CLI | here]. Write Programs That Use SQLite
Most SQL database engines are client/server based. Of those that are serverless, SQLite is the only one Index: pages/threadsafe.in ================================================================== --- pages/threadsafe.in +++ pages/threadsafe.in @@ -1,11 +1,11 @@ SQLite And Multiple Threads-SQLite support three different threading modes: +SQLite supports three different threading modes: |