diff --git a/manifest b/manifest index 5c329a2ff3..a54c16f033 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Remove\sdead\scode\sfrom\svdbeaux.c.\s\sAdd\scomments\sdescribing\sdesired\schanges\nto\sOP_Sort\sprocessing\sin\sselect.c\s(CVS\s1398) -D 2004-05-18T22:38:32 +C Add\sdefinitions\sof\sthe\sCollSeq\sand\sKeyInfo\sstructures.\s(CVS\s1399) +D 2004-05-18T23:21:36 F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd @@ -49,7 +49,7 @@ F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3 F src/select.c 2981cafe3b21ca06c97ddec8c7181f209a06ee82 F src/shell.c 0c4662e13bfbfd3d13b066c5859cc97ad2f95d21 F src/sqlite.h.in 799c5e726296ec7bc20e6407cdf4df0e0bc00c0c -F src/sqliteInt.h 9e35491dc2fb88f792744d2e6c1cd172e0c28829 +F src/sqliteInt.h 1da4a9c26da43f235c45c1de0c49fadf6c40d0e6 F src/table.c af14284fa36c8d41f6829e3f2819dce07d3e2de2 F src/tclsqlite.c fbf0fac73624ae246551a6c671f1de0235b5faa1 F src/test1.c 12ef76b8aaba4408422f21f269256b630d4dd627 @@ -64,9 +64,9 @@ F src/utf.c fc799748d43fe1982d157b871e3e420a19c85d4f F src/util.c 6d4339b7f05ccdacaebcce67e7fb8c5b880620e8 F src/vacuum.c c134702e023db8778e6be59ac0ea7b02315b5476 F src/vdbe.c 37c3d0c45fd6bd7096ae50d08e864acf41924b34 -F src/vdbe.h 1d0d0b5741c7f46ab372a95a4305fed0ae09d466 +F src/vdbe.h 314e9c07db73a42a6ba91ab7539e27652fc88870 F src/vdbeInt.h 5bac5f0f468205f6e43a4ba86a807abff4953abb -F src/vdbeaux.c 1d447c912c6cde3629c99073eacb4604b201ab16 +F src/vdbeaux.c 95f5a9ff770794f5165d5827d2343eb2d83d7a6d F src/where.c 5f480219a943b0fed1f6922d2fdbfba8616a9148 F test/all.test 569a92a8ee88f5300c057cc4a8f50fbbc69a3242 F test/attach.test cb9b884344e6cfa5e165965d5b1adea679a24c83 @@ -193,7 +193,7 @@ F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604 F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1 F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4 -P 238442bbd267faee3eb70048bd9419af99c02931 -R 14afd092ade15d8c91f5ce918c3cd94a +P ae37e8a0bff39fd1568eae83f8761c34cd0184fc +R 3c5b4370c9c3ea00ed8ad90f1394d1c1 U drh -Z aa7deeaa1cefc9fd6080f4f67691aaa6 +Z b84fedd6f94a949476c1655f09bd2d6c diff --git a/manifest.uuid b/manifest.uuid index 55b9b4ad57..58547655f3 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -ae37e8a0bff39fd1568eae83f8761c34cd0184fc \ No newline at end of file +cd1be81569aa6d5a365eb27b7d067a153079ce45 \ No newline at end of file diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 7f1bb00905..9334083fb7 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -11,7 +11,7 @@ ************************************************************************* ** Internal interface definitions for SQLite. ** -** @(#) $Id: sqliteInt.h,v 1.236 2004/05/18 10:06:26 danielk1977 Exp $ +** @(#) $Id: sqliteInt.h,v 1.237 2004/05/18 23:21:36 drh Exp $ */ #include "config.h" #include "sqlite.h" @@ -259,6 +259,7 @@ typedef struct FKey FKey; typedef struct Db Db; typedef struct AuthContext AuthContext; typedef struct KeyClass KeyClass; +typedef struct CollSeq CollSeq; /* ** Each database file to be accessed by the system is an instance @@ -369,6 +370,8 @@ struct sqlite { void *pCommitArg; /* Argument to xCommitCallback() */ int (*xCommitCallback)(void*);/* Invoked at every commit. */ Hash aFunc; /* All functions that can be in SQL exprs */ + Hash aCollSeq; /* All collating sequences */ + CollSeq *pDfltColl; /* The default collating sequence (memcmp) */ i64 lastRowid; /* ROWID of most recent insert (see above) */ i64 priorNewRowid; /* Last randomly generated ROWID */ int magic; /* Magic number for detect library misuse */ @@ -455,13 +458,30 @@ struct Column { char *zName; /* Name of this column */ char *zDflt; /* Default value of this column */ char *zType; /* Data type for this column */ + CollSeq *pColl; /* Collating sequence. If NULL, use the default */ u8 notNull; /* True if there is a NOT NULL constraint */ u8 isPrimKey; /* True if this column is part of the PRIMARY KEY */ -// u8 sortOrder; /* Some combination of SQLITE_SO_... values */ char affinity; /* One of the SQLITE_AFF_... values */ u8 dottedName; /* True if zName contains a "." character */ }; +/* +** A "Collating Sequence" is defined by an instance of the following +** structure. Every collating sequence has a name and a comparison +** function that defines the order of text for that sequence. The +** CollSeq.pUser parameter is an extra parameter that passed in as +** the first argument to the comparison function. +** +** If CollSeq.xCmp is NULL, it means that the collating sequence is +** undefined. Indices built on an undefined collating sequence may +** not be read or written. +*/ +struct CollSeq { + char *zName; /* Name of the collating sequence */ + void *pUser; /* First argument to xCmp() */ + int (*xCmp)(void*,int,const void*,int,const void*); /* Comparison function */ +}; + /* ** The allowed sort orders. ** @@ -705,6 +725,7 @@ struct Token { struct Expr { u8 op; /* Operation performed by this node */ u8 dataType; /* Either SQLITE_SO_TEXT or SQLITE_SO_NUM */ + char affinity; /* The affinity of the column or 0 if not a column */ u8 iDb; /* Database referenced by this expression */ u8 flags; /* Various flags. See below */ Expr *pLeft, *pRight; /* Left and right subnodes */ @@ -718,7 +739,6 @@ struct Expr { ** result from the iAgg-th element of the aggregator */ Select *pSelect; /* When the expression is a sub-select. Also the ** right side of " IN (