-C Always\sinclude\s-lpthread\son\slink\slines\seven\sif\sit\sis\snot\sneeded.\s(CVS\s1968)
-D 2004-09-17T21:35:31
+C Up\sthe\sversion\snumber\sand\sprepare\sdocumentation\sfiles\sfor\sthe\s3.0.7\srelease.\s(CVS\s1969)
+D 2004-09-18T18:00:24
F Makefile.in 76f8790c727cdbe2e1bef19c9c72b6e5da9cb9d8
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
-F VERSION d28cfc2e7714a747851e50cc1a5ee8ab0ded7a78
+F VERSION 0aeddfe96f008f6cbe2c7167a782f3133e118d8d
F aclocal.m4 7daea4c35e88de30d5a3f6f7a2ab99720e803bbd
F art/SQLite.eps 9b43cc99cfd2be687d386faea6862ea68d6a72b2
F art/SQLite.gif 1bbb94484963f1382e27e1c5e86dd0c1061eba2b
F www/c_interface.tcl 83b39203e1ded4c2dab97f42edf31279a308efcb
F www/capi3.tcl 5c1cb163f4d2a54e2d0e22dcc399dd71245c8b89
F www/capi3ref.tcl 893977e2b1c8ae47a441335bc124cdc6d5fdbe95
-F www/changes.tcl 3641bc28b86b40c82d546727da45ea0f0aa9a9f4
+F www/changes.tcl 16a490bbe5520705861abf36387a5e6b8c18456a
F www/common.tcl f786e6be86fb2627ceb30e770e9efa83b9c67a3a
F www/conflict.tcl fb8a2ba83746c7fdfd9e52fa7f6aaf5c422b8246
F www/copyright-release.html 294e011760c439c44951a6bfecd4c81a1ae359e8
F www/copyright.tcl 82c9670c7ddb0311912ab7fe24703f33c531066c
F www/datatype3.tcl 2bb7dbfa4dd518a6e5fb3cb1cd8296797976d205
F www/datatypes.tcl 566004b81c36877397ddbe6e1907aae6065f6b41
-F www/docs.tcl 095b5718ec044156af477061566ea25632624b56
+F www/docs.tcl 4b5f7fca464e66ed7f929063a8b2b9e101ba902d
F www/download.tcl 958931d67680a2ff7044d5ed77ced1825a2a8c63
F www/dynload.tcl 02eb8273aa78cfa9070dd4501dca937fb22b466c
-F www/faq.tcl 3a1776818d9bd973ab0c3048ec7ad6b1ad091ae5
+F www/faq.tcl 8cf9f59fd93868c9954223a99db244c9975fa43b
F www/fileformat.tcl f71a06a0d533c7df408539c64113b4adeaf29764
F www/formatchng.tcl d1dfecedfb25e122ab513a1e0948b15cb4f0be46
-F www/index.tcl 618733d540dcf28226cc8eb00816f0baaa03064d
+F www/index.tcl 9c83cace23dc98be760c349a120b797f4a3292d7
F www/lang.tcl 604683def6e987db1703faf580d9b2150905fda1
F www/lockingv3.tcl afcd22f0f063989cff2f4d57bbc38d719b4c6e75
F www/mingw.tcl d96b451568c5d28545fefe0c80bee3431c73f69c
F www/nulls.tcl ede975a29def48838c606d4a0c0185d44f90a789
-F www/oldnews.tcl fbbdbb64ed602b0c92b03498578f7ac70f47753d
+F www/oldnews.tcl 6566f0a25fa6244ec68d0cf8cc5af2318c6bba1e
F www/omitted.tcl 7bd62b6f0f53b60c5360895b16b3af8407bbca03
F www/opcode.tcl e8c421fd2c70c503b25cedb3f9617a1f387ac7ea
-F www/quickstart.tcl 4e97bef825e6a4153c43afb9f97235fc4da278ab
+F www/quickstart.tcl 2ed129615479870b9f1f8b1527f21ebfcfb71e76
F www/speed.tcl 19cf0c1bf73c4b534dfafc95b3eacff4825740b4
F www/sqlite.tcl b51fd15f0531a54874de785a9efba323eecd5975
F www/support.tcl 96c8324cea27b5ded53ff5c60c127ba2053f688e
F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
-P 10b5e5173339cc7f052aace1b4056a057afe3e66
-R 8816ed45991f1ef6103b7b8a111b1d35
+P 46a96890f7008157bc3784fa7c8680edf6266673
+R 9332f2e0a7f749af2edc4a6fdcc065cd
U drh
-Z b109fb1b1eb544c33f3008b88b47c374
+Z 80e51f84d0f17d39d17db896014a47fe
-46a96890f7008157bc3784fa7c8680edf6266673
\ No newline at end of file
+63e4ed3cc698d660867c297cbedfc25f9eb7c40d
\ No newline at end of file
puts "<DD><P><UL>$desc</UL></P></DD>"
}
+chng {2004 September 18 (3.0.7)} {
+<li>The BTree module allocates large buffers using malloc() instead of
+ off of the stack, in order to play better on machines with limited
+ stack space.</li>
+<li>Fixed naming conflicts so that versions 2.8 and 3.0 can be
+ linked and used together in the same ANSI-C source file.</li>
+<li>New interface: sqlite3_bind_parameter_index()</li>
+<li>Add support for wildcard parameters of the form: "?nnn"</li>
+<li>Fix problems found on 64-bit systems.</li>
+<li>Removed encode.c file (containing unused routines) from the
+ version 3.0 source tree.</li>
+<li>The sqlite3_trace() callbacks occur before each statement
+ is executed, not when the statement is compiled.</li>
+<li>Makefile updates and miscellaneous bug fixes.</li>
+}
+
chng {2004 September 02 (3.0.6 beta)} {
<li>Better detection and handling of corrupt database files.</li>
<li>The sqlite3_step() interface returns SQLITE_BUSY if it is unable
# This script generates the "docs.html" page that describes various
# sources of documentation available for SQLite.
#
-set rcsid {$Id: docs.tcl,v 1.5 2004/06/17 19:04:17 drh Exp $}
+set rcsid {$Id: docs.tcl,v 1.6 2004/09/18 18:00:24 drh Exp $}
source common.tcl
header {SQLite Documentation}
puts {
puts {</td></tr>}
}
+doc {SQLite In 5 Minutes Or Less} {quickstart.html} {
+ A very quick introduction to programming with SQLite.
+}
+
doc {SQL Syntax} {lang.html} {
This document describes the SQL language that is understood by
SQLite.
#
# Run this script to generated a faq.html output file
#
-set rcsid {$Id: faq.tcl,v 1.24 2004/05/31 15:06:30 drh Exp $}
+set rcsid {$Id: faq.tcl,v 1.25 2004/09/18 18:00:24 drh Exp $}
source common.tcl
header {SQLite Frequently Asked Questions</title>}
<b>sqlite_last_insert_rowid()</b> which will return the integer key
for the most recent insert operation. See the API documentation for
details.</p>
+
+ <p>SQLite version 3.0 expands the size of the rowid to 64 bits.</p>
}
faq {
What datatypes does SQLite support?
} {
- <p>SQLite is typeless. All data is stored as null-terminated strings.
- The datatype information that follows the column name in CREATE TABLE
- statements is ignored (mostly). You can put any type of data you want
+ <p>SQLite ignores
+ the datatype information that follows the column name in CREATE TABLE.
+ You can put any type of data you want
into any column, without regard to the declared datatype of that column.
</p>
Such columns must hold an integer. An attempt to put a non-integer
value into an INTEGER PRIMARY KEY column will generate an error.</p>
- <p>There is a page on <a href="datatypes.html">datatypes in SQLite</a>
+ <p>There is a page on <a href="datatypes.html">datatypes in SQLite
+ version 2.8</a>
+ and another for <a href="datatype3.html">version 3.0</a>
that explains this concept further.</p>
}
faq {
SQLite lets me insert a string into a database column of type integer!
} {
- <p>This is a feature, not a bug. SQLite is typeless. Any data can be
+ <p>This is a feature, not a bug. SQLite does not enforce data type
+ constraints. Any data can be
inserted into any column. You can put arbitrary length strings into
integer columns, floating point numbers in boolean columns, or dates
in character columns. The datatype you assign to a column in the
this case, the constants 0 and 0.0 are treated a strings which means that
they are distinct.</p>
- <p>There is a page on <a href="datatypes.html">datatypes in SQLite</a>
+ <p>There is a page on <a href="datatypes.html">datatypes in SQLite
+ version 2.8</a>
+ and another for <a href="datatype3.html">version 3.0</a>
that explains this concept further.</p>
}
is done against '00'. '0'!='00' so the WHERE clause returns FALSE and
the count is zero.</p>
- <p>There is a page on <a href="datatypes.html">datatypes in SQLite</a>
+ <p>There is a page on <a href="datatypes.html">datatypes in SQLite
+ version 2.8</a>
+ and another for <a href="datatype3.html">version 3.0</a>
that explains this concept further.</p>
}
Are there any known size limits to SQLite databases?
} {
<p>As of version 2.7.4,
- SQLite can handle databases up to 2^41 bytes (2 terabytes)
+ SQLite can handle databases up to 2<sup>41</sup> bytes (2 terabytes)
in size on both Windows and Unix. Older version of SQLite
- were limited to databases of 2^31 bytes (2 gigabytes).</p>
-
- <p>SQLite arbitrarily limits the amount of data in one row to 1 megabyte.
- There is a single #define in the source code that can be changed to raise
- this limit as high as 16 megabytes if desired.</p>
-
- <p>There is a theoretical limit of about 2^32 (4 billion) rows
- in a single table, but this limit has never been tested.</p>
- There is also a theoretical limit of about 2^32
- tables and indices.</p>
+ were limited to databases of 2<sup>31</sup> bytes (2 gigabytes).</p>
- <p>The name and "CREATE TABLE" statement for a table must fit entirely
- within a 1-megabyte row of the SQLITE_MASTER table. Other than this,
- there are no constraints on the length of the name of a table, or on the
- number of columns, etc. Indices are similarly unconstrained.</p>
+ <p>SQLite version 2.8 limits the amount of data in one row to
+ 1 megabyte. SQLite version 3.0 has no limit on the amount of
+ data that can be stored in a single row.
+ </p>
<p>The names of tables, indices, view, triggers, and columns can be
as long as desired. However, the names of SQL functions (as created
faq {
What is the maximum size of a VARCHAR in SQLite?
} {
- <p>Remember, SQLite is typeless. A VARCHAR column can hold as much
- data as any other column. The total amount of data in a single row
- of the database is limited to 1 megabyte. You can increase this limit
- to 16 megabytes, if you need to, by adjusting a single #define in the
- source tree and recompiling.</p>
-
- <p>For maximum speed and space efficiency, you should try to keep the
- amount of data in a single row below about 230 bytes.</p>
+ <p>SQLite does not enforce datatype constraints.
+ A VARCHAR column can hold as much data as you care to put it in.</p>
}
faq {
Does SQLite support a BLOB type?
} {
- <p>You can declare a table column to be of type "BLOB" but it will still
- only store null-terminated strings. This is because the only way to
- insert information into an SQLite database is using an INSERT SQL statement,
- and you can not include binary data in the middle of the ASCII text string
- of an INSERT statement.</p>
-
- <p>SQLite is 8-bit clean with regard to the data it stores as long as
- the data does not contain any '\000' characters. If you want to store binary
- data, consider encoding your data in such a way that it contains no NUL
- characters and inserting it that way. You might use URL-style encoding:
- encode NUL as "%00" and "%" as "%25". Or, you might consider encoding your
- binary data using base-64. There is a source file named
- "<b>src/encode.c</b>" in the SQLite distribution that contains
+ <p>SQLite version 3.0 lets you puts BLOB data into any column, even
+ columns that are declared to hold some other type.</p>
+
+ <p>SQLite version 2.8 would hold store text data without embedded
+ '\000' characters. If you need to store BLOB data in SQLite version
+ 2.8 you'll want to encode that data first.
+ There is a source file named
+ "<b>src/encode.c</b>" in the SQLite version 2.8 distribution that contains
implementations of functions named "<b>sqlite_encode_binary()</b>
and <b>sqlite_decode_binary()</b> that can be used for converting
binary data to ASCII and back again, if you like.</p>
faq {
How do I add or delete columns from an existing table in SQLite.
} {
- <p>SQLite does not support the "ALTER TABLE" SQL command. If you
+ <p>SQLite does yes not support the "ALTER TABLE" SQL command. If you
what to change the structure of a table, you have to recreate the
table. You can save existing data to a temporary table, drop the
old table, create the new table, then copy the data back in from
to any part of the code. You can do anything you want with it.</p>
}
+faq {
+ How do I use a string literal that contains an embedded single-quote (')
+ character?
+} {
+ <p>The SQL standard specifies that single-quotes in strings are escaped
+ by putting two single quotes in a row. SQL works like the Pascal programming
+ language in the regard. SQLite follows this standard. Example:
+ </p>
+
+ <blockquote><pre>
+ INSERT INTO xyz VALUES('5 O''clock');
+ </pre></blockquote>
+}
+
# End of questions and answers.
#############
</p>
<p><ul>
-<li>ACID (Atomic, Consistent, Isolated, Durable) transactions.</li>
+<li>Transaction are atomic, consistent, isolated, and durable (ACID)
+ even after system crashes and power failures.
<li>Zero-configuration - no setup or administration needed.</li>
<li>Implements most of SQL92.
(<a href="omitted.html">Features not supported</a>)</li>
<li>A complete database is stored in a single disk file.</li>
<li>Database files can be freely shared between machines with
different byte orders.</li>
-<li>Supports databases up to 2 terabytes (2^41 bytes) in size.</li>
-<li>Small memory footprint: less than 30K lines of C code,
+<li>Supports databases up to 2 terabytes (2<sup>41</sup> bytes) in size.</li>
+<li>Sizes of strings and BLOBs limited only by available memory.</li>
+<li>Small code footprint: less than 30K lines of C code,
less than 250KB code space (gcc on i486)</li>
-<li><a href="speed.html">Faster</a> than other popular database
+<li><a href="speed.html">Faster</a> than popular client/server database
engines for most common operations.</li>
<li>Simple, easy to use <a href="c_interface.html">API</a>.</li>
<li><a href="tclsqlite.html">TCL bindings</a> included.
puts "<hr width=\"50%\">"
}
-newsitem {2004-Sep-02} {Version 3.0.6 (beta)} {
- Because of some important changes to sqlite3_step(),
- we have decided to
- do an additional beta release prior to the first "stable" release.
- If no serious problems are discovered in this version, we will
- release version 3.0 "stable" in about a week.
-}
-
-
-newsitem {2004-Aug-29} {Version 3.0.5 (beta)} {
- The fourth beta release of SQLite version 3.0 is now available.
- The next release is expected to be called "stable".
-}
-
-
-newsitem {2004-Aug-08} {Version 3.0.4 (beta)} {
- The third beta release of SQLite version 3.0 is now available.
- This new beta fixes several bugs including a database corruption
- problem that can occur when doing a DELETE while a SELECT is pending.
- Expect at least one more beta before version 3.0 goes final.
+newsitem {2004-Sep-18} {Version 3.0.7} {
+ Version 3.0 has now been in use by multiple projects for several
+ months with no major difficulties. We consider it stable and
+ ready for production use.
}
<p align="right"><a href="oldnews.html">Old news...</a></p>
</td></tr></table>
}
-footer {$Id: index.tcl,v 1.95 2004/09/02 16:53:12 drh Exp $}
+footer {$Id: index.tcl,v 1.96 2004/09/18 18:00:24 drh Exp $}
puts "<hr width=\"50%\">"
}
+newsitem {2004-Sep-02} {Version 3.0.6 (beta)} {
+ Because of some important changes to sqlite3_step(),
+ we have decided to
+ do an additional beta release prior to the first "stable" release.
+ If no serious problems are discovered in this version, we will
+ release version 3.0 "stable" in about a week.
+}
+
+
+newsitem {2004-Aug-29} {Version 3.0.5 (beta)} {
+ The fourth beta release of SQLite version 3.0 is now available.
+ The next release is expected to be called "stable".
+}
+
+
+newsitem {2004-Aug-08} {Version 3.0.4 (beta)} {
+ The third beta release of SQLite version 3.0 is now available.
+ This new beta fixes several bugs including a database corruption
+ problem that can occur when doing a DELETE while a SELECT is pending.
+ Expect at least one more beta before version 3.0 goes final.
+}
+
newsitem {2004-Jly-22} {Version 3.0.3 (beta)} {
The second beta release of SQLite version 3.0 is now available.
This new beta fixes many bugs and adds support for databases with
Plans are to continue to support SQLite version 2.8 with
bug fixes. But all new development will occur in version 3.0.
}
-footer {$Id: oldnews.tcl,v 1.4 2004/08/09 00:04:05 drh Exp $}
+footer {$Id: oldnews.tcl,v 1.5 2004/09/18 18:00:24 drh Exp $}
#
# Run this TCL script to generate HTML for the quickstart.html file.
#
-set rcsid {$Id: quickstart.tcl,v 1.4 2003/02/15 23:09:17 drh Exp $}
-
-puts {<html>
-<head><title>SQLite In 5 Minutes Or Less</title></head>
-<body bgcolor=white>
-<h1 align=center>SQLite In 5 Minutes Or Less</h1>}
-
+set rcsid {$Id: quickstart.tcl,v 1.5 2004/09/18 18:00:24 drh Exp $}
+source common.tcl
+header {SQLite In 5 Minutes Or Less}
puts {
<p>Here is what you do to start experimenting with SQLite without having
to do a lot of tedious reading and configuration:</p>
<h2>Download The Code</h2>
<ul>
-<li><p>Get a copy of the prebuild binaries for your machine, or get a copy
+<li><p>Get a copy of the prebuilt binaries for your machine, or get a copy
of the sources and compile them yourself. Visit
the <a href="download.html">download</a> page for more information.</p></li>
</ul>
<h2>Create A New Database</h2>
<ul>
-<li><p>At a shell or DOS prompt, enter: "<b>sqlite test.db</b>". This will
+<li><p>At a shell or DOS prompt, enter: "<b>sqlite3 test.db</b>". This will
create a new database named "test.db". (You can use a different name if
you like.)</p></li>
<li><p>Enter SQL commands at the prompt to create and populate the
<li><p>Below is a simple TCL program that demonstrates how to use
the TCL interface to SQLite. The program executes the SQL statements
given as the second argument on the database defined by the first
-argument. The commands to watch for are the <b>sqlite</b> command
+argument. The commands to watch for are the <b>sqlite3</b> command
on line 7 which opens an SQLite database and creates
a new TCL command named "<b>db</b>" to access that database, the
invocation of the <b>db</b> command on line 8 to execute
puts stderr "Usage: %s DATABASE SQL-STATEMENT"
exit 1
}
-load /usr/lib/tclsqlite.so Sqlite
-<b>sqlite</b> db [lindex $argv 0]
+load /usr/lib/tclsqlite3.so Sqlite
+<b>sqlite3</b> db [lindex $argv 0]
<b>db</b> eval [lindex $argv 1] x {
foreach v $x(*) {
puts "$v = $x($v)"
the C/C++ interface to SQLite. The name of a database is given by
the first argument and the second argument is one or more SQL statements
to execute against the database. The function calls to pay attention
-to here are the call to <b>sqlite_open()</b> on line 22 which opens
-the database, <b>sqlite_exec()</b> on line 27 that executes SQL
-commands against the database, and <b>sqlite_close()</b> on line 31
+to here are the call to <b>sqlite3_open()</b> on line 22 which opens
+the database, <b>sqlite3_exec()</b> on line 27 that executes SQL
+commands against the database, and <b>sqlite3_close()</b> on line 31
that closes the database connection.</p>
<blockquote><pre>
#include <stdio.h>
-#include <sqlite.h>
+#include <sqlite3.h>
static int callback(void *NotUsed, int argc, char **argv, char **azColName){
int i;
}
int main(int argc, char **argv){
- sqlite *db;
+ sqlite3 *db;
char *zErrMsg = 0;
int rc;
fprintf(stderr, "Usage: %s DATABASE SQL-STATEMENT\n", argv[0]);
exit(1);
}
- db = <b>sqlite_open</b>(argv[1], 0, &zErrMsg);
- if( db==0 ){
- fprintf(stderr, "Can't open database: %s\n", zErrMsg);
+ rc = <b>sqlite3_open</b>(argv[1], &db);
+ if( rc ){
+ fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
+ sqlite3_close(db);
exit(1);
}
- rc = <b>sqlite_exec</b>(db, argv[2], callback, 0, &zErrMsg);
+ rc = <b>sqlite3_exec</b>(db, argv[2], callback, 0, &zErrMsg);
if( rc!=SQLITE_OK ){
fprintf(stderr, "SQL error: %s\n", zErrMsg);
}
- <b>sqlite_close</b>(db);
+ <b>sqlite3_close</b>(db);
return 0;
}
</pre></blockquote>
</li>
</ul>
}
-
-puts {
-<p><hr /></p>
-<p>
-<a href="index.html"><img src="/goback.jpg" border=0 />
-Back to the SQLite home page</a>
-</p>
-
-</body></html>}
+footer {$Id: quickstart.tcl,v 1.5 2004/09/18 18:00:24 drh Exp $}