mirror of
https://github.com/php/php-src.git
synced 2025-08-20 01:14:28 +02:00
Upgrade bundled libsqlite to 2.8.9
This commit is contained in:
parent
2cf3cb6407
commit
a4ea8eb44e
37 changed files with 5000 additions and 6182 deletions
|
|
@ -87,6 +87,8 @@
|
|||
/* #define SQLITE_OMIT_AUTHORIZATION 1 */
|
||||
/* #define SQLITE_OMIT_INMEMORYDB 1 */
|
||||
/* #define SQLITE_OMIT_VACUUM 1 */
|
||||
/* #define SQLITE_OMIT_DATETIME_FUNCS 1 */
|
||||
/* #define SQLITE_OMIT_PROGRESS_CALLBACK 1 */
|
||||
|
||||
/*
|
||||
** Integers of known sizes. These typedefs might change for architectures
|
||||
|
|
@ -318,15 +320,18 @@ struct sqlite {
|
|||
int magic; /* Magic number for detect library misuse */
|
||||
int nChange; /* Number of rows changed */
|
||||
struct Vdbe *pVdbe; /* List of active virtual machines */
|
||||
#ifndef SQLITE_OMIT_TRACE
|
||||
void (*xTrace)(void*,const char*); /* Trace function */
|
||||
void *pTraceArg; /* Argument to the trace function */
|
||||
#endif
|
||||
#ifndef SQLITE_OMIT_AUTHORIZATION
|
||||
int (*xAuth)(void*,int,const char*,const char*,const char*,const char*);
|
||||
/* Access authorization function */
|
||||
void *pAuthArg; /* 1st argument to the access auth function */
|
||||
#endif
|
||||
#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
|
||||
int (*xProgress)(void *); /* The progress callback */
|
||||
void *pProgressArg; /* Argument to the progress callback */
|
||||
int nProgressOps; /* Number of opcodes for progress callback */
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -385,7 +390,7 @@ struct Column {
|
|||
char *zDflt; /* Default value of this column */
|
||||
char *zType; /* Data type for this column */
|
||||
u8 notNull; /* True if there is a NOT NULL constraint */
|
||||
u8 isPrimKey; /* True if this column is an INTEGER PRIMARY KEY */
|
||||
u8 isPrimKey; /* True if this column is part of the PRIMARY KEY */
|
||||
u8 sortOrder; /* Some combination of SQLITE_SO_... values */
|
||||
};
|
||||
|
||||
|
|
@ -605,7 +610,9 @@ struct Token {
|
|||
** it can be accessed after all aggregates are computed.
|
||||
**
|
||||
** If the expression is a function, the Expr.iTable is an integer code
|
||||
** representing which function.
|
||||
** representing which function. If the expression is an unbound variable
|
||||
** marker (a question mark character '?' in the original SQL) then the
|
||||
** Expr.iTable holds the index number for that variable.
|
||||
**
|
||||
** The Expr.pSelect field points to a SELECT statement. The SELECT might
|
||||
** be the right operand of an IN operator. Or, if a scalar SELECT appears
|
||||
|
|
@ -634,7 +641,6 @@ struct Expr {
|
|||
** The following are the meanings of bits in the Expr.flags field.
|
||||
*/
|
||||
#define EP_FromJoin 0x0001 /* Originated in ON or USING clause of a join */
|
||||
#define EP_Oracle8Join 0x0002 /* Carries the Oracle8 "(+)" join operator */
|
||||
|
||||
/*
|
||||
** These macros can be used to test, set, or clear bits in the
|
||||
|
|
@ -655,6 +661,7 @@ struct Expr {
|
|||
*/
|
||||
struct ExprList {
|
||||
int nExpr; /* Number of expressions on the list */
|
||||
int nAlloc; /* Number of entries allocated below */
|
||||
struct ExprList_item {
|
||||
Expr *pExpr; /* The list of expressions */
|
||||
char *zName; /* Token associated with this expression */
|
||||
|
|
@ -681,6 +688,7 @@ struct ExprList {
|
|||
*/
|
||||
struct IdList {
|
||||
int nId; /* Number of identifiers on the list */
|
||||
int nAlloc; /* Number of entries allocated for a[] below */
|
||||
struct IdList_item {
|
||||
char *zName; /* Name of the identifier */
|
||||
int idx; /* Index in some Table.aCol[] of a column named zName */
|
||||
|
|
@ -699,7 +707,8 @@ struct IdList {
|
|||
** now be identified by a database name, a dot, then the table name: ID.ID.
|
||||
*/
|
||||
struct SrcList {
|
||||
int nSrc; /* Number of tables or subqueries in the FROM clause */
|
||||
u16 nSrc; /* Number of tables or subqueries in the FROM clause */
|
||||
u16 nAlloc; /* Number of entries allocated in a[] below */
|
||||
struct SrcList_item {
|
||||
char *zDatabase; /* Name of database holding this table */
|
||||
char *zName; /* Name of the table */
|
||||
|
|
@ -780,16 +789,17 @@ struct WhereInfo {
|
|||
** in the VDBE that record the limit and offset counters.
|
||||
*/
|
||||
struct Select {
|
||||
int isDistinct; /* True if the DISTINCT keyword is present */
|
||||
ExprList *pEList; /* The fields of the result */
|
||||
u8 op; /* One of: TK_UNION TK_ALL TK_INTERSECT TK_EXCEPT */
|
||||
u8 isDistinct; /* True if the DISTINCT keyword is present */
|
||||
SrcList *pSrc; /* The FROM clause */
|
||||
Expr *pWhere; /* The WHERE clause */
|
||||
ExprList *pGroupBy; /* The GROUP BY clause */
|
||||
Expr *pHaving; /* The HAVING clause */
|
||||
ExprList *pOrderBy; /* The ORDER BY clause */
|
||||
int op; /* One of: TK_UNION TK_ALL TK_INTERSECT TK_EXCEPT */
|
||||
Select *pPrior; /* Prior select in a compound select statement */
|
||||
int nLimit, nOffset; /* LIMIT and OFFSET values. -1 means not used */
|
||||
int iLimit, iOffset; /* Memory registers holding LIMIT & OFFSET counters */
|
||||
char *zSelect; /* Complete text of the SELECT command */
|
||||
};
|
||||
|
||||
|
|
@ -863,6 +873,7 @@ struct Parse {
|
|||
int nMem; /* Number of memory cells used so far */
|
||||
int nSet; /* Number of sets used so far */
|
||||
int nAgg; /* Number of aggregate expressions */
|
||||
int nVar; /* Number of '?' variables seen in the SQL so far */
|
||||
AggExpr *aAgg; /* An array of aggregate expressions */
|
||||
const char *zAuthContext; /* The 6th parameter to db->xAuth callbacks */
|
||||
Trigger *pNewTrigger; /* Trigger under construct by a CREATE TRIGGER */
|
||||
|
|
@ -1090,7 +1101,7 @@ void sqliteSrcListAddAlias(SrcList*, Token*);
|
|||
void sqliteSrcListAssignCursors(Parse*, SrcList*);
|
||||
void sqliteIdListDelete(IdList*);
|
||||
void sqliteSrcListDelete(SrcList*);
|
||||
void sqliteCreateIndex(Parse*,Token*,SrcList*,IdList*,int,int,Token*,Token*);
|
||||
void sqliteCreateIndex(Parse*,Token*,SrcList*,IdList*,int,Token*,Token*);
|
||||
void sqliteDropIndex(Parse*, SrcList*);
|
||||
void sqliteAddKeyType(Vdbe*, ExprList*);
|
||||
void sqliteAddIdxKeyType(Vdbe*, Index*);
|
||||
|
|
@ -1114,6 +1125,7 @@ Index *sqliteFindIndex(sqlite*,const char*, const char*);
|
|||
void sqliteUnlinkAndDeleteIndex(sqlite*,Index*);
|
||||
void sqliteCopy(Parse*, SrcList*, Token*, Token*, int);
|
||||
void sqliteVacuum(Parse*, Token*);
|
||||
int sqliteRunVacuum(char**, sqlite*);
|
||||
int sqliteGlobCompare(const unsigned char*,const unsigned char*);
|
||||
int sqliteLikeCompare(const unsigned char*,const unsigned char*);
|
||||
char *sqliteTableNameFromToken(Token*);
|
||||
|
|
@ -1148,6 +1160,7 @@ IdList *sqliteIdListDup(IdList*);
|
|||
Select *sqliteSelectDup(Select*);
|
||||
FuncDef *sqliteFindFunction(sqlite*,const char*,int,int,int);
|
||||
void sqliteRegisterBuiltinFunctions(sqlite*);
|
||||
void sqliteRegisterDateTimeFunctions(sqlite*);
|
||||
int sqliteSafetyOn(sqlite*);
|
||||
int sqliteSafetyOff(sqlite*);
|
||||
int sqliteSafetyCheck(sqlite*);
|
||||
|
|
@ -1176,9 +1189,9 @@ void sqliteDeferForeignKey(Parse*, int);
|
|||
void sqliteAuthContextPop(AuthContext*);
|
||||
#else
|
||||
# define sqliteAuthRead(a,b,c)
|
||||
# define sqliteAuthCheck(a,b,c,d) SQLITE_OK
|
||||
# define sqliteAuthCheck(a,b,c,d,e) SQLITE_OK
|
||||
# define sqliteAuthContextPush(a,b,c)
|
||||
# define sqliteAuthContextPop(a)
|
||||
# define sqliteAuthContextPop(a) ((void)(a))
|
||||
#endif
|
||||
void sqliteAttach(Parse*, Token*, Token*);
|
||||
void sqliteDetach(Parse*, Token*);
|
||||
|
|
@ -1190,3 +1203,6 @@ int sqliteFixSelect(DbFixer*, Select*);
|
|||
int sqliteFixExpr(DbFixer*, Expr*);
|
||||
int sqliteFixExprList(DbFixer*, ExprList*);
|
||||
int sqliteFixTriggerStep(DbFixer*, TriggerStep*);
|
||||
double sqliteAtoF(const char *z);
|
||||
int sqlite_snprintf(int,char*,const char*,...);
|
||||
int sqliteFitsIn32Bits(const char *);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue