• 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:am

28677   /* WinCE has no concept of a relative pathname, or so I am told. */
49636 ** I am also told that newer versions of GCC that follow a different
52371 } am;
54181 #if 0 /* local variables moved into u.am */
54204 #endif /* local variables moved into u.am */
54207 u.am.p1 = pOp->p1;
54208 u.am.p2 = pOp->p2;
54209 u.am.pC = 0;
54210 memset(&u.am.sMem, 0, sizeof(u.am.sMem));
54211 assert( u.am.p1<p->nCursor );
54213 u.am.pDest = &aMem[pOp->p3];
54214 MemSetTypeFlag(u.am.pDest, MEM_Null);
54215 u.am.zRec = 0;
54217 /* This block sets the variable u.am.payloadSize to be the total number of
54220 ** u.am.zRec is set to be the complete text of the record if it is available.
54223 ** might be available in the u.am.pC->aRow cache. Or it might not be.
54224 ** If the data is unavailable, u.am.zRec is set to NULL.
54229 u.am.pC = p->apCsr[u.am.p1];
54230 assert( u.am.pC!=0 );
54232 assert( u.am.pC->pVtabCursor==0 );
54234 u.am.pCrsr = u.am.pC->pCursor;
54235 if( u.am.pCrsr!=0 ){
54237 rc = sqlite3VdbeCursorMoveto(u.am.pC);
54239 if( u.am.pC->nullRow ){
54240 u.am.payloadSize = 0;
54241 }else if( u.am.pC->cacheStatus==p->cacheCtr ){
54242 u.am.payloadSize = u.am.pC->payloadSize;
54243 u.am.zRec = (char*)u.am.pC->aRow;
54244 }else if( u.am.pC->isIndex ){
54245 assert( sqlite3BtreeCursorIsValid(u.am.pCrsr) );
54246 rc = sqlite3BtreeKeySize(u.am.pCrsr, &u.am.payloadSize64);
54249 ** payload size, so it is impossible for u.am.payloadSize64 to be
54251 assert( (u.am.payloadSize64 & SQLITE_MAX_U32)==(u64)u.am.payloadSize64 );
54252 u.am.payloadSize = (u32)u.am.payloadSize64;
54254 assert( sqlite3BtreeCursorIsValid(u.am.pCrsr) );
54255 rc = sqlite3BtreeDataSize(u.am.pCrsr, &u.am.payloadSize);
54258 }else if( u.am.pC->pseudoTableReg>0 ){
54259 u.am.pReg = &aMem[u.am.pC->pseudoTableReg];
54260 assert( u.am.pReg->flags & MEM_Blob );
54261 u.am.payloadSize = u.am.pReg->n;
54262 u.am.zRec = u.am.pReg->z;
54263 u.am.pC->cacheStatus = (pOp->p5&OPFLAG_CLEARCACHE) ? CACHE_STALE : p->cacheCtr;
54264 assert( u.am.payloadSize==0 || u.am.zRec!=0 );
54267 u.am.payloadSize = 0;
54270 /* If u.am.payloadSize is 0, then just store a NULL */
54271 if( u.am.payloadSize==0 ){
54272 assert( u.am.pDest->flags&MEM_Null );
54276 if( u.am.payloadSize > (u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){
54280 u.am.nField = u.am.pC->nField;
54281 assert( u.am.p2<u.am.nField );
54286 u.am.aType = u.am.pC->aType;
54287 if( u.am.pC->cacheStatus==p->cacheCtr ){
54288 u.am.aOffset = u.am.pC->aOffset;
54290 assert(u.am.aType);
54291 u.am.avail = 0;
54292 u.am.pC->aOffset = u.am.aOffset = &u.am.aType[u.am.nField];
54293 u.am.pC->payloadSize = u.am.payloadSize;
54294 u.am.pC->cacheStatus = p->cacheCtr;
54297 if( u.am.zRec ){
54298 u.am.zData = u.am.zRec;
54300 if( u.am.pC->isIndex ){
54301 u.am.zData = (char*)sqlite3BtreeKeyFetch(u.am.pCrsr, &u.am.avail);
54303 u.am.zData = (char*)sqlite3BtreeDataFetch(u.am.pCrsr, &u.am.avail);
54306 ** save the payload in the u.am.pC->aRow cache. That will save us from
54310 assert( u.am.avail>=0 );
54311 if( u.am.payloadSize <= (u32)u.am.avail ){
54312 u.am.zRec = u.am.zData;
54313 u.am.pC->aRow = (u8*)u.am.zData;
54315 u.am.pC->aRow = 0;
54320 ** assert( u.am.zRec!=0 || u.am.avail>=u.am.payloadSize || u.am.avail>=9 ); */
54321 u.am.szHdr = getVarint32((u8*)u.am.zData, u.am.offset);
54332 if( u.am.offset > 98307 ){
54337 /* Compute in u.am.len the number of bytes of data we need to read in order
54338 ** to get u.am.nField type values. u.am.offset is an upper bound on this. But
54339 ** u.am.nField might be significantly less than the true number of columns
54340 ** in the table, and in that case, 5*u.am.nField+3 might be smaller than u.am.offset.
54341 ** We want to minimize u.am.len in order to limit the size of the memory
54342 ** allocation, especially if a corrupt database file has caused u.am.offset
54345 ** On systems that cannot tolerate large memory allocations, u.am.nField*5+3
54346 ** will likely be much smaller since u.am.nField will likely be less than
54350 u.am.len = u.am.nField*5 + 3;
54351 if( u.am.len > (int)u.am.offset ) u.am.len = (int)u.am.offset;
54359 if( !u.am.zRec && u.am.avail<u.am.len ){
54360 u.am.sMem.flags = 0;
54361 u.am.sMem.db = 0;
54362 rc = sqlite3VdbeMemFromBtree(u.am.pCrsr, 0, u.am.len, u.am.pC->isIndex, &u.am.sMem);
54366 u.am.zData = u.am.sMem.z;
54368 u.am.zEndHdr = (u8 *)&u.am.zData[u.am.len];
54369 u.am.zIdx = (u8 *)&u.am.zData[u.am.szHdr];
54371 /* Scan the header and use it to fill in the u.am.aType[] and u.am.aOffset[]
54372 ** arrays. u.am.aType[u.am.i] will contain the type integer for the u.am.i-th
54373 ** column and u.am.aOffset[u.am.i] will contain the u.am.offset from the beginning
54374 ** of the record to the start of the data for the u.am.i-th column
54376 u.am.offset64 = u.am.offset;
54377 for(u.am.i=0; u.am.i<u.am.nField; u.am.i++){
54378 if( u.am.zIdx<u.am.zEndHdr ){
54379 u.am.aOffset[u.am.i] = (u32)u.am.offset64;
54380 u.am.zIdx += getVarint32(u.am.zIdx, u.am.aType[u.am.i]);
54381 u.am.offset64 += sqlite3VdbeSerialTypeLen(u.am.aType[u.am.i]);
54383 /* If u.am.i is less that u.am.nField, then there are less fields in this
54385 ** table. Set the u.am.offset for any extra columns not present in
54389 u.am.aOffset[u.am.i] = 0;
54392 sqlite3VdbeMemRelease(&u.am.sMem);
54393 u.am.sMem.flags = MEM_Null;
54401 if( (u.am.zIdx > u.am.zEndHdr)|| (u.am.offset64 > u.am.payloadSize)
54402 || (u.am.zIdx==u.am.zEndHdr && u.am.offset64!=(u64)u.am.payloadSize) ){
54408 /* Get the column information. If u.am.aOffset[u.am.p2] is non-zero, then
54409 ** deserialize the value from the record. If u.am.aOffset[u.am.p2] is zero,
54414 if( u.am.aOffset[u.am.p2] ){
54416 if( u.am.zRec ){
54417 sqlite3VdbeMemReleaseExternal(u.am.pDest);
54418 sqlite3VdbeSerialGet((u8 *)&u.am.zRec[u.am.aOffset[u.am.p2]], u.am.aType[u.am.p2], u.am.pDest);
54420 u.am.len = sqlite3VdbeSerialTypeLen(u.am.aType[u.am.p2]);
54421 sqlite3VdbeMemMove(&u.am.sMem, u.am.pDest);
54422 rc = sqlite3VdbeMemFromBtree(u.am.pCrsr, u.am.aOffset[u.am.p2], u.am.len, u.am.pC->isIndex, &u.am.sMem);
54426 u.am.zData = u.am.sMem.z;
54427 sqlite3VdbeSerialGet((u8*)u.am.zData, u.am.aType[u.am.p2], u.am.pDest);
54429 u.am.pDest->enc = encoding;
54432 sqlite3VdbeMemShallowCopy(u.am.pDest, pOp->p4.pMem, MEM_Static);
54434 assert( u.am.pDest->flags&MEM_Null );
54440 ** dynamically allocated space over to the u.am.pDest structure.
54443 if( u.am.sMem.zMalloc ){
54444 assert( u.am.sMem.z==u.am.sMem.zMalloc );
54445 assert( !(u.am.pDest->flags & MEM_Dyn) );
54446 assert( !(u.am.pDest->flags & (MEM_Blob|MEM_Str)) || u.am.pDest->z==u.am.sMem.z );
54447 u.am.pDest->flags &= ~(MEM_Ephem|MEM_Static);
54448 u.am.pDest->flags |= MEM_Term;
54449 u.am.pDest->z = u.am.sMem.z;
54450 u.am.pDest->zMalloc = u.am.sMem.zMalloc;
54453 rc = sqlite3VdbeMemMakeWriteable(u.am.pDest);
54456 UPDATE_MAX_BLOBSIZE(u.am.pDest);
54457 REGISTER_TRACE(pOp->p3, u.am.pDest);