From 59fefbab1a0dbee47661e38675b25353da2527e1 Mon Sep 17 00:00:00 2001
From: drh
-(This page was last modified on [lrange $rcsid 3 4] GMT)
+(This page was last modified on [lrange $rcsid 3 4] UTC)
-(This page was last modified on [lrange $rcsid 3 4] GMT)
+(This page was last modified on [lrange $rcsid 3 4] UTC)
-(This page was last modified on [lrange $rcsid 3 4] GMT)
+(This page was last modified on [lrange $rcsid 3 4] UTC)
}
-#puts "This page was last modified on [lrange $rcsid 3 4] GMT
+(This page was last modified on [lrange $rcsid 3 4] UTC)
+SQLite Download 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] GMT"
+#puts " created on [exec cat last_change] UTC"
#puts {Precompiled Binaries For Linux
}
diff --git a/www/faq.tcl b/www/faq.tcl
index d300a7a397..1e1e650ec3 100644
--- a/www/faq.tcl
+++ b/www/faq.tcl
@@ -1,6 +1,8 @@
#
# Run this script to generated a faq.html output file
#
+set rcsid {$Id: faq.tcl,v 1.2 2001/11/24 13:23:05 drh Exp $}
+
puts {
Frequently Asked Questions
}
+puts "
The command above assumes the name of the destination machine is
sparc and that you have SSH running on both the source and
@@ -140,6 +146,94 @@ echo .dump | sqlite from.db | ssh sparc 'sqlite to.db'
while redirecting input from the temporary file.
-echo .dump | sqlite from.db | ssh sparc 'sqlite to.db'
+echo .dump | sqlite from.db | ssh sparc sqlite to.db
Multiple processes can have the same database open at the same + time. On unix systems, multiple processes can be doing a SELECT + at the same time. But only one process can be making changes to + the database at once. On windows, only a single process can be + reading from the database at one time since Win95/98/ME does not + support reader/writer locks.
+ +The locking mechanism used to control simultaneous access might + not work correctly if the database file is kept on an NFS filesystem. + You should avoid putting SQLite database files on NFS if multiple + processes might try to access the file at the same time.
+ +Locking in SQLite is very course-grained. SQLite locks the + entire database. Big database servers (PostgreSQL, MySQL, Oracle, etc.) + generally have finer grained locking, such as locking on a single + table or a single row within a table. If you have a massively + parallel database application, you should consider using a big database + server instead of SQLite.
+ +When SQLite tries to access a file that is locked by another + process, the default behavior is to return SQLITE_BUSY. You can + adjust this behavior from C code using the sqlite_busy_handler() or + sqlite_busy_timeout() API functions. See the API documentation + for details.
+} + +faq { + Is SQLite threadsafe? +} { +Almost. In the source file named "os.c" there are two functions + named sqliteOsEnterMutex() and sqliteOsLeaveMutex(). In + the default distribution these functions are stubs. They do not do anything. + If you change them so that they actually implement a mutex, then SQLite + will be threadsafe. But because these routines are stubs, the default + SQLite distribution is not threadsafe.
+} + +faq { + How do I list all tables/indices contained in an SQLite database +} { +If you are running the sqlite command-line access program + you can type ".tables" to get a list of all tables. Or you + can type ".schema" to see the complete database schema including + all tables and indices. Either of these commands can be followed by + a LIKE pattern that will restrict the tables that are displayed.
+ +From within a C/C++ program (or a script using Tcl/Ruby/Perl/Python + bindings) you can get access to table and index names by doing a SELECT + on a special table named "SQLITE_MASTER". Every SQLite database + has an SQLITE_MASTER table that defines the schema for the database. + The SQLITE_MASTER table looks like this:
+++CREATE TABLE sqlite_master ( + type TEXT, + name TEXT, + tbl_name TEXT, + rootpage INTEGER, + sql TEXT +); +
For tables, the type field will always be 'table' and the + name field will be the name of the table. So to get a list of + all tables in the database, use the following SELECT command:
+++SELECT name FROM sqlite_master +WHERE type='table' +ORDER BY name; +
For indices, type is equal to 'index', name is the + name of the index and tbl_name is the name of the table to which + the index belongs. For both tables and indices, the sql field is + the text of the original CREATE TABLE or CREATE INDEX statement that + created the table or index. For automatically created indices (used + to implement the PRIMARY KEY or UNIQUE constraints) the sql field + is NULL.
+ +The SQLITE_MASTER table is read-only. You cannot change this table + using UPDATE, INSERT, or DELETE. The table is automatically updated by + CREATE TABLE, CREATE INDEX, DROP TABLE, and DROP INDEX commands.
+ +Temporary tables do not appear in the SQLITE_MASTER table. At this time + there is no way to get a listing of temporary tables and indices.
+} + # End of questions and answers. ############# diff --git a/www/index.tcl b/www/index.tcl index d7718da096..80e890a993 100644 --- a/www/index.tcl +++ b/www/index.tcl @@ -1,17 +1,17 @@ # # Run this TCL script to generate HTML for the index.html file. # -set rcsid {$Id: index.tcl,v 1.48 2001/11/24 00:31:47 drh Exp $} +set rcsid {$Id: index.tcl,v 1.49 2001/11/24 13:23:05 drh Exp $} puts {}
-puts "This page was last modified on [lrange $rcsid 3 4] GMT
"
+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] GMT"
+puts " created on [exec cat last_change] UTC"
puts {
-(This page was last modified on [lrange $rcsid 3 4] GMT) +(This page was last modified on [lrange $rcsid 3 4] UTC)
" puts { diff --git a/www/mingw.tcl b/www/mingw.tcl index 6b64a0021e..b89b135b9b 100644 --- a/www/mingw.tcl +++ b/www/mingw.tcl @@ -1,7 +1,7 @@ # # Run this Tcl script to generate the crosscompile.html file. # -set rcsid {$Id: mingw.tcl,v 1.2 2000/07/31 19:16:32 drh Exp $} +set rcsid {$Id: mingw.tcl,v 1.3 2001/11/24 13:23:05 drh Exp $} puts { @@ -12,7 +12,7 @@ puts { Notes On How To Build MinGW As A Cross-Compiler } puts "-(This page was last modified on [lrange $rcsid 3 4] GMT) +(This page was last modified on [lrange $rcsid 3 4] UTC)
" puts { diff --git a/www/opcode.tcl b/www/opcode.tcl index cc042d329f..1110f36ecc 100644 --- a/www/opcode.tcl +++ b/www/opcode.tcl @@ -1,7 +1,7 @@ # # Run this Tcl script to generate the sqlite.html file. # -set rcsid {$Id: opcode.tcl,v 1.7 2001/11/01 14:41:34 drh Exp $} +set rcsid {$Id: opcode.tcl,v 1.8 2001/11/24 13:23:05 drh Exp $} puts { @@ -12,7 +12,7 @@ puts { SQLite Virtual Machine Opcodes } puts "-(This page was last modified on [lrange $rcsid 3 4] GMT) +(This page was last modified on [lrange $rcsid 3 4] UTC)
" set fd [open [lindex $argv 0] r] diff --git a/www/speed.tcl b/www/speed.tcl index 102d6dda12..2833c810b8 100644 --- a/www/speed.tcl +++ b/www/speed.tcl @@ -1,7 +1,7 @@ # # Run this Tcl script to generate the speed.html file. # -set rcsid {$Id: speed.tcl,v 1.4 2001/10/31 15:44:48 drh Exp $ } +set rcsid {$Id: speed.tcl,v 1.5 2001/11/24 13:23:05 drh Exp $ } puts { @@ -12,7 +12,7 @@ puts { Database Speed Comparison } puts "-(This page was last modified on [lrange $rcsid 3 4] GMT) +(This page was last modified on [lrange $rcsid 3 4] UTC)
" puts { diff --git a/www/sqlite.tcl b/www/sqlite.tcl index d8a23af3ed..5d4fb06acc 100644 --- a/www/sqlite.tcl +++ b/www/sqlite.tcl @@ -1,7 +1,7 @@ # # Run this Tcl script to generate the sqlite.html file. # -set rcsid {$Id: sqlite.tcl,v 1.15 2001/09/28 23:11:24 drh Exp $} +set rcsid {$Id: sqlite.tcl,v 1.16 2001/11/24 13:23:05 drh Exp $} puts { @@ -12,7 +12,7 @@ puts { sqlite: A program to administer SQLite databases } puts "-(This page was last modified on [lrange $rcsid 3 4] GMT) +(This page was last modified on [lrange $rcsid 3 4] UTC)
" puts { diff --git a/www/tclsqlite.tcl b/www/tclsqlite.tcl index 4d913622ff..457c7221d2 100644 --- a/www/tclsqlite.tcl +++ b/www/tclsqlite.tcl @@ -1,7 +1,7 @@ # # Run this Tcl script to generate the tclsqlite.html file. # -set rcsid {$Id: tclsqlite.tcl,v 1.4 2001/09/20 01:44:44 drh Exp $} +set rcsid {$Id: tclsqlite.tcl,v 1.5 2001/11/24 13:23:05 drh Exp $} puts { @@ -12,7 +12,7 @@ puts { The Tcl interface to the SQLite library } puts "-(This page was last modified on [lrange $rcsid 3 4] GMT) +(This page was last modified on [lrange $rcsid 3 4] UTC)
" puts { diff --git a/www/vdbe.tcl b/www/vdbe.tcl index 4a0775081e..c01ada4206 100644 --- a/www/vdbe.tcl +++ b/www/vdbe.tcl @@ -1,7 +1,7 @@ # # Run this Tcl script to generate the vdbe.html file. # -set rcsid {$Id: vdbe.tcl,v 1.8 2001/11/21 02:21:13 drh Exp $} +set rcsid {$Id: vdbe.tcl,v 1.9 2001/11/24 13:23:05 drh Exp $} puts { @@ -12,7 +12,7 @@ puts { The Virtual Database Engine of SQLite } puts "-(This page was last modified on [lrange $rcsid 3 4] GMT) +(This page was last modified on [lrange $rcsid 3 4] UTC)
" puts {