• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/sqlite/

Lines Matching defs:Mem

3178 typedef struct Mem sqlite3_value;
7394 typedef struct Mem Mem;
7419 Mem *pMem; /* Used when p4type is P4_MEM */
7470 #define P4_MEM (-8) /* P4 is a pointer to a Mem* structure */
7491 ** The Vdbe.aColName array contains 5n Mem structures, where n is the
9223 Mem *aMem; /* Values */
11733 Mem *aMem; /* Array of memory cells */
11745 #define VdbeFrameMem(p) ((Mem *)&((u8 *)p)[ROUND8(sizeof(VdbeFrame))])
11753 ** Internally, the vdbe manipulates nearly all SQL values as Mem
11754 ** structures. Each Mem struct may cache multiple representations (string,
11755 ** integer etc.) of the same value. A value (and therefore Mem structure)
11759 ** in a Mem struct is returned by the MemType(Mem*) macro. The type is
11763 struct Mem {
11778 void (*xDel)(void *); /* If not null, call this function to delete Mem.z */
11783 ** representations of the value stored in the Mem struct.
11788 ** If the MEM_Str flag is set then Mem.z points at a string representation.
11794 ** Multiple of these values can appear in Mem.flags. But only one
11795 ** at a time can appear in Mem.type.
11806 /* Whenever Mem contains a valid string or blob representation, one of
11808 ** policy for Mem.z. The MEM_Term flag tells us whether or not the
11812 #define MEM_Dyn 0x0400 /* Need to call sqliteFree() on Mem.z */
11813 #define MEM_Static 0x0800 /* Mem.z points to a static string */
11814 #define MEM_Ephem 0x1000 /* Mem.z points to an ephemeral string */
11815 #define MEM_Agg 0x2000 /* Mem.z points to an agg function context */
11816 #define MEM_Zero 0x4000 /* Mem.i contains count of 0s appended to blob */
11825 ** Clear any existing type flags from a Mem and replace them with f
11860 ** (Mem) which are only defined there.
11865 Mem s; /* The return value is stored here */
11866 Mem *pMem; /* Memory cell used to store aggregate context */
11907 Mem **apArg; /* Arguments to currently executing user function */
11908 Mem *aColName; /* Column names to return */
11909 Mem *pResultSet; /* Pointer to an array of results */
11916 Mem *aVar; /* Values for the OP_Variable opcode. */
11920 Mem *aMem; /* The memory locations */
11971 SQLITE_PRIVATE u32 sqlite3VdbeSerialType(Mem*, int);
11972 SQLITE_PRIVATE u32 sqlite3VdbeSerialPut(unsigned char*, int, Mem*, int);
11973 SQLITE_PRIVATE u32 sqlite3VdbeSerialGet(const unsigned char*, u32, Mem*);
11979 SQLITE_PRIVATE int sqlite3MemCompare(const Mem*, const Mem*, const CollSeq*);
11983 SQLITE_PRIVATE int sqlite3VdbeChangeEncoding(Mem *, int);
11984 SQLITE_PRIVATE int sqlite3VdbeMemTooBig(Mem*);
11985 SQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem*, const Mem*);
11986 SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem*, const Mem*, int);
11987 SQLITE_PRIVATE void sqlite3VdbeMemMove(Mem*, Mem*);
11988 SQLITE_PRIVATE int sqlite3VdbeMemNulTerminate(Mem*);
11989 SQLITE_PRIVATE int sqlite3VdbeMemSetStr(Mem*, const char*, int, u8, void(*)(void*));
11990 SQLITE_PRIVATE void sqlite3VdbeMemSetInt64(Mem*, i64);
11994 SQLITE_PRIVATE void sqlite3VdbeMemSetDouble(Mem*, double);
11996 SQLITE_PRIVATE void sqlite3VdbeMemSetNull(Mem*);
11997 SQLITE_PRIVATE void sqlite3VdbeMemSetZeroBlob(Mem*,int);
11998 SQLITE_PRIVATE void sqlite3VdbeMemSetRowSet(Mem*);
11999 SQLITE_PRIVATE int sqlite3VdbeMemMakeWriteable(Mem*);
12000 SQLITE_PRIVATE int sqlite3VdbeMemStringify(Mem*, int);
12001 SQLITE_PRIVATE i64 sqlite3VdbeIntValue(Mem*);
12002 SQLITE_PRIVATE int sqlite3VdbeMemIntegerify(Mem*);
12003 SQLITE_PRIVATE double sqlite3VdbeRealValue(Mem*);
12004 SQLITE_PRIVATE void sqlite3VdbeIntegerAffinity(Mem*);
12005 SQLITE_PRIVATE int sqlite3VdbeMemRealify(Mem*);
12006 SQLITE_PRIVATE int sqlite3VdbeMemNumerify(Mem*);
12007 SQLITE_PRIVATE int sqlite3VdbeMemFromBtree(BtCursor*,int,int,int,Mem*);
12008 SQLITE_PRIVATE void sqlite3VdbeMemRelease(Mem *p);
12009 SQLITE_PRIVATE void sqlite3VdbeMemReleaseExternal(Mem *p);
12010 SQLITE_PRIVATE int sqlite3VdbeMemFinalize(Mem*, FuncDef*);
12012 SQLITE_PRIVATE int sqlite3VdbeMemGrow(Mem *pMem, int n, int preserve);
12016 SQLITE_PRIVATE void sqlite3VdbeMemStoreType(Mem *pMem);
12030 SQLITE_PRIVATE int sqlite3VdbeMemTranslate(Mem*, u8);
12033 SQLITE_PRIVATE void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf);
12035 SQLITE_PRIVATE int sqlite3VdbeMemHandleBom(Mem *pMem);
12038 SQLITE_PRIVATE int sqlite3VdbeMemExpandBlob(Mem *);
19192 ** If the TRANSLATE_TRACE macro is defined, the value of each Mem is
19203 SQLITE_PRIVATE int sqlite3VdbeMemTranslate(Mem *pMem, u8 desiredEnc){
19341 ** the encoding of the Mem adjusted. This routine does not do any
19342 ** byte-swapping, it just sets Mem.enc appropriately.
19344 ** The allocation (static, dynamic etc.) and encoding of the Mem may be
19347 SQLITE_PRIVATE int sqlite3VdbeMemHandleBom(Mem *pMem){
19440 Mem m;
19468 Mem m;
53293 ** This file contains code use to manipulate "Mem" structure. A "Mem"
53294 ** stores a single value in the VDBE. Mem is an opaque structure visible
53295 ** only within the VDBE. Interface routines refer to a Mem using the
53300 ** Call sqlite3VdbeMemExpandBlob() on the supplied value (type Mem*)
53318 SQLITE_PRIVATE int sqlite3VdbeChangeEncoding(Mem *pMem, int desiredEnc){
53353 ** not set, Mem.n is zeroed.
53355 SQLITE_PRIVATE int sqlite3VdbeMemGrow(Mem *pMem, int n, int preserve){
53393 ** Make the given Mem object MEM_Dyn. In other words, make it so
53400 SQLITE_PRIVATE int sqlite3VdbeMemMakeWriteable(Mem *pMem){
53419 ** If the given Mem* has a zero-filled tail, turn it into an ordinary
53423 SQLITE_PRIVATE int sqlite3VdbeMemExpandBlob(Mem *pMem){
53449 ** Make sure the given Mem is \u0000 terminated.
53451 SQLITE_PRIVATE int sqlite3VdbeMemNulTerminate(Mem *pMem){
53466 ** Add MEM_Str to the set of representations for the given Mem. Numbers
53478 SQLITE_PRIVATE int sqlite3VdbeMemStringify(Mem *pMem, int enc){
53522 SQLITE_PRIVATE int sqlite3VdbeMemFinalize(Mem *pMem, FuncDef *pFunc){
53545 ** does not free any Mem.zMalloc buffer.
53547 SQLITE_PRIVATE void sqlite3VdbeMemReleaseExternal(Mem *p){
53571 ** Release any memory held by the Mem. This may leave the Mem in an
53572 ** inconsistent state, for example with (Mem.z==0) and
53573 ** (Mem.type==SQLITE_TEXT).
53575 SQLITE_PRIVATE void sqlite3VdbeMemRelease(Mem *p){
53635 SQLITE_PRIVATE i64 sqlite3VdbeIntValue(Mem *pMem){
53665 SQLITE_PRIVATE double sqlite3VdbeRealValue(Mem *pMem){
53694 SQLITE_PRIVATE void sqlite3VdbeIntegerAffinity(Mem *pMem){
53723 SQLITE_PRIVATE int sqlite3VdbeMemIntegerify(Mem *pMem){
53737 SQLITE_PRIVATE int sqlite3VdbeMemRealify(Mem *pMem){
53754 SQLITE_PRIVATE int sqlite3VdbeMemNumerify(Mem *pMem){
53776 SQLITE_PRIVATE void sqlite3VdbeMemSetNull(Mem *pMem){
53791 SQLITE_PRIVATE void sqlite3VdbeMemSetZeroBlob(Mem *pMem, int n){
53813 SQLITE_PRIVATE void sqlite3VdbeMemSetInt64(Mem *pMem, i64 val){
53825 SQLITE_PRIVATE void sqlite3VdbeMemSetDouble(Mem *pMem, double val){
53841 SQLITE_PRIVATE void sqlite3VdbeMemSetRowSet(Mem *pMem){
53859 ** Return true if the Mem object contains a TEXT or BLOB that is
53862 SQLITE_PRIVATE int sqlite3VdbeMemTooBig(Mem *p){
53875 ** Size of struct Mem not including the Mem.zMalloc member.
53877 #define MEMCELLSIZE (size_t)(&(((Mem *)0)->zMalloc))
53885 SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem *pTo, const Mem *pFrom, int srcType){
53901 SQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem *pTo, const Mem *pFrom){
53925 SQLITE_PRIVATE void sqlite3VdbeMemMove(Mem *pTo, Mem *pFrom){
53931 memcpy(pTo, pFrom, sizeof(Mem));
53938 ** Change the value of a Mem to be a string or a BLOB.
53943 ** Mem structure. Otherwise, any existing buffer is freed and the
53953 Mem *pMem, /* Memory cell to set to string value */
53988 /* The following block sets the new values of Mem.z and Mem.xDel. It
54042 SQLITE_PRIVATE int sqlite3MemCompare(const Mem *pMem1, const Mem *pMem2, const CollSeq *pColl){
54123 Mem c1;
54124 Mem c2;
54152 ** Move data out of a btree key or data field and into a Mem structure.
54169 Mem *pMem /* OUT: Return data in this Mem structure. */
54261 Mem *p = sqlite3DbMallocZero(db, sizeof(*p));
54372 if( v ) sqlite3VdbeMemSetStr((Mem *)v, z, n, enc, xDel);
54380 sqlite3VdbeMemRelease((Mem *)v);
54381 sqlite3DbFree(((Mem*)v)->db, v);
54389 Mem *p = (Mem*)pVal;
55012 Mem *p = (Mem*)p4;
55301 Mem *pMem = pOp->p4.pMem;
55386 ** Release an array of N Mem elements
55388 static void releaseMemArray(Mem *p, int N){
55390 Mem *pEnd;
55433 Mem *aMem = VdbeFrameMem(p);
55464 Mem *pSub = 0; /* Memory cell hold array of subprogs */
55468 Mem *pMem = p->pResultSet = &p->aMem[1]; /* First Mem of result set */
55810 p->aMem = allocSpace(p->aMem, nMem*sizeof(Mem), &zCsr, zEnd, &nByte);
55811 p->aVar = allocSpace(p->aVar, nVar*sizeof(Mem), &zCsr, zEnd, &nByte);
55812 p->apArg = allocSpace(p->apArg, nArg*sizeof(Mem*), &zCsr, zEnd, &nByte);
55973 Mem *pColName;
55981 p->aColName = pColName = (Mem*)sqlite3DbMallocZero(db, sizeof(Mem)*n );
56008 Mem *pColName;
56875 SQLITE_PRIVATE u32 sqlite3VdbeSerialType(Mem *pMem, int file_format){
56993 SQLITE_PRIVATE u32 sqlite3VdbeSerialPut(u8 *buf, int nBuf, Mem *pMem, int file_format){
57046 Mem *pMem /* Memory cell to write value into */
57164 Mem *pMem;
57175 nByte = ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*(pKeyInfo->nField+1);
57186 p->aMem = pMem = (Mem*)&((char*)p)[ROUND8(sizeof(UnpackedRecord))];
57213 Mem *pMem;
57268 Mem mem1;
57371 Mem m, v;
57453 Mem m;
57528 Mem *pMem = &v->aVar[iVar-1];
57532 sqlite3VdbeMemCopy((Mem *)pRet, pMem);
57534 sqlite3VdbeMemStoreType((Mem *)pRet);
57690 ** The following routines extract information from a Mem or sqlite3_value
57694 Mem *p = (Mem*)pVal;
57711 return sqlite3VdbeRealValue((Mem*)pVal);
57714 return (int)sqlite3VdbeIntValue((Mem*)pVal);
57717 return sqlite3VdbeIntValue((Mem*)pVal);
58087 Mem *pMem;
58205 ** it is, return a pointer to the Mem for the value of that column.
58206 ** If iCol is not valid, return a pointer to a Mem which has a value
58209 static Mem *columnMem(sqlite3_stmt *pStmt, int i){
58212 Mem *pOut;
58221 ** a pointer to the following static Mem object which contains the
58222 ** value SQL NULL. Even though the Mem structure contains an element
58224 ** switches (-Os), gcc may align this Mem object on a 4-byte boundary
58227 ** that a Mem structure is located on an 8-byte boundary. To prevent
58231 static const Mem nullMem
58241 pOut = (Mem*)&nullMem;
58324 Mem *pOut = columnMem(pStmt, i);
58371 const void *(*xFunc)(Mem*),
58404 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME);
58409 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME);
58429 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE);
58434 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE);
58447 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DATABASE);
58452 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE);
58463 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_TABLE);
58468 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE);
58479 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_COLUMN);
58484 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN);
58506 Mem *pVar;
58552 Mem *pVar;
58908 Mem *pVar; /* Value of a host parameter */
58952 Mem utf8;
59071 static void updateMaxBlobsize(Mem *p){
59123 ** Call sqlite3VdbeMemExpandBlob() on the supplied value (type Mem*)
59134 SQLITE_PRIVATE void sqlite3VdbeMemStoreType(Mem *pMem){
59181 Mem *pMem = &p->aMem[p->nMem-iCur];
59218 static void applyNumericAffinity(Mem *pRec){
59268 Mem *pRec, /* The value to apply affinity to */
59300 Mem *pMem = (Mem*)pVal;
59308 ** not the internal Mem* type.
59315 applyAffinity((Mem *)pVal, affinity, enc);
59323 SQLITE_PRIVATE void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf){
59405 static void memTracePrint(FILE *out, Mem *p){
59425 static void registerTrace(FILE *out, int iReg, Mem *p){
59631 Mem *aMem = p->aMem; /* Copy of p->aMem */
59632 Mem *pIn1 = 0; /* 1st input operand */
59633 Mem *pIn2 = 0; /* 2nd input operand */
59634 Mem *pIn3 = 0; /* 3rd input operand */
59635 Mem *pOut = 0; /* Output operand */
59655 Mem *pVar; /* Value being transferred */
59664 Mem *pMem;
59679 Mem *pArg;
59725 Mem *pDest; /* Where to write the extracted value */
59726 Mem sMem; /* For storing the record being decoded */
59733 Mem *pReg; /* PseudoTable input register */
59741 Mem *pRec; /* The new record */
59748 Mem *pData0; /* First field to be combined into the record */
59749 Mem *pLast; /* Last field of the record */
59823 char aTempRec[ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*3 + 7];
59830 Mem *aMx;
59845 Mem *pMem; /* Register holding largest rowid for AUTOINCREMENT */
59849 Mem *pData; /* MEM cell holding data for the record to be inserted */
59850 Mem *pKey; /* MEM cell holding key for the record */
59941 Mem *pnErr; /* Register keeping track of errors remaining */
59953 Mem *pRt; /* Register to allocate runtime space */
59954 Mem *pMem; /* Used to iterate through memory cells */
59955 Mem *pEnd; /* Last memory cell in new array */
59962 Mem *pIn;
59965 Mem *pIn1;
59971 Mem *pMem;
59972 Mem *pRec;
59977 Mem *pMem;
60002 Mem *pQuery;
60003 Mem *pArgc;
60009 Mem **apArg;
60014 Mem *pDest;
60025 Mem *pName;
60033 Mem **apArg;
60034 Mem *pX;
60456 Mem *pVar; /* Value being transferred */
60554 Mem *pMem;
60822 Mem *pArg;
61544 Mem *pDest; /* Where to write the extracted value */
61545 Mem sMem; /* For storing the record being decoded */
61552 Mem *pReg; /* PseudoTable input register */
61765 ** a pointer to a Mem object.
61862 Mem *pRec; /* The new record */
61869 Mem *pData0; /* First field to be combined into the record */
61870 Mem *pLast; /* Last field of the record */
62929 char aTempRec[ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*3 + 7];
63012 Mem *aMx;
63156 Mem *pMem; /* Register holding largest rowid for AUTOINCREMENT */
63326 Mem *pData; /* MEM cell holding data for the record to be inserted */
63327 Mem *pKey; /* MEM cell holding key for the record */
64246 Mem *pnErr; /* Register keeping track of errors remaining */
64405 Mem *pRt; /* Register to allocate runtime space */
64406 Mem *pMem; /* Used to iterate through memory cells */
64407 Mem *pEnd; /* Last memory cell in new array */
64452 + u.by.nMem * sizeof(Mem)
64518 Mem *pIn;
64579 Mem *pIn1;
64662 Mem *pMem;
64663 Mem *pRec;
64717 Mem *pMem;
65068 Mem *pQuery;
65069 Mem *pArgc;
65075 Mem **apArg;
65130 Mem *pDest;
65163 ** dynamic allocation in u.ci.sContext.s (a Mem struct) is released.
65234 Mem *pName;
65280 Mem **apArg;
65281 Mem *pX;
72499 ** iMem+nCol+1 .. Mem+2*nCol:
79833 Mem *pArg = (Mem *)argv[0];
79834 Mem *pBest;
79838 pBest = (Mem *)sqlite3_aggregate_context(context, sizeof(*pBest));
90447 int iAMem; /* First Mem address for storing current GROUP BY */
90448 int iBMem; /* First Mem address for previous GROUP BY */
90449 int iUseFlag; /* Mem address holding flag indicating that at least
90452 int iAbortFlag; /* Mem address which causes query abort if positive */