• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/minidlna/sqlite-3.6.22/

Lines Matching defs:Mem

3028 typedef struct Mem sqlite3_value;
7081 typedef struct Mem Mem;
7106 Mem *pMem; /* Used when p4type is P4_MEM */
7157 #define P4_MEM (-8) /* P4 is a pointer to a Mem* structure */
7178 ** The Vdbe.aColName array contains 5n Mem structures, where n is the
8886 Mem *aMem; /* Values */
17557 Mem *aMem; /* Array of memory cells */
17569 #define VdbeFrameMem(p) ((Mem *)&((u8 *)p)[ROUND8(sizeof(VdbeFrame))])
17577 ** Internally, the vdbe manipulates nearly all SQL values as Mem
17578 ** structures. Each Mem struct may cache multiple representations (string,
17579 ** integer etc.) of the same value. A value (and therefore Mem structure)
17583 ** in a Mem struct is returned by the MemType(Mem*) macro. The type is
17587 struct Mem {
17602 void (*xDel)(void *); /* If not null, call this function to delete Mem.z */
17607 ** representations of the value stored in the Mem struct.
17612 ** If the MEM_Str flag is set then Mem.z points at a string representation.
17618 ** Multiple of these values can appear in Mem.flags. But only one
17619 ** at a time can appear in Mem.type.
17630 /* Whenever Mem contains a valid string or blob representation, one of
17632 ** policy for Mem.z. The MEM_Term flag tells us whether or not the
17636 #define MEM_Dyn 0x0400 /* Need to call sqliteFree() on Mem.z */
17637 #define MEM_Static 0x0800 /* Mem.z points to a static string */
17638 #define MEM_Ephem 0x1000 /* Mem.z points to an ephemeral string */
17639 #define MEM_Agg 0x2000 /* Mem.z points to an agg function context */
17640 #define MEM_Zero 0x4000 /* Mem.i contains count of 0s appended to blob */
17649 ** Clear any existing type flags from a Mem and replace them with f
17684 ** (Mem) which are only defined there.
17689 Mem s; /* The return value is stored here */
17690 Mem *pMem; /* Memory cell used to store aggregate context */
17731 Mem **apArg; /* Arguments to currently executing user function */
17732 Mem *aColName; /* Column names to return */
17733 Mem *pResultSet; /* Pointer to an array of results */
17740 Mem *aVar; /* Values for the OP_Variable opcode. */
17744 Mem *aMem; /* The memory locations */
17793 SQLITE_PRIVATE u32 sqlite3VdbeSerialType(Mem*, int);
17794 SQLITE_PRIVATE u32 sqlite3VdbeSerialPut(unsigned char*, int, Mem*, int);
17795 SQLITE_PRIVATE u32 sqlite3VdbeSerialGet(const unsigned char*, u32, Mem*);
17801 SQLITE_PRIVATE int sqlite3MemCompare(const Mem*, const Mem*, const CollSeq*);
17805 SQLITE_PRIVATE int sqlite3VdbeChangeEncoding(Mem *, int);
17806 SQLITE_PRIVATE int sqlite3VdbeMemTooBig(Mem*);
17807 SQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem*, const Mem*);
17808 SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem*, const Mem*, int);
17809 SQLITE_PRIVATE void sqlite3VdbeMemMove(Mem*, Mem*);
17810 SQLITE_PRIVATE int sqlite3VdbeMemNulTerminate(Mem*);
17811 SQLITE_PRIVATE int sqlite3VdbeMemSetStr(Mem*, const char*, int, u8, void(*)(void*));
17812 SQLITE_PRIVATE void sqlite3VdbeMemSetInt64(Mem*, i64);
17813 SQLITE_PRIVATE void sqlite3VdbeMemSetDouble(Mem*, double);
17814 SQLITE_PRIVATE void sqlite3VdbeMemSetNull(Mem*);
17815 SQLITE_PRIVATE void sqlite3VdbeMemSetZeroBlob(Mem*,int);
17816 SQLITE_PRIVATE void sqlite3VdbeMemSetRowSet(Mem*);
17817 SQLITE_PRIVATE int sqlite3VdbeMemMakeWriteable(Mem*);
17818 SQLITE_PRIVATE int sqlite3VdbeMemStringify(Mem*, int);
17819 SQLITE_PRIVATE i64 sqlite3VdbeIntValue(Mem*);
17820 SQLITE_PRIVATE int sqlite3VdbeMemIntegerify(Mem*);
17821 SQLITE_PRIVATE double sqlite3VdbeRealValue(Mem*);
17822 SQLITE_PRIVATE void sqlite3VdbeIntegerAffinity(Mem*);
17823 SQLITE_PRIVATE int sqlite3VdbeMemRealify(Mem*);
17824 SQLITE_PRIVATE int sqlite3VdbeMemNumerify(Mem*);
17825 SQLITE_PRIVATE int sqlite3VdbeMemFromBtree(BtCursor*,int,int,int,Mem*);
17826 SQLITE_PRIVATE void sqlite3VdbeMemRelease(Mem *p);
17827 SQLITE_PRIVATE void sqlite3VdbeMemReleaseExternal(Mem *p);
17828 SQLITE_PRIVATE int sqlite3VdbeMemFinalize(Mem*, FuncDef*);
17830 SQLITE_PRIVATE int sqlite3VdbeMemGrow(Mem *pMem, int n, int preserve);
17834 SQLITE_PRIVATE void sqlite3VdbeMemStoreType(Mem *pMem);
17848 SQLITE_PRIVATE int sqlite3VdbeMemTranslate(Mem*, u8);
17851 SQLITE_PRIVATE void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf);
17853 SQLITE_PRIVATE int sqlite3VdbeMemHandleBom(Mem *pMem);
17856 SQLITE_PRIVATE int sqlite3VdbeMemExpandBlob(Mem *);
18019 ** If the TRANSLATE_TRACE macro is defined, the value of each Mem is
18030 SQLITE_PRIVATE int sqlite3VdbeMemTranslate(Mem *pMem, u8 desiredEnc){
18168 ** the encoding of the Mem adjusted. This routine does not do any
18169 ** byte-swapping, it just sets Mem.enc appropriately.
18171 ** The allocation (static, dynamic etc.) and encoding of the Mem may be
18174 SQLITE_PRIVATE int sqlite3VdbeMemHandleBom(Mem *pMem){
18267 Mem m;
18293 Mem m;
46057 ** This file contains code use to manipulate "Mem" structure. A "Mem"
46058 ** stores a single value in the VDBE. Mem is an opaque structure visible
46059 ** only within the VDBE. Interface routines refer to a Mem using the
46064 ** Call sqlite3VdbeMemExpandBlob() on the supplied value (type Mem*)
46082 SQLITE_PRIVATE int sqlite3VdbeChangeEncoding(Mem *pMem, int desiredEnc){
46117 ** not set, Mem.n is zeroed.
46119 SQLITE_PRIVATE int sqlite3VdbeMemGrow(Mem *pMem, int n, int preserve){
46157 ** Make the given Mem object MEM_Dyn. In other words, make it so
46164 SQLITE_PRIVATE int sqlite3VdbeMemMakeWriteable(Mem *pMem){
46183 ** If the given Mem* has a zero-filled tail, turn it into an ordinary
46187 SQLITE_PRIVATE int sqlite3VdbeMemExpandBlob(Mem *pMem){
46213 ** Make sure the given Mem is \u0000 terminated.
46215 SQLITE_PRIVATE int sqlite3VdbeMemNulTerminate(Mem *pMem){
46230 ** Add MEM_Str to the set of representations for the given Mem. Numbers
46242 SQLITE_PRIVATE int sqlite3VdbeMemStringify(Mem *pMem, int enc){
46286 SQLITE_PRIVATE int sqlite3VdbeMemFinalize(Mem *pMem, FuncDef *pFunc){
46309 ** does not free any Mem.zMalloc buffer.
46311 SQLITE_PRIVATE void sqlite3VdbeMemReleaseExternal(Mem *p){
46335 ** Release any memory held by the Mem. This may leave the Mem in an
46336 ** inconsistent state, for example with (Mem.z==0) and
46337 ** (Mem.type==SQLITE_TEXT).
46339 SQLITE_PRIVATE void sqlite3VdbeMemRelease(Mem *p){
46394 SQLITE_PRIVATE i64 sqlite3VdbeIntValue(Mem *pMem){
46424 SQLITE_PRIVATE double sqlite3VdbeRealValue(Mem *pMem){
46453 SQLITE_PRIVATE void sqlite3VdbeIntegerAffinity(Mem *pMem){
46482 SQLITE_PRIVATE int sqlite3VdbeMemIntegerify(Mem *pMem){
46496 SQLITE_PRIVATE int sqlite3VdbeMemRealify(Mem *pMem){
46509 SQLITE_PRIVATE int sqlite3VdbeMemNumerify(Mem *pMem){
46530 SQLITE_PRIVATE void sqlite3VdbeMemSetNull(Mem *pMem){
46545 SQLITE_PRIVATE void sqlite3VdbeMemSetZeroBlob(Mem *pMem, int n){
46567 SQLITE_PRIVATE void sqlite3VdbeMemSetInt64(Mem *pMem, i64 val){
46578 SQLITE_PRIVATE void sqlite3VdbeMemSetDouble(Mem *pMem, double val){
46593 SQLITE_PRIVATE void sqlite3VdbeMemSetRowSet(Mem *pMem){
46611 ** Return true if the Mem object contains a TEXT or BLOB that is
46614 SQLITE_PRIVATE int sqlite3VdbeMemTooBig(Mem *p){
46627 ** Size of struct Mem not including the Mem.zMalloc member.
46629 #define MEMCELLSIZE (size_t)(&(((Mem *)0)->zMalloc))
46637 SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem *pTo, const Mem *pFrom, int srcType){
46653 SQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem *pTo, const Mem *pFrom){
46677 SQLITE_PRIVATE void sqlite3VdbeMemMove(Mem *pTo, Mem *pFrom){
46683 memcpy(pTo, pFrom, sizeof(Mem));
46690 ** Change the value of a Mem to be a string or a BLOB.
46695 ** Mem structure. Otherwise, any existing buffer is freed and the
46705 Mem *pMem, /* Memory cell to set to string value */
46740 /* The following block sets the new values of Mem.z and Mem.xDel. It
46794 SQLITE_PRIVATE int sqlite3MemCompare(const Mem *pMem1, const Mem *pMem2, const CollSeq *pColl){
46875 Mem c1;
46876 Mem c2;
46904 ** Move data out of a btree key or data field and into a Mem structure.
46921 Mem *pMem /* OUT: Return data in this Mem structure. */
47013 Mem *p = sqlite3DbMallocZero(db, sizeof(*p));
47117 if( v ) sqlite3VdbeMemSetStr((Mem *)v, z, n, enc, xDel);
47125 sqlite3VdbeMemRelease((Mem *)v);
47126 sqlite3DbFree(((Mem*)v)->db, v);
47134 Mem *p = (Mem*)pVal;
48046 Mem *pMem = pOp->p4.pMem;
48126 ** Release an array of N Mem elements
48128 static void releaseMemArray(Mem *p, int N){
48130 Mem *pEnd;
48167 Mem *aMem = VdbeFrameMem(p);
48198 Mem *pSub = 0; /* Memory cell hold array of subprogs */
48202 Mem *pMem = p->pResultSet = &p->aMem[1]; /* First Mem of result set */
48545 p->aMem = allocSpace(p->aMem, nMem*sizeof(Mem), &zCsr, zEnd, &nByte);
48546 p->aVar = allocSpace(p->aVar, nVar*sizeof(Mem), &zCsr, zEnd, &nByte);
48547 p->apArg = allocSpace(p->apArg, nArg*sizeof(Mem*), &zCsr, zEnd, &nByte);
48709 Mem *pColName;
48717 p->aColName = pColName = (Mem*)sqlite3DbMallocZero(db, sizeof(Mem)*n );
48744 Mem *pColName;
49576 SQLITE_PRIVATE u32 sqlite3VdbeSerialType(Mem *pMem, int file_format){
49694 SQLITE_PRIVATE u32 sqlite3VdbeSerialPut(u8 *buf, int nBuf, Mem *pMem, int file_format){
49747 Mem *pMem /* Memory cell to write value into */
49865 Mem *pMem;
49876 nByte = ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*(pKeyInfo->nField+1);
49887 p->aMem = pMem = (Mem*)&((char*)p)[ROUND8(sizeof(UnpackedRecord))];
49914 Mem *pMem;
49969 Mem mem1;
50072 Mem m, v;
50154 Mem m;
50229 Mem *pMem = &v->aVar[iVar-1];
50233 sqlite3VdbeMemCopy((Mem *)pRet, pMem);
50235 sqlite3VdbeMemStoreType((Mem *)pRet);
50365 ** The following routines extract information from a Mem or sqlite3_value
50369 Mem *p = (Mem*)pVal;
50386 return sqlite3VdbeRealValue((Mem*)pVal);
50389 return (int)sqlite3VdbeIntValue((Mem*)pVal);
50392 return sqlite3VdbeIntValue((Mem*)pVal);
50738 Mem *pMem;
50856 ** it is, return a pointer to the Mem for the value of that column.
50857 ** If iCol is not valid, return a pointer to a Mem which has a value
50860 static Mem *columnMem(sqlite3_stmt *pStmt, int i){
50863 Mem *pOut;
50872 ** a pointer to the following static Mem object which contains the
50873 ** value SQL NULL. Even though the Mem structure contains an element
50875 ** switches (-Os), gcc may align this Mem object on a 4-byte boundary
50878 ** that a Mem structure is located on an 8-byte boundary. To prevent
50882 static const Mem nullMem
50892 pOut = (Mem*)&nullMem;
50975 Mem *pOut = columnMem(pStmt, i);
51022 const void *(*xFunc)(Mem*),
51055 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME);
51060 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME);
51080 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE);
51085 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE);
51098 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DATABASE);
51103 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE);
51114 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_TABLE);
51119 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE);
51130 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_COLUMN);
51135 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN);
51157 Mem *pVar;
51199 Mem *pVar;
51555 Mem *pVar; /* Value of a host parameter */
51599 Mem utf8;
51718 static void updateMaxBlobsize(Mem *p){
51770 ** Call sqlite3VdbeMemExpandBlob() on the supplied value (type Mem*)
51781 SQLITE_PRIVATE void sqlite3VdbeMemStoreType(Mem *pMem){
51828 Mem *pMem = &p->aMem[p->nMem-iCur];
51865 static void applyNumericAffinity(Mem *pRec){
51902 Mem *pRec, /* The value to apply affinity to */
51934 Mem *pMem = (Mem*)pVal;
51942 ** not the internal Mem* type.
51949 applyAffinity((Mem *)pVal, affinity, enc);
51957 SQLITE_PRIVATE void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf){
52039 static void memTracePrint(FILE *out, Mem *p){
52059 static void registerTrace(FILE *out, int iReg, Mem *p){
52267 Mem *aMem = p->aMem; /* Copy of p->aMem */
52268 Mem *pIn1 = 0; /* 1st input operand */
52269 Mem *pIn2 = 0; /* 2nd input operand */
52270 Mem *pIn3 = 0; /* 3rd input operand */
52271 Mem *pOut = 0; /* Output operand */
52294 Mem *pVar; /* Value being transferred */
52303 Mem *pMem;
52318 Mem *pArg;
52362 Mem *pDest; /* Where to write the extracted value */
52363 Mem sMem; /* For storing the record being decoded */
52370 Mem *pReg; /* PseudoTable input register */
52378 Mem *pRec; /* The new record */
52385 Mem *pData0; /* First field to be combined into the record */
52386 Mem *pLast; /* Last field of the record */
52460 char aTempRec[ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*3 + 7];
52467 Mem *aMx;
52482 Mem *pMem; /* Register holding largest rowid for AUTOINCREMENT */
52486 Mem *pData; /* MEM cell holding data for the record to be inserted */
52487 Mem *pKey; /* MEM cell holding key for the record */
52578 Mem *pnErr; /* Register keeping track of errors remaining */
52590 Mem *pRt; /* Register to allocate runtime space */
52591 Mem *pMem; /* Used to iterate through memory cells */
52592 Mem *pEnd; /* Last memory cell in new array */
52599 Mem *pIn;
52602 Mem *pIn1;
52608 Mem *pMem;
52609 Mem *pRec;
52614 Mem *pMem;
52632 Mem *pQuery;
52633 Mem *pArgc;
52639 Mem **apArg;
52644 Mem *pDest;
52655 Mem *pName;
52663 Mem **apArg;
52664 Mem *pX;
53102 Mem *pVar; /* Value being transferred */
53211 Mem *pMem;
53474 Mem *pArg;
54195 Mem *pDest; /* Where to write the extracted value */
54196 Mem sMem; /* For storing the record being decoded */
54203 Mem *pReg; /* PseudoTable input register */
54412 ** a pointer to a Mem object.
54509 Mem *pRec; /* The new record */
54516 Mem *pData0; /* First field to be combined into the record */
54517 Mem *pLast; /* Last field of the record */
55568 char aTempRec[ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*3 + 7];
55651 Mem *aMx;
55795 Mem *pMem; /* Register holding largest rowid for AUTOINCREMENT */
55965 Mem *pData; /* MEM cell holding data for the record to be inserted */
55966 Mem *pKey; /* MEM cell holding key for the record */
56885 Mem *pnErr; /* Register keeping track of errors remaining */
57044 Mem *pRt; /* Register to allocate runtime space */
57045 Mem *pMem; /* Used to iterate through memory cells */
57046 Mem *pEnd; /* Last memory cell in new array */
57091 + u.by.nMem * sizeof(Mem)
57157 Mem *pIn;
57218 Mem *pIn1;
57301 Mem *pMem;
57302 Mem *pRec;
57356 Mem *pMem;
57582 Mem *pQuery;
57583 Mem *pArgc;
57589 Mem **apArg;
57648 Mem *pDest;
57684 ** dynamic allocation in u.ch.sContext.s (a Mem struct) is released.
57762 Mem *pName;
57812 Mem **apArg;
57813 Mem *pX;
64979 ** iMem+nCol+1 .. Mem+2*nCol:
72261 Mem *pArg = (Mem *)argv[0];
72262 Mem *pBest;
72266 pBest = (Mem *)sqlite3_aggregate_context(context, sizeof(*pBest));
82769 int iAMem; /* First Mem address for storing current GROUP BY */
82770 int iBMem; /* First Mem address for previous GROUP BY */
82771 int iUseFlag; /* Mem address holding flag indicating that at least
82774 int iAbortFlag; /* Mem address which causes query abort if positive */