Lines Matching refs:pRec
75693 UnpackedRecord *pRec = p->ppRec[0];
75695 if( pRec==0 ){
75702 pRec = (UnpackedRecord*)sqlite3DbMallocZero(db, nByte);
75703 if( pRec ){
75704 pRec->pKeyInfo = sqlite3KeyInfoOfIndex(p->pParse, pIdx);
75705 if( pRec->pKeyInfo ){
75706 assert( pRec->pKeyInfo->nAllField==nCol );
75707 assert( pRec->pKeyInfo->enc==ENC(db) );
75708 pRec->aMem = (Mem *)((u8*)pRec + ROUND8(sizeof(UnpackedRecord)));
75710 pRec->aMem[i].flags = MEM_Null;
75711 pRec->aMem[i].db = db;
75714 sqlite3DbFreeNN(db, pRec);
75715 pRec = 0;
75718 if( pRec==0 ) return 0;
75719 p->ppRec[0] = pRec;
75722 pRec->nField = p->iVal+1;
75723 return &pRec->aMem[p->iVal];
76209 const void *pRec, /* Pointer to buffer containing record */
76220 u8 *a = (u8*)pRec; /* Typecast byte array */
76252 SQLITE_PRIVATE void sqlite3Stat4ProbeFree(UnpackedRecord *pRec){
76253 if( pRec ){
76255 int nCol = pRec->pKeyInfo->nAllField;
76256 Mem *aMem = pRec->aMem;
76261 sqlite3KeyInfoUnref(pRec->pKeyInfo);
76262 sqlite3DbFreeNN(db, pRec);
83785 static void applyNumericAffinity(Mem *pRec, int bTryForInt){
83788 u8 enc = pRec->enc;
83789 assert( (pRec->flags & (MEM_Str|MEM_Int|MEM_Real))==MEM_Str );
83790 if( sqlite3AtoF(pRec->z, &rValue, pRec->n, enc)==0 ) return;
83791 if( 0==sqlite3Atoi64(pRec->z, &iValue, pRec->n, enc) ){
83792 pRec->u.i = iValue;
83793 pRec->flags |= MEM_Int;
83795 pRec->u.r = rValue;
83796 pRec->flags |= MEM_Real;
83797 if( bTryForInt ) sqlite3VdbeIntegerAffinity(pRec);
83803 pRec->flags &= ~MEM_Str;
83825 Mem *pRec, /* The value to apply affinity to */
83832 if( (pRec->flags & MEM_Int)==0 ){ /*OPTIMIZATION-IF-FALSE*/
83833 if( (pRec->flags & MEM_Real)==0 ){
83834 if( pRec->flags & MEM_Str ) applyNumericAffinity(pRec,1);
83836 sqlite3VdbeIntegerAffinity(pRec);
83845 if( 0==(pRec->flags&MEM_Str) ){ /*OPTIMIZATION-IF-FALSE*/
83846 if( (pRec->flags&(MEM_Real|MEM_Int)) ){
83847 sqlite3VdbeMemStringify(pRec, enc, 1);
83850 pRec->flags &= ~(MEM_Real|MEM_Int);
86367 Mem *pRec; /* The new record */
86418 pRec = pData0;
86420 applyAffinity(pRec++, *(zAffinity++), encoding);
86421 assert( zAffinity[0]==0 || pRec<=pLast );
86442 pRec = pLast;
86444 assert( memIsValid(pRec) );
86445 serial_type = sqlite3VdbeSerialType(pRec, file_format, &len);
86446 if( pRec->flags & MEM_Zero ){
86457 if( sqlite3VdbeMemExpandBlob(pRec) ) goto no_mem;
86459 nZero += pRec->u.nZero;
86460 len -= pRec->u.nZero;
86467 pRec->uTemp = serial_type;
86468 if( pRec==pData0 ) break;
86469 pRec--;
86514 pRec = pData0;
86516 serial_type = pRec->uTemp;
86522 j += sqlite3VdbeSerialPut(&zNewRecord[j], pRec, serial_type); /* content */
86523 }while( (++pRec)<=pLast );
135975 UnpackedRecord *pRec; /* Probe for stat4 (if required) */
141133 UnpackedRecord *pRec, /* Vector of values to consider */
141150 assert( pRec!=0 );
141152 assert( pRec->nField>0 && pRec->nField<=pIdx->nSampleCol );
141198 nField = pRec->nField;
141218 pRec->nField = n;
141219 res = sqlite3VdbeRecordCompare(aSample[iSamp].n, aSample[iSamp].p, pRec);
141243 pRec->nField = nField;
141244 assert( 0==sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)
141252 pRec->nField = iCol+1;
141254 || sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)>0
141262 pRec->nField = iCol;
141263 assert( sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)<=0
141267 pRec->nField = nField;
141268 assert( sqlite3VdbeRecordCompare(aSample[i-1].n, aSample[i-1].p, pRec)<0
141306 pRec->nField = nField;
141516 UnpackedRecord *pRec = pBuilder->pRec;
141545 if( pRec ){
141546 testcase( pRec->nField!=pBuilder->nRecValid );
141547 pRec->nField = pBuilder->nRecValid;
141556 whereKeyStats(pParse, p, pRec, 0, a);
141574 rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, nBtm, nEq, &n);
141579 iLwrIdx = whereKeyStats(pParse, p, pRec, 0, a);
141591 rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, nTop, nEq, &n);
141596 iUprIdx = whereKeyStats(pParse, p, pRec, 1, a);
141604 pBuilder->pRec = pRec;
141686 UnpackedRecord *pRec = pBuilder->pRec;
141710 rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, 1, nEq-1, &bOk);
141711 pBuilder->pRec = pRec;
141716 whereKeyStats(pParse, p, pRec, 0, a);
143106 sqlite3Stat4ProbeFree(pBuilder->pRec);
143108 pBuilder->pRec = 0;