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:
@@ -44,6 +44,9 @@ typedef struct VdbeSorter VdbeSorter;
|
||||
/* Opaque type used by the explainer */
|
||||
typedef struct Explain Explain;
|
||||
|
||||
/* Elements of the linked list at Vdbe.pAuxData */
|
||||
typedef struct AuxData AuxData;
|
||||
|
||||
/*
|
||||
** A cursor is a pointer into a single BTree within a database file.
|
||||
** The cursor can seek to a BTree entry with a particular key, or
|
||||
@@ -230,23 +233,19 @@ struct Mem {
|
||||
#define memIsValid(M) ((M)->flags & MEM_Invalid)==0
|
||||
#endif
|
||||
|
||||
|
||||
/* A VdbeFunc is just a FuncDef (defined in sqliteInt.h) that contains
|
||||
** additional information about auxiliary information bound to arguments
|
||||
** of the function. This is used to implement the sqlite3_get_auxdata()
|
||||
** and sqlite3_set_auxdata() APIs. The "auxdata" is some auxiliary data
|
||||
** that can be associated with a constant argument to a function. This
|
||||
** allows functions such as "regexp" to compile their constant regular
|
||||
** expression argument once and reused the compiled code for multiple
|
||||
** invocations.
|
||||
/*
|
||||
** Each auxilliary data pointer stored by a user defined function
|
||||
** implementation calling sqlite3_set_auxdata() is stored in an instance
|
||||
** of this structure. All such structures associated with a single VM
|
||||
** are stored in a linked list headed at Vdbe.pAuxData. All are destroyed
|
||||
** when the VM is halted (if not before).
|
||||
*/
|
||||
struct VdbeFunc {
|
||||
FuncDef *pFunc; /* The definition of the function */
|
||||
int nAux; /* Number of entries allocated for apAux[] */
|
||||
struct AuxData {
|
||||
void *pAux; /* Aux data for the i-th argument */
|
||||
void (*xDelete)(void *); /* Destructor for the aux data */
|
||||
} apAux[1]; /* One slot for each function argument */
|
||||
struct AuxData {
|
||||
int iOp; /* Instruction number of OP_Function opcode */
|
||||
int iArg; /* Index of function argument. */
|
||||
void *pAux; /* Aux data pointer */
|
||||
void (*xDelete)(void *); /* Destructor for the aux data */
|
||||
AuxData *pNext; /* Next element in list */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -264,12 +263,13 @@ struct VdbeFunc {
|
||||
*/
|
||||
struct sqlite3_context {
|
||||
FuncDef *pFunc; /* Pointer to function information. MUST BE FIRST */
|
||||
VdbeFunc *pVdbeFunc; /* Auxilary data, if created. */
|
||||
Mem s; /* The return value is stored here */
|
||||
Mem *pMem; /* Memory cell used to store aggregate context */
|
||||
CollSeq *pColl; /* Collating sequence */
|
||||
int isError; /* Error code returned by the function. */
|
||||
int skipFlag; /* Skip skip accumulator loading if true */
|
||||
int iOp; /* Instruction number of OP_Function */
|
||||
Vdbe *pVdbe; /* The VM that owns this context */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -368,6 +368,7 @@ struct Vdbe {
|
||||
SubProgram *pProgram; /* Linked list of all sub-programs used by VM */
|
||||
int nOnceFlag; /* Size of array aOnceFlag[] */
|
||||
u8 *aOnceFlag; /* Flags for OP_Once */
|
||||
AuxData *pAuxData; /* Linked list of auxdata allocations */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -410,7 +411,7 @@ u32 sqlite3VdbeSerialTypeLen(u32);
|
||||
u32 sqlite3VdbeSerialType(Mem*, int);
|
||||
u32 sqlite3VdbeSerialPut(unsigned char*, int, Mem*, int);
|
||||
u32 sqlite3VdbeSerialGet(const unsigned char*, u32, Mem*);
|
||||
void sqlite3VdbeDeleteAuxData(VdbeFunc*, int);
|
||||
void sqlite3VdbeDeleteAuxData(Vdbe*, int, int);
|
||||
|
||||
int sqlite2BtreeKeyCompare(BtCursor *, const void *, int, int, int *);
|
||||
int sqlite3VdbeIdxKeyCompare(VdbeCursor*,UnpackedRecord*,int*);
|
||||
|
||||
Reference in New Issue
Block a user