mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Merge in the latest trunk changes, including partial indexes, the MAX_PATH
fix in os_win.c, and the sqlite3_cancel_auto_extension() API. FossilOrigin-Name: 7e1acb390770d1bd189fac7a3a7f96106f96e3a4
This commit is contained in:
@@ -161,9 +161,6 @@
|
||||
** will cause HeapValidate to be called. If heap validation should fail, an
|
||||
** assertion will be triggered.
|
||||
**
|
||||
** (Historical note: There used to be several other options, but we've
|
||||
** pared it down to just these three.)
|
||||
**
|
||||
** If none of the above are defined, then set SQLITE_SYSTEM_MALLOC as
|
||||
** the default.
|
||||
*/
|
||||
@@ -201,20 +198,13 @@
|
||||
# define _XOPEN_SOURCE 600
|
||||
#endif
|
||||
|
||||
/*
|
||||
** The TCL headers are only needed when compiling the TCL bindings.
|
||||
*/
|
||||
#if defined(SQLITE_TCL) || defined(TCLSH)
|
||||
# include <tcl.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
** NDEBUG and SQLITE_DEBUG are opposites. It should always be true that
|
||||
** defined(NDEBUG)==!defined(SQLITE_DEBUG). If this is not currently true,
|
||||
** make it true by defining or undefining NDEBUG.
|
||||
**
|
||||
** Setting NDEBUG makes the code smaller and run faster by disabling the
|
||||
** number assert() statements in the code. So we want the default action
|
||||
** Setting NDEBUG makes the code smaller and faster by disabling the
|
||||
** assert() statements in the code. So we want the default action
|
||||
** to be for NDEBUG to be set and NDEBUG to be undefined only if SQLITE_DEBUG
|
||||
** is set. Thus NDEBUG becomes an opt-in rather than an opt-out
|
||||
** feature.
|
||||
@@ -284,7 +274,7 @@
|
||||
** In other words, ALWAYS and NEVER are added for defensive code.
|
||||
**
|
||||
** When doing coverage testing ALWAYS and NEVER are hard-coded to
|
||||
** be true and false so that the unreachable code then specify will
|
||||
** be true and false so that the unreachable code they specify will
|
||||
** not be counted as untested code.
|
||||
*/
|
||||
#if defined(SQLITE_COVERAGE_TEST)
|
||||
@@ -308,16 +298,12 @@
|
||||
/*
|
||||
** The macro unlikely() is a hint that surrounds a boolean
|
||||
** expression that is usually false. Macro likely() surrounds
|
||||
** a boolean expression that is usually true. GCC is able to
|
||||
** use these hints to generate better code, sometimes.
|
||||
** a boolean expression that is usually true. These hints could,
|
||||
** in theory, be used by the compiler to generate better code, but
|
||||
** currently they are just comments for human readers.
|
||||
*/
|
||||
#if defined(__GNUC__) && 0
|
||||
# define likely(X) __builtin_expect((X),1)
|
||||
# define unlikely(X) __builtin_expect((X),0)
|
||||
#else
|
||||
# define likely(X) !!(X)
|
||||
# define unlikely(X) !!(X)
|
||||
#endif
|
||||
#define likely(X) (X)
|
||||
#define unlikely(X) (X)
|
||||
|
||||
#include "sqlite3.h"
|
||||
#include "hash.h"
|
||||
@@ -1560,6 +1546,7 @@ struct Index {
|
||||
Schema *pSchema; /* Schema containing this index */
|
||||
u8 *aSortOrder; /* for each column: True==DESC, False==ASC */
|
||||
char **azColl; /* Array of collation sequence names for index */
|
||||
Expr *pPartIdxWhere; /* WHERE clause for partial indices */
|
||||
int tnum; /* DB Page containing root of this index */
|
||||
u16 nColumn; /* Number of columns in table used by this index */
|
||||
u8 onError; /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
|
||||
@@ -2040,6 +2027,7 @@ struct NameContext {
|
||||
#define NC_InAggFunc 0x08 /* True if analyzing arguments to an agg func */
|
||||
#define NC_AsMaybe 0x10 /* Resolve to AS terms of the result set only
|
||||
** if no other resolution is available */
|
||||
#define NC_PartIdx 0x20 /* True if resolving a partial index WHERE */
|
||||
|
||||
/*
|
||||
** An instance of the following structure contains all information
|
||||
@@ -2224,6 +2212,7 @@ struct Parse {
|
||||
int nSet; /* Number of sets used so far */
|
||||
int nOnce; /* Number of OP_Once instructions so far */
|
||||
int ckBase; /* Base register of data during check constraints */
|
||||
int iPartIdxTab; /* Table corresponding to a partial index */
|
||||
int iCacheLevel; /* ColCache valid when aColCache[].iLevel<=iCacheLevel */
|
||||
int iCacheCnt; /* Counter used to generate aColCache[].lru values */
|
||||
struct yColCache {
|
||||
@@ -2809,7 +2798,7 @@ void sqlite3SrcListAssignCursors(Parse*, SrcList*);
|
||||
void sqlite3IdListDelete(sqlite3*, IdList*);
|
||||
void sqlite3SrcListDelete(sqlite3*, SrcList*);
|
||||
Index *sqlite3CreateIndex(Parse*,Token*,Token*,SrcList*,ExprList*,int,Token*,
|
||||
Token*, int, int);
|
||||
Expr*, int, int);
|
||||
void sqlite3DropIndex(Parse*, SrcList*, int);
|
||||
int sqlite3Select(Parse*, Select*, SelectDest*);
|
||||
Select *sqlite3SelectNew(Parse*,ExprList*,SrcList*,Expr*,ExprList*,
|
||||
@@ -2857,8 +2846,9 @@ void sqlite3UnlinkAndDeleteIndex(sqlite3*,int,const char*);
|
||||
void sqlite3Vacuum(Parse*);
|
||||
int sqlite3RunVacuum(char**, sqlite3*);
|
||||
char *sqlite3NameFromToken(sqlite3*, Token*);
|
||||
int sqlite3ExprCompare(Expr*, Expr*);
|
||||
int sqlite3ExprListCompare(ExprList*, ExprList*);
|
||||
int sqlite3ExprCompare(Expr*, Expr*, int);
|
||||
int sqlite3ExprListCompare(ExprList*, ExprList*, int);
|
||||
int sqlite3ExprImpliesExpr(Expr*, Expr*, int);
|
||||
void sqlite3ExprAnalyzeAggregates(NameContext*, Expr*);
|
||||
void sqlite3ExprAnalyzeAggList(NameContext*,ExprList*);
|
||||
int sqlite3FunctionUsesThisSrc(Expr*, SrcList*);
|
||||
@@ -2885,7 +2875,7 @@ int sqlite3ExprNeedsNoAffinityChange(const Expr*, char);
|
||||
int sqlite3IsRowid(const char*);
|
||||
void sqlite3GenerateRowDelete(Parse*, Table*, int, int, int, Trigger *, int);
|
||||
void sqlite3GenerateRowIndexDelete(Parse*, Table*, int, int*);
|
||||
int sqlite3GenerateIndexKey(Parse*, Index*, int, int, int);
|
||||
int sqlite3GenerateIndexKey(Parse*, Index*, int, int, int, int*);
|
||||
void sqlite3GenerateConstraintChecks(Parse*,Table*,int,int,
|
||||
int*,int,int,int,int,int*);
|
||||
void sqlite3CompleteInsertion(Parse*, Table*, int, int, int*, int, int, int);
|
||||
@@ -3088,6 +3078,7 @@ void sqlite3SelectPrep(Parse*, Select*, NameContext*);
|
||||
int sqlite3MatchSpanName(const char*, const char*, const char*, const char*);
|
||||
int sqlite3ResolveExprNames(NameContext*, Expr*);
|
||||
void sqlite3ResolveSelectNames(Parse*, Select*, NameContext*);
|
||||
void sqlite3ResolveSelfReference(Parse*,Table*,int,Expr*,ExprList*);
|
||||
int sqlite3ResolveOrderGroupBy(Parse*, Select*, ExprList*, const char*);
|
||||
void sqlite3ColumnDefault(Vdbe *, Table *, int, int);
|
||||
void sqlite3AlterFinishAddColumn(Parse *, Token *);
|
||||
|
||||
Reference in New Issue
Block a user