diff --git a/manifest b/manifest index c168ce953e..2541956aa5 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Some\stest\scases\sfor\sread\slocks\s(CVS\s1505) -D 2004-05-31T12:34:54 +C Website\sredesign\sin\spreparation\sfor\sadding\sversion\s3\sdocumentation.\s(CVS\s1506) +D 2004-05-31T15:06:29 F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd @@ -179,32 +179,36 @@ F tool/speedtest.tcl 06c76698485ccf597b9e7dbb1ac70706eb873355 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F www/arch.fig d5f9752a4dbf242e9cfffffd3f5762b6c63b3bcf F www/arch.png 82ef36db1143828a7abc88b1e308a5f55d4336f4 -F www/arch.tcl b329ca2c8dc75cd1cf0dd714b8bb47bdd458d0da +F www/arch.tcl a40f956733cbd99e4aace05c9fb9d7a999c9477e F www/arch2.fig 613b5ac63511109064c2f93c5754ee662219937d F www/arch2.gif 49c6bb36160f03ca2b89eaa5bfb1f560c7d68ee7 F www/audit.tcl 90e09d580f79c7efec0c7d6f447b7ec5c2dce5c0 -F www/c_interface.tcl 17d8bd9e7b4fbdca47c30c8b9bcb728c351d55c0 -F www/changes.tcl a3d043896631a14091dbafdb4068980974c3834c -F www/conflict.tcl 81dd21f9a679e60aae049e9dd8ab53d59570cda2 -F www/datatypes.tcl 0fe2b810f114a909b844e50ad37a25e6ed8c7271 -F www/download.tcl 0932d7f4f0e8b2adbbd22fac73132f86e43ab4a9 +F www/c_interface.tcl 2176519fc2bd2d2cf6fe74fd806fc2d8362de2c8 +F www/changes.tcl 9d562205db584d26b358ebe93fb58039feefd1b8 +F www/common.tcl e548490c8444489064f6c1cce59d1cf177fb8664 +F www/conflict.tcl fb8a2ba83746c7fdfd9e52fa7f6aaf5c422b8246 +F www/copyright-release.html 294e011760c439c44951a6bfecd4c81a1ae359e8 +F www/copyright-release.pdf cfca3558fc97095e57c6117d08f1f5b80d95125a +F www/datatypes.tcl 566004b81c36877397ddbe6e1907aae6065f6b41 +F www/docs.tcl 60a7ce60d6f04cd5f56ab9329e0ffc22ebd6f021 +F www/download.tcl cfe0a12bc9073fe34b880b6d259fb88ba5bb502f F www/dynload.tcl 02eb8273aa78cfa9070dd4501dca937fb22b466c -F www/faq.tcl 88d3b95d9cd8e374772daa3a646c4d107e7f3e9b -F www/fileformat.tcl 56f77e435a6306b337b20b416e3b89500ba2d029 -F www/formatchng.tcl ca6cc1cb1bef9bc36f0619049d3c95e749bc6983 -F www/index.tcl bacb2a0d052845bbe3bf078765cce907ed7080a4 -F www/lang.tcl 17954f37c8bb1d25e026d97041ff6459fb89ac95 +F www/faq.tcl 3a1776818d9bd973ab0c3048ec7ad6b1ad091ae5 +F www/fileformat.tcl f71a06a0d533c7df408539c64113b4adeaf29764 +F www/formatchng.tcl 7ed8a5c871ab105f01e5defe1822ec39f70675bb +F www/index.tcl 007cbb4c92459c45c2cc097a1193cc305c989772 +F www/lang.tcl fc528581c4a406cabc138e2f17db5ef6f38615ff F www/mingw.tcl d96b451568c5d28545fefe0c80bee3431c73f69c -F www/nulls.tcl 38117d24afb81efd079b59723b985a6d654cc2e8 -F www/omitted.tcl 11037a1b557bd01405092d93dfa08898a4c26cd7 -F www/opcode.tcl b8d561f33597c62955796b797646f00144d97332 +F www/nulls.tcl f31330db8c978e675f5cd263067b32b822effa6f +F www/omitted.tcl 7bd62b6f0f53b60c5360895b16b3af8407bbca03 +F www/opcode.tcl e8c421fd2c70c503b25cedb3f9617a1f387ac7ea F www/quickstart.tcl 4e97bef825e6a4153c43afb9f97235fc4da278ab -F www/speed.tcl 2f6b1155b99d39adb185f900456d1d592c4832b3 -F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604 -F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da -F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1 +F www/speed.tcl 19cf0c1bf73c4b534dfafc95b3eacff4825740b4 +F www/sqlite.tcl b51fd15f0531a54874de785a9efba323eecd5975 +F www/tclsqlite.tcl 19191cf2a1010eaeff74c51d83fd5f5a4d899075 +F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9 F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4 -P 6c100887eeb32631e1aa914a69db959e1f58f192 -R 1d8f5d0a6729c7e39d4d87422195d60b -U danielk1977 -Z 3129e3edc85b79121f4ae67280793a64 +P 0e07006704cd441f91d5fadbf3b644fd20da79bd +R a59b4bd6ff95128c135d3274ecbe26b7 +U drh +Z 972496f8c6b40a74144e347477ed1839 diff --git a/manifest.uuid b/manifest.uuid index beab512d54..4ffb78ba3d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -0e07006704cd441f91d5fadbf3b644fd20da79bd \ No newline at end of file +2052911b1fd119af9dbd81fdfe80244685f58212 \ No newline at end of file diff --git a/www/arch.tcl b/www/arch.tcl index af23deca2b..b96b602319 100644 --- a/www/arch.tcl +++ b/www/arch.tcl @@ -1,22 +1,13 @@ # # Run this Tcl script to generate the sqlite.html file. # -set rcsid {$Id: arch.tcl,v 1.11 2004/03/14 11:57:58 drh Exp $} - -puts { -
--(This page was last modified on [lrange $rcsid 3 4] UTC) -
" - +set rcsid {$Id: arch.tcl,v 1.12 2004/05/31 15:06:29 drh Exp $} +source common.tcl +header {Architecture of SQLite} puts { -Block Diagram Of SQLite |
---|
![]() |
++ |
+
|
++ | + + | +
-(This page was last modified on [lrange $rcsid 3 4] UTC) -
" - +set rcsid {$Id: conflict.tcl,v 1.3 2004/05/31 15:06:30 drh Exp $ } +source common.tcl +header {Constraint Conflict Resolution in SQLite} puts { -In most SQL databases, if you have a UNIQUE constraint on a table and you try to do an UPDATE or INSERT that violates -that constraint, the database will aborts the operation in -progress, back out any prior changes associated with that -one UPDATE or INSERT command, and return an error. +the constraint, the database will abort the operation in +progress, back out any prior changes associated with +UPDATE or INSERT command, and return an error. This is the default behavior of SQLite. Beginning with version 2.3.0, though, SQLite allows you to define alternative ways for dealing with constraint violations. @@ -99,11 +88,4 @@ What you really want is to use the IGNORE algorithm to insert all but the malformed record.
} - -puts { -
-Back to the SQLite Home Page
-
+SQLite is software that implements an embeddable SQL database engine. +SQLite is available for free download from http://www.sqlite.org/. +The principal author and maintainer of SQLite has disclaimed all +copyright interest in his contributions to SQLite +and thus released his contributions into the public domain. +In order to keep the SQLite software unencumbered by copyright +claims, the principal author asks others who may from time to +time contribute changes and enhancements to likewise disclaim +their own individual copyright interest. +
+ ++Because the SQLite software found at http://www.sqlite.org/ is in the +public domain, anyone is free to download the SQLite software +from that website, make changes to the software, use, distribute, +or sell the modified software, under either the original name or +under some new name, without any need to obtain permission, pay +royalties, acknowledge the original source of the software, or +in any other way compensate, identify, or notify the original authors. +Nobody is in any way compelled to contribute their SQLite changes and +enhancements back to the SQLite website. This document concerns +only changes and enhancements to SQLite that are intentionally and +deliberately contributed back to the SQLite website. +
+ ++For the purposes of this document, "SQLite software" shall mean any +computer source code, documentation, makefiles, test scripts, or +other information that is published on the SQLite website, +http://www.sqlite.org/. Precompiled binaries are excluded from +the definition of "SQLite software" in this document because the +process of compiling the software may introduce information from +outside sources which is not properly a part of SQLite. +
+ ++The header comments on the SQLite source files exhort the reader to +share freely and to never take more than one gives. +In the spirit of that exhortation I make the following declarations: +
+ ++I dedicate to the public domain +any and all copyright interest in the SQLite software that +was publicly available on the SQLite website (http://www.sqlite.org/) prior +to the date of the signature below and any changes or enhancements to +the SQLite software +that I may cause to be published on that website in the future. +I make this dedication for the benefit of the public at large and +to the detriment of my heirs and successors. I intend this +dedication to be an overt act of relinquishment in perpetuity of +all present and future rights to the SQLite software under copyright +law. +
+To the best of my knowledge and belief, the changes and enhancements that +I have contributed to SQLite are either originally written by me +or are derived from prior works which I have verified are also +in the public domain and are not subject to claims of copyright +by other parties. +
+To the best of my knowledge and belief, no individual, business, organization, +government, or other entity has any copyright interest +in the SQLite software as it existed on the +SQLite website as of the date on the signature line below. +
+I agree never to publish any additional information +to the SQLite website (by CVS, email, scp, FTP, or any other means) unless +that information is an original work of authorship by me or is derived from +prior published versions of SQLite. +I agree never to copy and paste code into the SQLite code base from +other sources. +I agree never to publish on the SQLite website any information that +would violate a law or breach a contract. +
+
+Signature:
+ + + + | +Date: + | +Name (printed): + | + +
-(This page was last modified on [lrange $rcsid 3 4] UTC) -
" - -puts {SQLite is "typeless". This means that you can store any kind of data you want in any column of any table, regardless of the @@ -79,7 +70,7 @@ And so forth. Basically any sequence of names optionally followed by one or two signed integers in parentheses will do.
-One exception to the typelessness of SQLite is a column whose type @@ -101,7 +92,7 @@ the sqlite_last_insert_rowid() API function or using the last_insert_rowid() SQL function in a subsequent SELECT statement.
-SQLite is typeless for the purpose of deciding what data is allowed @@ -144,7 +135,7 @@ A comparison of any value against NULL using operators like "<" or ">=" is always false.
-For SQLite version 2.6.3 and earlier, all values used the numeric datatype. @@ -193,7 +184,7 @@ then the datatype is numeric. Note in particular that the datatype for columns with an empty type declaration is numeric.
-Consider the following two command sequences: @@ -249,11 +240,4 @@ are treated as numbers and are therefore indistinct. But the SELECT statement on the right returns two rows since 0 and 0.0 are treated a strings which are different.
} - -puts { -
-Back to the SQLite Home Page
-
} + regsub -all { +} $name {\ } name + puts "$name | " + puts {} + puts { | } + puts $desc + puts { |
-
-Back to the SQLite home page
-
-(This page was last modified on [lrange $rcsid 3 4] UTC) -
" - +set rcsid {$Id: faq.tcl,v 1.24 2004/05/31 15:06:30 drh Exp $} +source common.tcl +header {SQLite Frequently Asked Questions} set cnt 1 proc faq {question answer} { @@ -432,12 +422,19 @@ faq { # End of questions and answers. ############# -puts {[lindex $faq($i) 1]\n" } -puts { - -
-Back to the SQLite Home Page
-
-(This page was last modified on [lrange $rcsid 3 4] UTC) -
" - +set rcsid {$Id: fileformat.tcl,v 1.12 2004/05/31 15:06:30 drh Exp $} +source common.tcl +header {SQLite Database File Format (Version 2)} puts { -+This document describes the disk file format for SQLite versions 2.1 +through 2.8. SQLite version 3.0 and following uses a very different +format which is described separately. +
+ +SQLite is implemented in layers. @@ -37,7 +33,7 @@ We wil describe each layer beginning with the bottom (pager) layer and working upwards.
-An SQLite database consists of @@ -158,7 +154,7 @@ Here is a summary of the journal file format: -
The B-Tree layer builds on top of the pager layer to implement @@ -206,7 +202,7 @@ The b-tree itself does not record which pages are root pages and which are not. That information is handled entirely at the schema layer.
-Page 1 begins with the following 48-byte string: @@ -275,7 +271,7 @@ Here is a summary of the information contained on page 1 in the b-tree layer:
Conceptually, a b-tree page contains N database entries and N+1 pointers @@ -502,7 +498,7 @@ the page by moving all cells to the beginning and constructing a single freeblock at the end to take up all remaining space.
-When information is removed from an SQLite database such that one or @@ -571,7 +567,7 @@ these two optimizations allow some database operations to go four to six times faster than they would otherwise.
-The schema layer implements an SQL database on top of one or more @@ -591,7 +587,7 @@ extracted. For indices, the b-tree key varies in size depending on the size of the fields being indexed and the b-tree data is empty.
-Each row of an SQL table is stored in a single b-tree entry. The b-tree key is a 4-byte big-endian integer that is the ROWID @@ -659,7 +655,7 @@ INTEGER PRIMARY KEY, just like any other column. But the Value associated with that offset is always NULL.
-SQL indices are implement using a b-tree in which the key is used @@ -685,7 +681,7 @@ NULLs being sorted first, followed by numerical values in numerical order, followed by text values in lexigraphical order.
-The database schema is stored in the database in a special tabled named @@ -720,7 +716,7 @@ database. But the schema table for the temporary database named name change, it works exactly the same.
-The nine 32-bit integers that are stored beginning at byte offset @@ -785,13 +781,5 @@ to a SYNCHRONOUS setting of NORMAL. A value of 3 corresponds to a SYNCHRONOUS setting of FULL. If the value is 0, that means it has not been initialized so the default synchronous setting of NORMAL is used.
- } - -puts { -
-Back to the SQLite Home Page
-
-(This page was last modified on [lrange $rcsid 3 4] UTC) -
" - +set rcsid {$Id: formatchng.tcl,v 1.10 2004/05/31 15:06:30 drh Exp $ } +source common.tcl +header {File Format Changes in SQLite} puts { +From time to time, enhancements or bug fixes require a change to the underlying file format for SQLite. When this happens and you @@ -175,6 +166,16 @@ occurred since version 1.0.0: to restore the database.
+Version 3.0.0 is a major upgrade for SQLite that incorporates + support for UTF-16, BLOBs, and a more compact encoding that results + in database files that are typically 25% to 35% smaller. The new file + format is radically different and completely incompatible with the + version 2 file format.
+
-Back to the SQLite Home Page
-
}
-puts "This page was last modified on [lrange $rcsid 3 4] UTC
"
-set vers [lindex $argv 0]
-puts "The latest SQLite version is $vers"
-puts " created on [exec cat last_change] UTC"
-puts {
SQLite is a C library that implements an embeddable 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 library.
- -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.
} - +#!/usr/bin/tclsh +source common.tcl +header {SQLite home page} puts { -
-
|
+About SQLite++SQLite is a small C library that implements a +self-contained, embeddable, +zero-configuration SQL database engine. +Features include: +
Current Status- -A Change Summary is available on this -website. You can also access a detailed -change history, -view open bugs, -or -report new bugs -at the -CVS server. - -Complete source code and precompiled binaries for the latest release are -available for download on this site. You -can also obtain the latest changes by anonymous CVS access: - -When prompted for a password, enter "anonymous". --cvs -d :pserver:anonymous@www.sqlite.org:/sqlite login -cvs -d :pserver:anonymous@www.sqlite.org:/sqlite checkout sqlite - -Whenever either of the first two digits in the version number -for SQLite change, it means that the underlying file format -has changed. Usually these changes are backwards compatible. -See formatchng.html -for additional information. +The SQLite 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 library. + + |
++ |
+News} -puts {Documentation+proc newsitem {date title text} { + puts "$date - $title" + regsub -all "\n( *\n)+" $text "\n\n" txt + puts " $txt " + puts "" +} - The following documentation is currently available: +newsitem {2004-May-31} {CVS Access Temporarily Suspended} { + Anonymous access to the CVS repository will be suspended + temporarily beginning on 2004-June-04 + so that the developers working on version 3.0 can have a free hand to + implement features that a covered by a non-compete agreement. + Access will be reenabled after the non-compete expires on 2004-June-17. +} -
The SQLite source code is 30% comment. These comments are -another important source of information. +newsitem {2004-Apr-23} {Work Begins On SQLite Version 3} { + Work has begun on version 3 of SQLite. Version 3 is a major + changes to both the C-language API and the underlying file format + that will enable SQLite to better support internationalization. + The first beta is schedule for release on 2004-July-01. + Plans are to continue to support SQLite version 2.8 with + bug fixes. But all new development will occur in version 3.0. } puts { - -Mailing List-A mailing list has been set up for discussion of -SQLite design issues or for asking questions about SQLite. -To subscribe send an email to - -sqlite-users-subscribe@sqlite.org. -If you would prefer to get digests rather than individual -emails, send a message to to - -sqlite-users-digest-subscribe@sqlite.org. -For additional information about operating and using this -mailing list, send a message to - -sqlite-users-help@sqlite.org and instructions will be -sent by to you by return email. - + |
-If you would like professional support for SQLite -or if you want custom modifications to SQLite performed by the -original author, these services are available for a modest fee. -For additional information visit - -http://www.hwaci.com/sw/sqlite/support.html or contact:
- --D. Richard Hipp-} - -puts {
-Hwaci - Applied Software Research
-704.948.4565
-drh@hwaci.com -
To build sqlite under Unix, just unwrap the tarball, create a separate -build directory, run configure from the build directory and then -type "make". For example:
- -- --$ tar xzf sqlite.tar.gz Unpacks into directory named "sqlite" -$ mkdir bld Create a separate build directory -$ cd bld -$ ../sqlite/configure -$ make Builds "sqlite" and "libsqlite.a" -$ make test Optional: run regression tests -
If you prefer, you can also build by making whatever modifications -you desire to the file "Makefile.linux-gcc" and then executing that -makefile. The latter method is used for all official development -and testing of SQLite and for building the precompiled -binaries found on this website. Windows binaries are generated by -cross-compiling from Linux using MinGW
-} - -puts {-For information bindings of SQLite to other programming languages -(Perl, Python, Ruby, PHP, etc.) and for a list of programs currently -using SQLite, visit the Wiki documentation at: -
- -- -http://www.sqlite.org/cvstrac/wiki --} - -puts { -} +footer {$Id: index.tcl,v 1.83 2004/05/31 15:06:30 drh Exp $} diff --git a/www/lang.tcl b/www/lang.tcl index 074e45b845..01c8179904 100644 --- a/www/lang.tcl +++ b/www/lang.tcl @@ -1,21 +1,12 @@ # # Run this Tcl script to generate the sqlite.html file. # -set rcsid {$Id: lang.tcl,v 1.67 2004/04/23 17:04:45 drh Exp $} - -puts { - -
-(This page was last modified on [lrange $rcsid 3 4] UTC) -
" - +set rcsid {$Id: lang.tcl,v 1.68 2004/05/31 15:06:30 drh Exp $} +source common.tcl +header {Query Language Understood by SQLite} puts { +The SQLite library understands most of the standard SQL language. But it does omit some features while at the same time @@ -1841,10 +1832,4 @@ keyword_list { *SQLITE_TEMP_MASTER } -puts { -
-Back to the SQLite Home Page
-
-(This page was last modified on [lrange $rcsid 3 4] UTC) -
" - +set rcsid {$Id: nulls.tcl,v 1.6 2004/05/31 15:06:30 drh Exp $} +source common.tcl +header {NULL Handling in SQLite} puts { +The goal is to make SQLite handle NULLs in a standards-compliant way. @@ -334,11 +324,6 @@ select * from t2; drop table t1; drop table t2; - -
-Back to the SQLite Home Page
-
-(This page was last modified on [lrange $rcsid 3 4] UTC) -
" - +set rcsid {$Id: omitted.tcl,v 1.6 2004/05/31 15:06:30 drh Exp $} +source common.tcl +header {SQL Features That SQLite Does Not Implement} puts { +Rather than try to list all the features of SQL92 that SQLite does support, it is much easier to list those that it does not. @@ -104,9 +94,5 @@ add them to the Wiki page at http://www.sqlite.org/cvstrac/wiki?p=Unsupported
-
-Back to the SQLite Home Page
-
-(This page was last modified on [lrange $rcsid 3 4] UTC) -
" +set rcsid {$Id: opcode.tcl,v 1.13 2004/05/31 15:06:30 drh Exp $} +source common.tcl +header {SQLite Virtual Machine Opcodes} +puts { +In order to execute an SQL statement, the SQLite library first parses the SQL, analyzes the statement, then generates a short program to execute @@ -147,7 +140,7 @@ There are operations to read or write to memory slots of the aggregator in focus. There are also operations to change the focus aggregator and to scan through all aggregators.
-Every SQL statement that SQLite interprets results in a program for the virtual machine. But if you precede the SQL statement with @@ -224,7 +217,7 @@ PRAGMA vdbe_trace=on; You can turn tracing back off by entering a similar statement but changing the value "on" to "off".
-There are currently [llength $OpcodeList] opcodes defined by @@ -242,11 +235,4 @@ foreach op [lsort -dictionary $OpcodeList] { puts "
-Back to the SQLite Home Page
-
-(This page was last modified on [lrange $rcsid 3 4] UTC) -
" +set rcsid {$Id: speed.tcl,v 1.14 2004/05/31 15:06:30 drh Exp $ } +source common.tcl +header {SQLite Database Speed Comparison} puts { -A series of tests were run to measure the relative performance of SQLite 2.7.6, PostgreSQL 7.1.3, and MySQL 3.23.41. @@ -61,7 +53,7 @@ The results presented here come with the following caveats:
-The platform used for these tests is a 1.6GHz Athlon with 1GB or memory @@ -132,7 +124,7 @@ synchronous) and the asynchronous SQLite times are for comparison against the asynchronous MySQL engine.
-CREATE TABLE t1(a INTEGER, b INTEGER, c VARCHAR(100));
INSERT INTO t1 VALUES(1,13153,'thirteen thousand one hundred fifty three');
@@ -162,7 +154,7 @@ the disk surface before continuing. For most of the 13 seconds in the synchronous test, SQLite was sitting idle waiting on disk I/O to complete. -Test 2: 25000 INSERTs in a transaction
+Test 2: 25000 INSERTs in a transaction
BEGIN;
CREATE TABLE t2(a INTEGER, b INTEGER, c VARCHAR(100));
@@ -187,7 +179,7 @@ have to do any fsync()s until the very end. When unshackled in this way, SQLite is much faster than either PostgreSQL and MySQL. -Test 3: 25000 INSERTs into an indexed table
+Test 3: 25000 INSERTs into an indexed table
BEGIN;
CREATE TABLE t3(a INTEGER, b INTEGER, c VARCHAR(100));
@@ -211,7 +203,7 @@ SQLite is not as fast at creating new index entries as the other engines (see Test 6 below) but its overall speed is still better. -Test 4: 100 SELECTs without an index
+Test 4: 100 SELECTs without an index
BEGIN;
SELECT count(*), avg(b) FROM t2 WHERE b>=0 AND b<1000;
@@ -237,7 +229,7 @@ enhancements have increased its speed so that it is now the fastest of the group. -Test 5: 100 SELECTs on a string comparison
+Test 5: 100 SELECTs on a string comparison
BEGIN;
SELECT count(*), avg(b) FROM t2 WHERE c LIKE '%one%';
@@ -261,7 +253,7 @@ SQLite is over three times faster than PostgreSQL here and about 30% faster than MySQL. -Test 6: Creating an index
+Test 6: Creating an index
CREATE INDEX i2a ON t2(a);
CREATE INDEX i2b ON t2(b);@@ -278,7 +270,7 @@ is being worked on. Hopefully, future versions of SQLite will do better here. -
Test 7: 5000 SELECTs with an index
+Test 7: 5000 SELECTs with an index
SELECT count(*), avg(b) FROM t2 WHERE b>=0 AND b<100;
SELECT count(*), avg(b) FROM t2 WHERE b>=100 AND b<200;
@@ -300,7 +292,7 @@ All three database engines run faster when they have indices to work with. But SQLite is still the fastest. -Test 8: 1000 UPDATEs without an index
+Test 8: 1000 UPDATEs without an index
BEGIN;
UPDATE t1 SET b=b*2 WHERE a>=0 AND a<10;
@@ -325,7 +317,7 @@ normally a very fast engine. Perhaps this problem has been addressed in later versions of MySQL. -Test 9: 25000 UPDATEs with an index
+Test 9: 25000 UPDATEs with an index
BEGIN;
UPDATE t2 SET b=468026 WHERE a=1;
@@ -348,7 +340,7 @@ MySQL on this test. But recent optimizations to SQLite have more than doubled speed of UPDATEs. -Test 10: 25000 text UPDATEs with an index
+Test 10: 25000 text UPDATEs with an index
BEGIN;
UPDATE t2 SET c='one hundred forty eight thousand three hundred eighty two' WHERE a=1;
@@ -377,7 +369,7 @@ knowledgeable administrator might be able to get PostgreSQL to run a lot faster here by tweaking and tuning the server a little. -Test 11: INSERTs from a SELECT
+Test 11: INSERTs from a SELECT
BEGIN;
INSERT INTO t1 SELECT b,a,c FROM t2;
INSERT INTO t2 SELECT b,a,c FROM t1;
COMMIT;@@ -394,7 +386,7 @@ The PostgreSQL engine is still thrashing - most of the 61 seconds it used were spent waiting on disk I/O. -
Test 12: DELETE without an index
+Test 12: DELETE without an index
DELETE FROM t2 WHERE c LIKE '%fifty%';@@ -410,7 +402,7 @@ but the asynchronous version is the fastest. The difference is the extra time needed to execute fsync(). -
Test 13: DELETE with an index
+Test 13: DELETE with an index
DELETE FROM t2 WHERE a>10 AND a<20000;@@ -426,7 +418,7 @@ PostgreSQL is faster than MySQL. The asynchronous SQLite is, however, faster then both the other two. -
Test 14: A big INSERT after a big DELETE
+Test 14: A big INSERT after a big DELETE
INSERT INTO t2 SELECT * FROM t1;@@ -443,7 +435,7 @@ sequence of DELETEs followed by new INSERTs. As this test shows, the problem has now been resolved. -
Test 15: A big DELETE followed by many small INSERTs
+Test 15: A big DELETE followed by many small INSERTs
BEGIN;
DELETE FROM t1;
@@ -465,7 +457,7 @@ SQLite is very good at doing INSERTs within a transaction, which probably explains why it is so much faster than the other databases at this test. -Test 16: DROP TABLE
+Test 16: DROP TABLE
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;@@ -489,10 +481,4 @@ so if SQLite takes a little longer, that is not seen as a big problem. } -puts { -
-- -} +footer $rcsid diff --git a/www/sqlite.tcl b/www/sqlite.tcl index b777074733..cce4a63686 100644 --- a/www/sqlite.tcl +++ b/www/sqlite.tcl @@ -1,27 +1,18 @@ # # Run this Tcl script to generate the sqlite.html file. # -set rcsid {$Id: sqlite.tcl,v 1.21 2003/06/29 16:11:13 drh Exp $} - -puts { - -
-Back to the SQLite Home Page -
sqlite: A program of interacting with SQLite databases - - --sqlite: A program to administer SQLite databases -
} -puts "-(This page was last modified on [lrange $rcsid 3 4] UTC) -
" - +set rcsid {$Id: sqlite.tcl,v 1.22 2004/05/31 15:06:30 drh Exp $} +source common.tcl +header {sqlite: A program of interacting with SQLite databases} puts { +sqlite: A command-line program to administer SQLite databases
+The SQLite library includes a simple command-line utility named sqlite that allows the user to manually enter and execute SQL commands against an SQLite database. This document provides a brief introduction on how to use sqlite. -
Getting Started
+Getting Started
To start the sqlite program, just type "sqlite" followed by the name the file that holds the SQLite database. If the file does @@ -84,7 +75,7 @@ sqlite> puts { -
Aside: Querying the SQLITE_MASTER table
+Aside: Querying the SQLITE_MASTER table
The database schema in an SQLite database is stored in a special table named "sqlite_master". @@ -123,7 +114,7 @@ is stored in another special table named "sqlite_temp_master". The "sqlite_temp_master" table is temporary itself.
-Special commands to sqlite
+Special commands to sqlite
Most of the time, sqlite just reads lines of input and passes them @@ -168,7 +159,7 @@ sqlite> } puts { -
Changing Output Formats
+Changing Output Formats
The sqlite program is able to show the results of a query in five different formats: "line", "column", "list", "html", and "insert". @@ -305,7 +296,7 @@ CGI.
} puts { -Writing results to a file
+Writing results to a file
By default, sqlite sends query results to standard output. You can change this using the ".output" command. Just put the name of @@ -326,7 +317,7 @@ $ } puts { -
Querying the database schema
+Querying the database schema
The sqlite program provides several convenience commands that are useful for looking at the schema of the database. There is @@ -441,7 +432,7 @@ sqlite> (((.databases))) } puts { -
Converting An Entire Database To An ASCII Text File
+Converting An Entire Database To An ASCII Text File
Use the ".dump" command to convert the entire contents of a database into a single ASCII text file. This file can be converted @@ -495,7 +486,7 @@ $ (((pg_dump -a ex2 | sqlite ex3))) } puts { -
Other Dot Commands
+Other Dot Commands
The ".explain" dot command can be used to set the output mode to "column" and to set the column widths to values that are reasonable @@ -539,7 +530,7 @@ index is locked.
And finally, we mention the ".exit" command which causes the sqlite program to exit.
-Using sqlite in a shell script
+Using sqlite in a shell script
One way to use sqlite in a shell script is to use "echo" or @@ -564,7 +555,7 @@ $ } puts { -
Ending shell commands
+Ending shell commands
SQLite commands are normally terminated by a semicolon. In the shell @@ -576,18 +567,11 @@ to that function.
} puts { -Compiling the sqlite program from sources
+Compiling the sqlite program from sources
The sqlite program is built automatically when you compile the sqlite library. Just get a copy of the source tree, run "configure" and then "make".
} - -puts { -
-- -} +footer $rcsid diff --git a/www/tclsqlite.tcl b/www/tclsqlite.tcl index 776967d1b6..4cc6bfdf9f 100644 --- a/www/tclsqlite.tcl +++ b/www/tclsqlite.tcl @@ -1,26 +1,17 @@ # # Run this Tcl script to generate the tclsqlite.html file. # -set rcsid {$Id: tclsqlite.tcl,v 1.8 2003/08/19 14:31:02 drh Exp $} - -puts { - -
-Back to the SQLite Home Page -
The Tcl interface to the SQLite library - - --The Tcl interface to the SQLite library -
} -puts "-(This page was last modified on [lrange $rcsid 3 4] UTC) -
" - +set rcsid {$Id: tclsqlite.tcl,v 1.9 2004/05/31 15:06:30 drh Exp $} +source common.tcl +header {The Tcl interface to the SQLite library} puts { +The Tcl interface to the SQLite library
+The SQLite library is designed to be very easy to use from a Tcl or Tcl/Tk script. This document gives an overview of the Tcl programming interface.
-The API
+The API
The interface to the SQLite library consists of single tcl command named sqlite. Because there is only this @@ -69,7 +60,7 @@ defined:
We will explain all of these methods, though not in that order. We will be begin with the "close" method.
-The "close" method
+The "close" method
As its name suggests, the "close" method to an SQLite database just @@ -93,7 +84,7 @@ to the previous:
rename db1 {} -The "eval" method
+The "eval" method
The most useful dbcmd method is "eval". The eval method is used @@ -193,7 +184,7 @@ a=2 b=goodbye
a=3 b=howdy! -The "complete" method
+The "complete" method
The "complete" method takes a string of supposed SQL as its only argument. @@ -206,7 +197,7 @@ This is really just an interface to the sqlite_complete() C function. Refer to the C/C++ interface specification for additional information.
-The "timeout" method
+The "timeout" method
The "timeout" method is used to control how long the SQLite library will wait for locks to clear before giving up on a database transaction. @@ -233,7 +224,7 @@ number. For example:
to wait for the lock to clear. So in the example above, the maximum delay would be 2 seconds. -The "busy" method
+The "busy" method
The "busy" method, like "timeout", only comes into play when the database is locked. But the "busy" method gives the programmer much more @@ -245,12 +236,12 @@ so that the lock can be tried again. The callback procedure should return "0" if it wants SQLite to try again to open the database and should return "1" if it wants SQLite to abandon the current operation. -
The "last_insert_rowid" method
+The "last_insert_rowid" method
The "last_insert_rowid" method returns an integer which is the ROWID of the most recently inserted database row.
-The "onecolumn" method
+The "onecolumn" method
The "onecolumn" method works like "eval" in that it evaluates the SQL query statement given as its argument. The difference is that @@ -261,18 +252,11 @@ first row of the query result.
do a "[lindex ... 0]" on the results of an "eval" in order to extract a single column result. -The "changes" method
+The "changes" method
The "changes" method returns an integer which is the number of rows in the database that were inserted, deleted, and/or modified by the most recent "eval" method.
} - -puts { -
-- -} +footer $rcsid diff --git a/www/vdbe.tcl b/www/vdbe.tcl index 9b1037f185..68bae0cf85 100644 --- a/www/vdbe.tcl +++ b/www/vdbe.tcl @@ -1,21 +1,12 @@ # # Run this Tcl script to generate the vdbe.html file. # -set rcsid {$Id: vdbe.tcl,v 1.11 2003/06/29 16:11:13 drh Exp $} - -puts { - -
-Back to the SQLite Home Page -
The Virtual Database Engine of SQLite - - --The Virtual Database Engine of SQLite -
} -puts "-(This page was last modified on [lrange $rcsid 3 4] UTC) -
" - +set rcsid {$Id: vdbe.tcl,v 1.12 2004/05/31 15:06:30 drh Exp $} +source common.tcl +header {The Virtual Database Engine of SQLite} puts { +The Virtual Database Engine of SQLite
+This document describes the virtual machine used in SQLite version 2.8.0.@@ -1989,11 +1980,4 @@ feel free to fix them and/or contact the author at drh@hwaci.com. Your bug fixes or suggestions are always welcomed. } - -puts { -
- - -} +footer $rcsid