./databases/sqlite3, SQL Database Engine in a C Library

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]

Branch: CURRENT, Version: 3.22.0, Package name: sqlite3-3.22.0, Maintainer: pkgsrc-users

SQLite is a C library that implements an SQL database engine. Programs
that link with the SQLite library can have SQL database access without
running a separate RDBMS process. The distribution comes with a standalone
command-line access program (sqlite) that can be used to administer an
SQLite database and which serves as an example of how to use the SQLite

SQLite is not a client library used to connect to a big database server.
SQLite is the server. The SQLite library reads and writes directly to and
from the database files on disk.

This is sqlite3, the current stable version.

Required to build:

Package options: fts

Master sites:

SHA1: 2fb24ec12001926d5209d2da90d252b9825366ac
RMD160: c7d898b35c9b2eaa3d4b9dbdd57582d7836979bb
Filesize: 2582.665 KB

Version history: (Expand)

CVS history: (Expand)

   2018-01-24 14:44:14 by Adam Ciarcinski | Files touched by this commit (8) | Package updated
Log message:
sqlite3: updated to 3.22.0

Release 3.22.0:
The output of sqlite3_trace_v2() now shows each individual SQL statement run \ 
within a trigger.
Add the ability to read from WAL mode databases even if the application lacks \ 
write permission on the database and its containing directory, as long as the \ 
-shm and -wal files exist in that directory.
Added the rtreecheck() scalar SQL function to the R-Tree extension.
Added the sqlite3_vtab_nochange() and sqlite3_value_nochange() interfaces to \ 
help virtual table implementations optimize UPDATE operations.
Added the sqlite3_vtab_collation() interface.
Added support for the "^" initial token syntax in FTS5.
New extensions:
The Zipfile virtual table can read and write a ZIP Archive.
Added the fsdir(PATH) table-valued function to the fileio.c extension, for \ 
listing the files in a directory.
The sqlite_btreeinfo eponymous virtual table for introspecting and estimating \ 
the sizes of the btrees in a database.
The Append VFS is a VFS shim that allows an SQLite database to be appended to \ 
some other file. This allows (for example) a database to be appended to an \ 
executable that then opens and reads the database.
Query planner enhancements:
The optimization that uses an index to quickly compute an aggregate min() or \ 
max() is extended to work with indexes on expressions.
The decision of whether to implement a FROM-clause subquery as a co-routine or \ 
using query flattening now considers whether the result set of the outer query \ 
is "complex" (if it contains functions or expression subqueries). A \ 
complex result set biases the decision toward the use of co-routines.
The planner avoids query plans that use indexes with unknown collating functions.
The planner omits unused LEFT JOINs even if they are not the right-most joins of \ 
a query.
Other performance optimizations:
A smaller and faster implementation of text to floating-point conversion \ 
subroutine: sqlite3AtoF().
The Lemon parser generator creates a faster parser.
Use the strcspn() C-library routine to speed up the LIKE and GLOB operators.
Improvements to the command-line shell:
The ".schema" command shows the structure of virtual tables.
Added support for reading and writing SQL Archive files using the .archive command.
Added the experimental .expert command
Added the ".eqp trigger" variant of the ".eqp" command
Enhance the ".lint fkey-indexes" command so that it works with WITHOUT \ 
ROWID tables.
If the filename argument to the shell is a ZIP archive rather than an SQLite \ 
database, then the shell automatically opens that ZIP archive using the Zipfile \ 
virtual table.
Added the edit() SQL function.
Added the .excel command to simplify exporting database content to a spreadsheet.
Databases are opened using Append VFS when the --append flag is used on the \ 
command line or with the .open command.
Enhance the SQLITE_ENABLE_UPDATE_DELETE_LIMIT compile-time option so that it \ 
works for WITHOUT ROWID tables.
Provide the sqlite_offset(X) SQL function that returns the byte offset into the \ 
database file to the beginning of the record holding value X, when compiling \ 
Bug fixes
   2017-11-30 17:45:43 by Adam Ciarcinski | Files touched by this commit (654) | Package updated
Log message:
Revbump after textproc/icu update
   2017-10-30 19:36:13 by Adam Ciarcinski | Files touched by this commit (8) | Package updated
Log message:
sqlite3: updated to 3.21.0

Release 3.21.0:

Take advantage of the atomic-write capabilities in the F2FS filesystem when \ 
available, for greatly reduced transaction overhead. This currently requires the \ 
Allow ATTACH and DETACH commands to work inside of a transaction.
Allow WITHOUT ROWID virtual tables to be writable if the PRIMARY KEY contains \ 
exactly one column.
The "fsync()" that occurs after the header is written in a WAL reset \ 
now uses the sync settings for checkpoints. This means it will use a \ 
"fullfsync" on macs if PRAGMA checkpoint_fullfsync set on.
The sqlite3_sourceid() function tries to detect if the source code has been \ 
modified from what is checked into version control and if there are \ 
modifications, the last four characters of the version hash are shown as \ 
"alt1" or "alt2". The objective is to detect accidental \ 
and/or careless edits. A forger can subvert this feature.
Improved de-quoting of column names for CREATE TABLE AS statements with an \ 
aggregate query on the right-hand side.
Fewer "stat()" system calls issued by the unix VFS.
Enhanced the LIKE optimization so that it works with an ESCAPE clause.
Enhanced PRAGMA integrity_check and PRAGMA quick_check to detect obscure row \ 
corruption that they were formerly missing. Also update both pragmas so that \ 
they return error text rather than SQLITE_CORRUPT when encountering corruption \ 
in records.
The query planner now prefers to implement FROM-clause subqueries using \ 
co-routines rather using the query flattener optimization. Support for the use \ 
of co-routines for subqueries may no longer be disabled.
Pass information about !=, IS, IS NOT, NOT NULL, and IS NULL constraints into \ 
the xBestIndex method of virtual tables.
Enhanced the CSV virtual table so that it accepts the last row of input if the \ 
final new-line character is missing.
Remove the rarely-used "scratch" memory allocator. Replace it with the \ 
SQLITE_CONFIG_SMALL_MALLOC configuration setting that gives SQLite a hint that \ 
large memory allocations should be avoided when possible.
Added the swarm virtual table to the existing union virtual table extension.
Added the sqlite_dbpage virtual table for providing direct access to pages of \ 
the database file. The source code is built into the amalgamation and is \ 
activated using the -DSQLITE_ENABLE_DBPAGE_VTAB compile-time option.
Add a new type of fts5vocab virtual table - "instance" - that provides \ 
direct access to an FTS5 full-text index at the lowest possible level.
Remove a call to rand_s() in the Windows VFS since it was causing problems in \ 
Firefox on some older laptops.
The src/shell.c source code to the command-line shell is no longer under version \ 
control. That file is now generated as part of the build process.
Miscellaneous microoptimizations reduce CPU usage by about 2.1%.
Bug fixes
   2017-09-18 11:53:40 by Maya Rashish | Files touched by this commit (676)
Log message:
revbump for requiring ICU 59.x
   2017-08-25 07:27:53 by Adam Ciarcinski | Files touched by this commit (6)
Log message:
Release 3.20.1:
Fix a potential memory leak in the new sqlite3_result_pointer() interface.
   2017-08-02 18:14:59 by Adam Ciarcinski | Files touched by this commit (4) | Package updated
Log message:
Release 3.20.0:

1. Update the text of error messages returned by sqlite3_errmsg() for some error \ 
2. Add new pointer passing interfaces.
3. Backwards-incompatible changes to some extensions in order to take advantage \ 
of the improved security offered by the new pointer passing interfaces:
  a. Extending FTS5 → requires sqlite3_bind_pointer() to find the fts5_api \ 
  b. carray(PTR,N) → requires sqlite3_bind_pointer() to set the PTR parameter.
  c. remember(V,PTR) → requires sqlite3_bind_pointer() to set the PTR parameter.
4. Added the SQLITE_STMT virtual table extension.
5. Added the COMPLETION extension - designed to suggest tab-completions for \ 
interactive user interfaces. This is a work in progress. Expect further \ 
enhancements in future releases.
6. Added the UNION virtual table extension.
7. The built-in date and time functions have been enhanced so that they can be \ 
used in CHECK constraints, in indexes on expressions, and in the WHERE clauses \ 
of partial indexes, provided that they do not use the 'now', 'localtime', or \ 
'utc' keywords. Futher information.
8. Added the sqlite3_prepare_v3() and sqlite3_prepare16_v3() interfaces with the \ 
extra "prepFlags" parameters.
9. Provide the SQLITE_PREPARE_PERSISTENT flag for sqlite3_prepare_v3() and use \ 
it to limit lookaside memory misuse by FTS3, FTS5, and the R-Tree extension.
10. Added the PRAGMA secure_delete=FAST command. When secure_delete is set to \ 
FAST, old content is overwritten with zeros as long as that does not increase \ 
the amount of I/O. Deleted content might still persist on the free-page list but \ 
will be purged from all b-tree pages.
11. Enhancements to the command-line shell:
  a. Add support for tab-completion using the COMPLETION extension, for both \ 
readline and linenoise.
  b. Add the ".cd" command.
  c. Enhance the ".schema" command to show the schema of all attached \ 
  d. Enhance ".tables" so that it shows the schema names for all \ 
attached if the name is anything other than "main".
  e. The ".import" command ignores an initial UTF-8 BOM.
  f. Added the "--newlines" option to the ".dump" command to \ 
cause U+000a and U+000d characters to be output literally rather than escaped \ 
using the replace() function.
12. Query planner enhancements:
  a. When generating individual loops for each ORed term of an OR scan, move any \ 
constant WHERE expressions outside of the loop, as is done for top-level loops.
  b. The query planner examines the values of bound parameters to help determine \ 
if a partial index is usable.
  c. When deciding between two plans with the same estimated cost, bias the \ 
selection toward the one that does not use the sorter.
  d. Evaluate WHERE clause constraints involving correlated subqueries last, in \ 
the hope that they never have be evaluated at all.
  e. Do not use the flattening optimization for a sub-query on the RHS of a LEFT \ 
JOIN if that subquery reads data from a virtual table as doing so prevents the \ 
query planner from creating automatic indexes on the results of the sub-query, \ 
which can slow down the query.
SQLITE_STMTSTATUS_MEMUSED options for the sqlite3_stmt_status() interface.
14. Provide PRAGMA functions for PRAGMA integrity_check, PRAGMA quick_check, and \ 
PRAGMA foreign_key_check.
15. Add the -withoutnulls option to the TCL interface eval method.
16. Enhance the sqlite3_analyzer.exe utility program so that it shows the number \ 
of bytes of metadata on btree pages.
compile-time option enable the query planner stability guarantee. See also \ 
ticket 892fc34f173e99d8
18. Miscellaneous optimizations result in a 2% reduction in CPU cycles used.

Bug Fixes:

19. Fix the behavior of sqlite3_column_name() for queries that use the \ 
flattening optimization so that the result is consistent with other queries that \ 
do not use that optimization, and with PostgreSQL, MySQL, and SQLServer. Ticket \ 
20. Fix the query planner so that it knows not to use automatic indexes on the \ 
right table of LEFT JOIN if the WHERE clause uses the IS operator. Fix for \ 
21. Ensure that the query planner knows that any column of a flattened LEFT JOIN \ 
can be NULL even if that column is labeled with "NOT NULL". Fix for \ 
ticket 892fc34f173e99d8.
22. Fix rare false-positives in PRAGMA integrity_check when run on a database \ 
connection with attached databases. Ticket a4e06e75a9ab61a12
23. Fix a bug (discovered by OSSFuzz) that causes an assertion fault if certain \ 
dodgy CREATE TABLE declarations are used.
   2017-06-10 21:14:00 by Adam Ciarcinski | Files touched by this commit (8)
Log message:
Release 3.19.3:
Fix a bug associated with auto_vacuum that can lead to database corruption. The \ 
bug was introduced in version 3.16.0.
   2017-05-31 19:31:51 by Adam Ciarcinski | Files touched by this commit (6)
Log message:
SQLite Release 3.19.2 On 2017-05-25

Fix more bugs in the LEFT JOIN flattening optimization. Ticket 7fde638e94287d2c.

Changes carried forward from version 3.19.1 (2017-05-24):

Fix a bug in the LEFT JOIN flattening optimization. Ticket cad1ab4cb7b0fc.
Remove a surplus semicolon that was causing problems for older versions of MSVC.