/ Check-in [1df5386a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Version 2.0.0 (CVS 272)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:1df5386a5557c1fc6a5433e9dbd23009026be369
User & Date: drh 2001-09-28 17:47:14
Context
2001-09-28
18:10
Line tclsqlite.so against the stub library. (CVS 273) check-in: 7e79e91b user: drh tags: trunk
17:47
Version 2.0.0 (CVS 272) check-in: 1df5386a user: drh tags: trunk
01:34
Put in the new LIBTOOL build system. (CVS 271) check-in: 00575d16 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Makefile.in.

   226    226   
   227    227   fulltest:	testfixture sqlite
   228    228   	./testfixture $(TOP)/test/all.test
   229    229   
   230    230   test:	testfixture sqlite
   231    231   	./testfixture $(TOP)/test/quick.test
   232    232   
   233         -sqlite.tar.gz:	
   234         -	pwd=`pwd`; cd $(TOP)/..; tar czf $$pwd/sqlite.tar.gz sqlite
   235         -
   236         -index.html:	$(TOP)/www/index.tcl sqlite.tar.gz last_change
   237         -	cp ../sqlite-*.tar.gz .
          233  +index.html:	$(TOP)/www/index.tcl last_change
   238    234   	tclsh $(TOP)/www/index.tcl `cat $(TOP)/VERSION` >index.html
   239    235   
   240    236   sqlite.html:	$(TOP)/www/sqlite.tcl
   241    237   	tclsh $(TOP)/www/sqlite.tcl >sqlite.html
   242    238   
   243    239   c_interface.html:	$(TOP)/www/c_interface.tcl
   244    240   	tclsh $(TOP)/www/c_interface.tcl >c_interface.html
................................................................................
   269    265   
   270    266   tclsqlite.html:	$(TOP)/www/tclsqlite.tcl
   271    267   	tclsh $(TOP)/www/tclsqlite.tcl >tclsqlite.html
   272    268   
   273    269   speed.html:	$(TOP)/www/speed.tcl
   274    270   	tclsh $(TOP)/www/speed.tcl >speed.html
   275    271   
          272  +download.html:	$(TOP)/www/download.tcl
          273  +	tclsh $(TOP)/www/download.tcl >download.html
          274  +
   276    275   
   277    276   # Files to be published on the website.
   278    277   #
   279         -PUBLISH = \
   280         -  sqlite.tar.gz \
          278  +DOC = \
   281    279     index.html \
   282    280     sqlite.html \
   283    281     changes.html \
   284    282     lang.html \
   285    283     opcode.html \
   286    284     arch.html \
   287    285     arch.png \
   288    286     vdbe.html \
   289    287     c_interface.html \
   290    288     crosscompile.html \
   291    289     mingw.html \
   292    290     tclsqlite.html \
          291  +  download.html \
   293    292     speed.html
   294    293   
   295         -website:	$(PUBLISH)
   296         -
   297         -publish:	$(PUBLISH)
   298         -	chmod 0644 $(PUBLISH) sqlite-*.tar.gz
   299         -	scp $(PUBLISH) sqlite-*.tar.gz hwaci@oak.he.net:public_html/sw/sqlite
          294  +doc:	$(DOC)
          295  +	mkdir -p doc
          296  +	mv $(DOC) doc
   300    297   
   301    298   install:	sqlite libsqlite.la sqlite.h
   302    299   	$(LIBTOOL) $(INSTALL) libsqlite.la $(prefix)/lib
   303    300   	$(LIBTOOL) $(INSTALL) sqlite $(prefix)/bin
   304    301   	$(INSTALL) sqlite.h $(prefix)/include
   305    302   
   306    303   clean:	
   307    304   	rm -f *.lo *.la *.o sqlite libsqlite.la sqlite.h
   308    305   	rm -rf .libs .deps
   309         -	rm -f lemon lempar.c parse.* sqlite.tar.gz
          306  +	rm -f lemon lempar.c parse.* sqlite*.tar.gz
   310    307   	rm -f $(PUBLISH)
   311    308   	rm -f *.da *.bb *.bbg gmon.out
   312    309   	rm -f testfixture test.db

Changes to Makefile.template.

   280    280   
   281    281   fulltest:	testfixture$(EXE) sqlite$(EXE)
   282    282   	./testfixture$(EXE) $(TOP)/test/all.test
   283    283   
   284    284   test:	testfixture$(EXE) sqlite$(EXE)
   285    285   	./testfixture$(EXE) $(TOP)/test/quick.test
   286    286   
   287         -sqlite.tar.gz:	
   288         -	pwd=`pwd`; cd $(TOP)/..; tar czf $$pwd/sqlite.tar.gz sqlite
   289         -
   290         -index.html:	$(TOP)/www/index.tcl sqlite.tar.gz last_change
   291         -	cp ../sqlite-*.tar.gz .
          287  +index.html:	$(TOP)/www/index.tcl last_change
   292    288   	tclsh $(TOP)/www/index.tcl `cat $(TOP)/VERSION` >index.html
   293    289   
   294    290   sqlite.html:	$(TOP)/www/sqlite.tcl
   295    291   	tclsh $(TOP)/www/sqlite.tcl >sqlite.html
   296    292   
   297    293   c_interface.html:	$(TOP)/www/c_interface.tcl
   298    294   	tclsh $(TOP)/www/c_interface.tcl >c_interface.html
................................................................................
   323    319   
   324    320   tclsqlite.html:	$(TOP)/www/tclsqlite.tcl
   325    321   	tclsh $(TOP)/www/tclsqlite.tcl >tclsqlite.html
   326    322   
   327    323   speed.html:	$(TOP)/www/speed.tcl
   328    324   	tclsh $(TOP)/www/speed.tcl >speed.html
   329    325   
          326  +download.html:	$(TOP)/www/download.tcl
          327  +	tclsh $(TOP)/www/download.tcl >download.html
          328  +
   330    329   
   331    330   # Files to be published on the website.
   332    331   #
   333         -PUBLISH = \
   334         -  sqlite.tar.gz \
          332  +DOC = \
   335    333     index.html \
   336    334     sqlite.html \
   337    335     changes.html \
   338    336     lang.html \
   339    337     opcode.html \
   340    338     arch.html \
   341    339     arch.png \
   342    340     vdbe.html \
   343    341     c_interface.html \
   344    342     crosscompile.html \
   345    343     mingw.html \
   346    344     tclsqlite.html \
          345  +  download.html \
   347    346     speed.html
   348    347   
   349         -website:	$(PUBLISH)
   350         -
   351         -publish:	$(PUBLISH)
   352         -	chmod 0644 $(PUBLISH) sqlite-*.tar.gz
   353         -	scp $(PUBLISH) sqlite-*.tar.gz hwaci@oak.he.net:public_html/sw/sqlite
          348  +doc:	$(DOC)
          349  +	mkdir -p doc
          350  +	mv $(DOC) doc
   354    351   
   355    352   install:	sqlite libsqlite.a sqlite.h
   356    353   	mv sqlite /usr/bin
   357    354   	mv libsqlite.a /usr/lib
   358    355   	mv sqlite.h /usr/include
   359    356   
   360    357   clean:	
   361    358   	rm -f *.o sqlite libsqlite.a sqlite.h
   362         -	rm -f lemon lempar.c parse.* sqlite.tar.gz
          359  +	rm -f lemon lempar.c parse.* sqlite*.tar.gz
   363    360   	rm -f $(PUBLISH)
   364    361   	rm -f *.da *.bb *.bbg gmon.out
   365    362   	rm -rf tsrc

Changes to VERSION.

     1         -2.0-alpha-3
            1  +2.0.0

Added publish.sh.

            1  +#!/bin/sh
            2  +#
            3  +# This script is used to compile SQLite and all its documentation and
            4  +# ship everything up to the SQLite website.  This script will only work
            5  +# on the system "zadok" at the Hwaci offices.  But others might find
            6  +# the script useful as an example.
            7  +#
            8  +
            9  +# Set srcdir to the name of the directory that contains the publish.sh
           10  +# script.
           11  +#
           12  +srcdir=`echo "$0" | sed 's%\(^.*\)/[^/][^/]*$%\1%'`
           13  +
           14  +# Get the makefile.
           15  +#
           16  +cp $srcdir/Makefile.template ./Makefile
           17  +
           18  +# Start building stuff.
           19  +#
           20  +make clean
           21  +make sqlite
           22  +strip sqlite
           23  +mv sqlite sqlite.bin
           24  +gzip sqlite.bin
           25  +
           26  +# Build the tclsqlite.so shared library for import into tclsh or wish
           27  +# under Linux
           28  +#
           29  +make target_source
           30  +cd tsrc
           31  +rm shell.c
           32  +TCLDIR=/home/drh/tcltk/8.2linux
           33  +OPTS='-DUSE_TCL_STUBS=1 -DNDEBUG=1 -DOS_UNIX=1 -DOS_WIN=0'
           34  +gcc -fPIC $OPTS -O2 -I. -I$TCLDIR -shared *.c -o tclsqlite.so
           35  +strip tclsqlite.so
           36  +mv tclsqlite.so ..
           37  +cd ..
           38  +gzip tclsqlite.so
           39  +
           40  +# Build the tclsqlite.dll shared library that can be imported into tclsh
           41  +# or wish on windows.
           42  +#
           43  +make target_source
           44  +cd tsrc
           45  +TCLDIR=/home/drh/tcltk/8.2win
           46  +TCLSTUBLIB=$TCLDIR/tclstub82.a
           47  +PATH=$PATH:/opt/mingw/bin
           48  +OPTS='-DUSE_TCL_STUBS=1 -DNDEBUG=1 -DOS_UNIX=0 -DOS_WIN=1'
           49  +CC="i386-mingw32-gcc -O2 $OPTS -I. -I$TCLDIR"
           50  +rm shell.c
           51  +for i in *.c; do
           52  +  CMD="$CC -c $i"
           53  +  echo $CMD
           54  +  $CMD
           55  +done
           56  +echo 'EXPORTS' >tclsqlite.def
           57  +echo 'Tclsqlite_Init' >>tclsqlite.def
           58  +echo 'Sqlite_Init' >>tclsqlite.def
           59  +i386-mingw32-dllwrap \
           60  +     --def tclsqlite.def -v --export-all \
           61  +     --driver-name i386-mingw32-gcc \
           62  +     --dlltool-name i386-mingw32-dlltool \
           63  +     --as i386-mingw32-as \
           64  +     --target i386-mingw32 \
           65  +     -dllname tclsqlite.dll -lmsvcrt *.o $TCLSTUBLIB
           66  +i386-mingw32-strip tclsqlite.dll
           67  +mv tclsqlite.dll ..
           68  +cd ..
           69  +rm -f tclsqlite.zip
           70  +zip tclsqlite.zip tclsqlite.dll
           71  +
           72  +# Build the sqlite.exe executable for windows.
           73  +#
           74  +make target_source
           75  +cd tsrc
           76  +rm tclsqlite.c
           77  +OPTS='-DSTATIC_BUILD=1 -DNDEBUG=1 -DOS_UNIX=0 -DOS_WIN=1'
           78  +i386-mingw32-gcc -O2 $OPTS -I. -I$TCLDIR *.c -o sqlite.exe
           79  +mv sqlite.exe ..
           80  +cd ..
           81  +rm -f sqlite.zip
           82  +zip sqlite.zip sqlite.exe
           83  +
           84  +# Construct a tarball of the source tree
           85  +#
           86  +ORIGIN=`pwd`
           87  +cd $srcdir
           88  +cd ..
           89  +tar czf $ORIGIN/sqlite.tar.gz sqlite
           90  +cd $ORIGIN
           91  +vers=`cat $srcdir/VERSION`
           92  +ln sqlite.tar.gz sqlite-$vers.tar.gz
           93  +
           94  +# Build the website
           95  +#
           96  +cp $srcdir/../historical/* .
           97  +make doc
           98  +ln sqlite.bin.gz sqlite.zip sqlite*.tar.gz tclsqlite.so.gz tclsqlite.zip doc

Changes to src/tclsqlite.c.

     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** A TCL Interface to SQLite
    13     13   **
    14         -** $Id: tclsqlite.c,v 1.23 2001/09/16 00:13:27 drh Exp $
           14  +** $Id: tclsqlite.c,v 1.24 2001/09/28 17:47:14 drh Exp $
    15     15   */
    16     16   #ifndef NO_TCL     /* Omit this whole file if TCL is unavailable */
    17     17   
    18     18   #include "sqlite.h"
    19     19   #include "tcl.h"
    20     20   #include <stdlib.h>
    21     21   #include <string.h>
................................................................................
   429    429       free(zErrMsg);
   430    430       return TCL_ERROR;
   431    431     }
   432    432     Tcl_CreateObjCommand(interp, argv[1], DbObjCmd, (char*)p, DbDeleteCmd);
   433    433     return TCL_OK;
   434    434   }
   435    435   
          436  +/*
          437  +** Provide a dummy Tcl_InitStubs if we are using this as a static
          438  +** library.
          439  +*/
          440  +#ifndef USE_TCL_STUBS
          441  +# undef  Tcl_InitStubs
          442  +# define Tcl_InitStubs(a,b,c)
          443  +#endif
          444  +
   436    445   /*
   437    446   ** Initialize this module.
   438    447   **
   439    448   ** This Tcl module contains only a single new Tcl command named "sqlite".
   440    449   ** (Hence there is no namespace.  There is no point in using a namespace
   441    450   ** if the extension only supplies one new name!)  The "sqlite" command is
   442    451   ** used to open a new SQLite database.  See the DbMain() routine above
   443    452   ** for additional information.
   444    453   */
   445    454   int Sqlite_Init(Tcl_Interp *interp){
          455  +  Tcl_InitStubs(interp, "8.0", 0);
          456  +  Tcl_CreateCommand(interp, "sqlite", DbMain, 0, 0);
          457  +  Tcl_PkgProvide(interp, "sqlite", "1.0");
          458  +  return TCL_OK;
          459  +}
          460  +int Tclsqlite_Init(Tcl_Interp *interp){
          461  +  Tcl_InitStubs(interp, "8.0", 0);
   446    462     Tcl_CreateCommand(interp, "sqlite", DbMain, 0, 0);
   447    463     Tcl_PkgProvide(interp, "sqlite", "1.0");
   448    464     return TCL_OK;
   449    465   }
   450    466   int Sqlite_SafeInit(Tcl_Interp *interp){
   451    467     return TCL_OK;
          468  +}
          469  +int Tclsqlite_SafeInit(Tcl_Interp *interp){
          470  +  return TCL_OK;
   452    471   }
   453    472   
   454    473   #if 0
   455    474   /*
   456    475   ** If compiled using mktclapp, this routine runs to initialize
   457    476   ** everything.
   458    477   */

Changes to www/changes.tcl.

    12     12   }
    13     13   
    14     14   
    15     15   proc chng {date desc} {
    16     16     puts "<DT><B>$date</B></DT>"
    17     17     puts "<DD><P><UL>$desc</UL></P></DD>"
    18     18   }
           19  +
           20  +chng {2001 Sep 28 (2.0.0)} {
           21  +<li>Automatically build binaries for Linux and Windows and put them on
           22  +    the website.</li>
           23  +}
           24  +
           25  +chng {2001 Sep 28 (2.0-alpha-4)} {
           26  +<li>Incorporate makefile patches form A. Rottmann to use LIBTOOL</li>
           27  +}
    19     28   
    20     29   chng {2001 Sep 27 (2.0-alpha-3)} {
    21     30   <li>SQLite now honors the UNIQUE keyword in CREATE UNIQUE INDEX.  Primary
    22     31       keys are required to be unique.</li>
    23     32   <li>File format changed back to what it was for alpha-1</li>
    24     33   <li>Fixes to the rollback and locking behavior</li>
    25     34   }

Changes to www/index.tcl.

     1      1   #
     2      2   # Run this TCL script to generate HTML for the index.html file.
     3      3   #
     4         -set rcsid {$Id: index.tcl,v 1.41 2001/09/25 01:51:00 drh Exp $}
            4  +set rcsid {$Id: index.tcl,v 1.42 2001/09/28 17:47:14 drh Exp $}
     5      5   
     6      6   puts {<html>
     7      7   <head><title>SQLite: An SQL Database Engine In A C Library</title></head>
     8      8   <body bgcolor=white>
     9      9   <h1 align=center>SQLite: An SQL Database Engine In A C Library</h1>
    10     10   <p align=center>}
    11     11   puts "This page was last modified on [lrange $rcsid 3 4] GMT<br>"
................................................................................
    23     23   access program (<a href="sqlite.html">sqlite</a>) that can
    24     24   be used to administer an SQLite database and which serves as
    25     25   an example of how to use the SQLite library.</p>
    26     26   
    27     27   <p>SQLite is <b>not</b> a client library used to connect to a
    28     28   big database server.  SQLite <b>is</b> the server.  The SQLite
    29     29   library reads and writes directly to and from the database files
    30         -on disk.</p>
           30  +on disk.</p>}
    31     31   
    32         -<h2>Features</h2>
           32  +puts {<table align="right"hspace="10">
           33  +<tr><td align="center" bgcolor="#8ee5ee">
           34  +<table border="2"><tr><td align="center">
           35  +<a href="download.html"><big><b>Download<br>SQLite
           36  +</td></tr></table>
           37  +</td></tr>
           38  +</table>}
           39  +
           40  +puts {<h2>Features</h2>
    33     41   
    34     42   <p><ul>
    35     43   <li>Implements a large subset of SQL92.</li>
    36     44   <li>A complete SQL database (with multiple tables and indices) is
    37     45       stored in a single disk file.</li>
    38     46   <li>Atomic commit and rollback protect data integrity.</li>
    39     47   <li>Small memory footprint: about 12000 lines of C code.</li>
    40     48   <li><a href="speed.html">Four times faster</a> than PostgreSQL.
    41     49       Twice as fast as SQLite 1.0.</li>
    42     50   <li>Very simple 
    43     51   <a href="c_interface.html">C/C++ interface</a> requires the use of only
    44     52   three functions and one opaque structure.</li>
    45         -<li>A TCL interface to the library is included.</li>
           53  +<li>A <a href="tclsqlite.html">TCL interface</a>
           54  +    to the library is included.</li>
    46     55   <li>A TCL-based test suite provides near 100% code coverage.</li>
    47     56   <li>Self-contained: no external dependencies.</li>
    48     57   <li>Built and tested under Linux and Win2K.</li>
    49     58   <li>Sources are uncopyrighted.  Use for any purpose.</li>
    50     59   </ul>
    51     60   </p>
    52     61   }
    53     62   
    54         -puts {<h2>Download</h2>}
           63  +puts {<h2>Download</h2>
    55     64   
    56         -puts {<table align="right"hspace="10">
    57         -<tr><td align="center" bgcolor="#8ee5ee">
    58         -<table border="2"><tr><td align="center">
    59         -<a href="sqlite.tar.gz"><big><b>Download SQLite<br>}
    60         -puts "version $vers<br>"
    61         -puts {Now!
    62         -</td></tr></table>
    63         -</td></tr>
    64         -</table>}
    65         -
    66         -
    67         -puts {<p>You can download a tarball containing all source
    68         -code for SQLite
           65  +<p>
           66  +Precompiled binaries for Linux and Windows and the complete
           67  +source tree are available for <a href="download.html">download</a>.
           68  +</p>
    69     69   }
    70         -puts "version $vers"
    71         -puts {
    72         -(including the TCL scripts that generate the
    73         -HTML files for this website) at <a href="sqlite.tar.gz">sqlite.tar.gz</a>.}
    74         -puts "This is a [file size sqlite.tar.gz] byte download."
    75         -set historical [lsort -dict [glob -nocomplain sqlite-*.tar.gz]]
    76         -if {$historical!=""} {
    77         -  puts {The following historical versions of SQLite are also available:}
    78         -  foreach x $historical {
    79         -     puts "<a href=\"$x\">$x</a> ([file size $x] bytes)"
    80         -  }
    81         -}
    82         -puts {</p>}
    83     70   
    84     71   puts {<h2>Current Status</h2>
    85     72   
    86     73   <p>A <a href="changes.html">change history</a> is available online.
    87     74   There are currently no <em>known</em> memory leaks or debilitating bugs
    88     75   in the library.  <a href="http://gcc.gnu.org/onlinedocs/gcov_1.html">Gcov</a>
    89     76   is used to verify test coverage.</p>
    90     77   
    91         -<p>Known bugs:</p>
    92         -
    93         -<ul>
    94         -<li><p>
    95         -  The LIKE operator is suppose to ignore case. 
    96         -  But it only ignores case for 7-bit Latin characters.
    97         -  The case of 8-bit iso8859 characters or UTF-8 characters is
    98         -  signification.  Hence, <b>'a'&nbsp;LIKE&nbsp;'A'</b> returns
    99         -  TRUE but <b>'&aelig;'&nbsp;LIKE&nbsp;'&AElig;'</b> returns FALSE.
   100         -</p></li>
   101         -</ul>
   102     78   
   103     79   <h2>Documentation</h2>
   104     80   
   105     81   <p>The following documentation is currently available:</p>
   106     82   
   107     83   <p><ul>
   108     84   <li>Information on the <a href="sqlite.html">sqlite</a>
................................................................................
   146    122   $ tar xzf sqlite.tar.gz      <i> Unpacks into directory named "sqlite" </i>
   147    123   $ mkdir bld                  <i> Create a separate build directory </i>
   148    124   $ cd bld
   149    125   $ ../sqlite/configure
   150    126   $ make                       <i> Builds "sqlite" and "libsqlite.a" </i>
   151    127   $ make test                  <i> Optional: run regression tests </i>
   152    128   </pre></blockquote>
   153         -
   154         -<p>The Win2K version of SQLite was built using the MingW32 cross-compiler
   155         -running under Linux.  You have to give the configure script hints to make
   156         -this work.  Read the comments at the beginning of the file
   157         -<b>configure.in</b> for additional information.  The source code is
   158         -general enough that it should be possible to compile SQLite using VC++,
   159         -though the author has no desire or motivation to try.
   160         -</p>
   161    129   }
   162    130   
   163    131   puts {<h2>Command-line Usage Example</h2>
   164    132   
   165    133   <p>Download the source archive and compile the <b>sqlite</b>
   166    134   program as described above.  Then type:</p>
   167    135   

Changes to www/lang.tcl.

     1      1   #
     2      2   # Run this Tcl script to generate the sqlite.html file.
     3      3   #
     4         -set rcsid {$Id: lang.tcl,v 1.9 2001/09/20 01:44:44 drh Exp $}
            4  +set rcsid {$Id: lang.tcl,v 1.10 2001/09/28 17:47:14 drh Exp $}
     5      5   
     6      6   puts {<html>
     7      7   <head>
     8      8     <title>Query Language Understood By SQLite</title>
     9      9   </head>
    10     10   <body bgcolor=white>
    11     11   <h1 align=center>
................................................................................
   115    115   Syntax {sql-statement} {
   116    116   ROLLBACK [TRANSACTION [<name>]]
   117    117   }
   118    118   
   119    119   puts {
   120    120   <p>Beginning in version 2.0, SQLite supports transactions with
   121    121   rollback and atomic commit.  However, only a single level of
   122         -transaction is required.  In other words, transactions
          122  +transaction is allowed.  In other words, transactions
   123    123   may not be nested.
   124    124   </p>
   125    125   
   126    126   <p>
   127    127   No changes can be made to the database except within a transaction.
   128    128   Any command that changes the database (basically, any SQL command
   129    129   other than SELECT) will automatically starts a transaction if
................................................................................
   169    169   <p>When the input data source is STDIN, the input can be terminated
   170    170   by a line that contains only a baskslash and a dot:}
   171    171   puts "\"[Operator \\.]\".</p>"
   172    172   
   173    173   Section {CREATE INDEX} createindex
   174    174   
   175    175   Syntax {sql-statement} {
   176         -CREATE INDEX <index-name> 
          176  +CREATE [UNIQUE] INDEX <index-name> 
   177    177   ON <table-name> ( <column-name> [, <column-name>]* )
   178    178   } {column-name} {
   179    179   <name> [ ASC | DESC ]
   180    180   }
   181    181   
   182    182   puts {
   183    183   <p>The CREATE INDEX command consists of the keywords "CREATE INDEX" followed
................................................................................
   186    186   columns in the table that are used for the index key.
   187    187   Each column name can be followed by one of the "ASC" or "DESC" keywords
   188    188   to indicate sort order, but the sort order is ignored in the current
   189    189   implementation.</p>
   190    190   
   191    191   <p>There are no arbitrary limits on the number of indices that can be
   192    192   attached to a single table, nor on the number of columns in an index.</p>
          193  +
          194  +<p>If the UNIQUE keyword appears between CREATE and INDEX then duplicate
          195  +index entries are not allowed.  Any attempt to insert a duplicate entry
          196  +will result in a rollback and an error message.</p>
   193    197   
   194    198   <p>The exact text
   195    199   of each CREATE INDEX statement is stored in the <b>sqlite_master</b>
   196    200   table.  Everytime the database is opened, all CREATE INDEX statements
   197    201   are read from the <b>sqlite_master</b> table and used to regenerate
   198    202   SQLite's internal representation of the index layout.</p>
   199    203   }
................................................................................
   230    234   definitions and constraints.  The table name can be either an identifier
   231    235   or a string.  The only reserved table name is "<b>sqlite_master</b>" which
   232    236   is the name of the table that records the database schema.</p>
   233    237   
   234    238   <p>Each column definition is the name of the column followed by the
   235    239   datatype for that column, then one or more optional column constraints.
   236    240   The datatype for the column is ignored.  All information
   237         -is stored as null-terminated strings.  The constraints are also ignored,
   238         -except that the PRIMARY KEY constraint will cause an index to be automatically
   239         -created that implements the primary key and the DEFAULT constraint
   240         -which specifies a default value to use when doing an INSERT.
          241  +is stored as null-terminated strings.
          242  +The UNIQUE constraint causes an index to be created on the specified
          243  +columns.  This index must contain unique keys.  The PRIMARY KEY constraint
          244  +is an alias for UNIQUE.
          245  +The DEFAULT constraint
          246  +specifies a default value to use when doing an INSERT.
   241    247   </p>
   242    248   
   243    249   <p>There are no arbitrary limits on the number
   244    250   of columns or on the number of constraints in a table.
   245    251   The total amount of data in a single row is limited to 65535 bytes.</p>
   246    252   
   247    253   <p>The exact text