]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Update comments. Remove unused field from the Index structure. (CVS 921)
authordrh <drh@noemail.net>
Sun, 20 Apr 2003 00:00:23 +0000 (00:00 +0000)
committerdrh <drh@noemail.net>
Sun, 20 Apr 2003 00:00:23 +0000 (00:00 +0000)
FossilOrigin-Name: 7084e05093e72f6e5b65ff0b574336898396826f

manifest
manifest.uuid
src/build.c
src/sqliteInt.h

index c727bdc3b2819cbec1c8f9b3175a55a42ee78702..d4199d616b8fccfaaec3f19777f78ba3955565d0 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Modify\sthe\soptimizer\sso\sthat\sit\sdoes\snot\sassume\sthat\sfunctions\sare\nconstant.\s(CVS\s920)
-D 2003-04-19T17:27:25
+C Update\scomments.\s\sRemove\sunused\sfield\sfrom\sthe\sIndex\sstructure.\s(CVS\s921)
+D 2003-04-20T00:00:24
 F Makefile.in df3a4db41a7450468b5fe934d9dd8f723b631249
 F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@@ -24,7 +24,7 @@ F src/auth.c 2dd558dba4d8ffbed25fe1644e9af242f389f3e9
 F src/btree.c b9487cceb9ea78af9cbae9def34114902f511736
 F src/btree.h 529c98cb0715c62214544fbbe50b946f99a85540
 F src/btree_rb.c b14803c84dc1c8fb51f5db1542237b7b7d411957
-F src/build.c 6694013c86c4c480754f515ddab561302c6e732a
+F src/build.c 66f8ca2457dfdcc6c45e1606696f337418a8c556
 F src/copy.c 8699e571994934c78f70761a1458d7b9e9e75073
 F src/delete.c af65b26d9d13abbf63fdc4e97b88d26c700b04bb
 F src/encode.c faf03741efe921755ec371cf4a6984536de00042
@@ -47,7 +47,7 @@ F src/select.c 07140aaf5f2e209dd7bf8a681401a412ce16dc04
 F src/shell.c a0b7043713713ff45f666ce6b3c03a64109a8bb5
 F src/shell.tcl 27ecbd63dd88396ad16d81ab44f73e6c0ea9d20e
 F src/sqlite.h.in f49c2cdec7d24cb03e496a1ca519e16306495ee1
-F src/sqliteInt.h 757c82342dbcf90867471e59a1f4e34ed4d34290
+F src/sqliteInt.h c4f4866cce8f069574268969167b5f8041802edd
 F src/table.c eed2098c9b577aa17f8abe89313a9c4413f57d63
 F src/tclsqlite.c 7a072c3c8ba9796edc25e5ffa62b68558134e192
 F src/test1.c 7ad4e6308dde0bf5a0f0775ce20cb2ec37a328f8
@@ -162,7 +162,7 @@ F www/speed.tcl cb4c10a722614aea76d2c51f32ee43400d5951be
 F www/sqlite.tcl ae3dcfb077e53833b59d4fcc94d8a12c50a44098
 F www/tclsqlite.tcl 1db15abeb446aad0caf0b95b8b9579720e4ea331
 F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218
-P 9b619c98b586a207a87942640d3a94220ff8ab02
-R 7412289c17f86b36c7e9e5ef2d7e5a25
+P 767f1af236d115e8388e1dcc28a4df1be48d6c85
+R 36dfa6d5306b8b01a3a590f7c2277b76
 U drh
-Z f9b7a3e33fd7e690b2414333a1a1aca5
+Z 7a756c9352dc04a8dce7c22eae170166
index b173b6f0fc4560efd026950597236e0d26ac9d96..b1266713e778e229384f8dcf2cb687e40231eae7 100644 (file)
@@ -1 +1 @@
-767f1af236d115e8388e1dcc28a4df1be48d6c85
\ No newline at end of file
+7084e05093e72f6e5b65ff0b574336898396826f
\ No newline at end of file
index 44c4827328932d30adf6bb3709d13a8c5a668580..b327ec1e974ce9f6107c53454c073b5c93ef5b75 100644 (file)
@@ -23,7 +23,7 @@
 **     ROLLBACK
 **     PRAGMA
 **
-** $Id: build.c,v 1.146 2003/04/17 22:57:53 drh Exp $
+** $Id: build.c,v 1.147 2003/04/20 00:00:24 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -1630,7 +1630,7 @@ void sqliteCreateIndex(
   strcpy(pIndex->zName, zName);
   pIndex->pTable = pTab;
   pIndex->nColumn = pList->nId;
-  pIndex->onError = pIndex->isUnique = onError;
+  pIndex->onError = onError;
   pIndex->autoIndex = pName==0;
   pIndex->iDb = isTemp ? 1 : pParse->iDb;
 
index 74a8752c49e1c94db60e6bdb6885b417fee9935d..5d128c7d0ff94686a8dbd50fb183aa2d360ff8b2 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** Internal interface definitions for SQLite.
 **
-** @(#) $Id: sqliteInt.h,v 1.175 2003/04/17 22:57:54 drh Exp $
+** @(#) $Id: sqliteInt.h,v 1.176 2003/04/20 00:00:24 drh Exp $
 */
 #include "config.h"
 #include "sqlite.h"
@@ -295,13 +295,6 @@ struct sqlite {
 #endif
 };
 
-/*
-** The following are the indices of in sqlite.aDb[] of the main database
-** file and the file used to store TEMP tables.
-*/
-#define DB_TMP     0
-#define DB_MAIN    1
-
 /*
 ** Possible values for the sqlite.flags.
 */
@@ -442,7 +435,7 @@ struct Table {
 ** the from-table is created.  The existance of the to-table is not checked
 ** until an attempt is made to insert data into the from-table.
 **
-** The sqlite.aFKey hash table stores pointers to to this structure
+** The sqlite.aFKey hash table stores pointers to this structure
 ** given the name of a to-table.  For each to-table, all foreign keys
 ** associated with that table are on a linked list using the FKey.pNextTo
 ** field.
@@ -520,6 +513,13 @@ struct FKey {
 ** first column to be indexed (c3) has an index of 2 in Ex1.aCol[].
 ** The second column to be indexed (c1) has an index of 0 in
 ** Ex1.aCol[], hence Ex2.aiColumn[1]==0.
+**
+** The Index.onError field determines whether or not the indexed columns
+** must be unique and what to do if they are not.  When Index.onError=OE_None,
+** it means this is not a unique index.  Otherwise it is a unique index
+** and the value of Index.onError indicate the which conflict resolution 
+** algorithm to employ whenever an attempt is made to insert a non-unique
+** element.
 */
 struct Index {
   char *zName;     /* Name of this index */
@@ -527,7 +527,6 @@ struct Index {
   int *aiColumn;   /* Which columns are used by this index.  1st is 0 */
   Table *pTable;   /* The SQL table being indexed */
   int tnum;        /* Page containing root of this index in database file */
-  u8 isUnique;     /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
   u8 onError;      /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
   u8 autoIndex;    /* True if is automatically created (ex: by UNIQUE) */
   u8 iDb;          /* Index in sqlite.aDb[] of where this index is stored */
@@ -850,18 +849,6 @@ struct Parse {
  *
  * The "step_list" member points to the first element of a linked list
  * containing the SQL statements specified as the trigger program.
- *
- * When a trigger is initially created, the "isCommit" member is set to FALSE.
- * When a transaction is rolled back, any Trigger structures with "isCommit" set
- * to FALSE are deleted by the logic in sqliteRollbackInternalChanges(). When
- * a transaction is commited, the "isCommit" member is set to TRUE for any
- * Trigger structures for which it is FALSE.
- *
- * When a trigger is dropped, using the sqliteDropTrigger() interfaced, it is 
- * removed from the trigHash hash table and added to the trigDrop hash table.
- * If the transaction is rolled back, the trigger is re-added into the trigHash
- * hash table (and hence the database schema). If the transaction is commited,
- * then the Trigger structure is deleted permanently.
  */
 struct Trigger {
   char *name;             /* The name of the trigger                        */