Lines Matching refs:pRec
69759 UnpackedRecord *pRec = p->ppRec[0];
69761 if( pRec==0 ){
69768 pRec = (UnpackedRecord*)sqlite3DbMallocZero(db, nByte);
69769 if( pRec ){
69770 pRec->pKeyInfo = sqlite3KeyInfoOfIndex(p->pParse, pIdx);
69771 if( pRec->pKeyInfo ){
69772 assert( pRec->pKeyInfo->nField+pRec->pKeyInfo->nXField==nCol );
69773 assert( pRec->pKeyInfo->enc==ENC(db) );
69774 pRec->aMem = (Mem *)((u8*)pRec + ROUND8(sizeof(UnpackedRecord)));
69776 pRec->aMem[i].flags = MEM_Null;
69777 pRec->aMem[i].db = db;
69780 sqlite3DbFree(db, pRec);
69781 pRec = 0;
69784 if( pRec==0 ) return 0;
69785 p->ppRec[0] = pRec;
69788 pRec->nField = p->iVal+1;
69789 return &pRec->aMem[p->iVal];
70252 const void *pRec, /* Pointer to buffer containing record */
70263 u8 *a = (u8*)pRec; /* Typecast byte array */
70295 SQLITE_PRIVATE void sqlite3Stat4ProbeFree(UnpackedRecord *pRec){
70296 if( pRec ){
70298 int nCol = pRec->pKeyInfo->nField+pRec->pKeyInfo->nXField;
70299 Mem *aMem = pRec->aMem;
70304 sqlite3KeyInfoUnref(pRec->pKeyInfo);
70305 sqlite3DbFree(db, pRec);
77301 static void applyNumericAffinity(Mem *pRec, int bTryForInt){
77304 u8 enc = pRec->enc;
77305 assert( (pRec->flags & (MEM_Str|MEM_Int|MEM_Real))==MEM_Str );
77306 if( sqlite3AtoF(pRec->z, &rValue, pRec->n, enc)==0 ) return;
77307 if( 0==sqlite3Atoi64(pRec->z, &iValue, pRec->n, enc) ){
77308 pRec->u.i = iValue;
77309 pRec->flags |= MEM_Int;
77311 pRec->u.r = rValue;
77312 pRec->flags |= MEM_Real;
77313 if( bTryForInt ) sqlite3VdbeIntegerAffinity(pRec);
77336 Mem *pRec, /* The value to apply affinity to */
77343 if( (pRec->flags & MEM_Int)==0 ){ /*OPTIMIZATION-IF-FALSE*/
77344 if( (pRec->flags & MEM_Real)==0 ){
77345 if( pRec->flags & MEM_Str ) applyNumericAffinity(pRec,1);
77347 sqlite3VdbeIntegerAffinity(pRec);
77356 if( 0==(pRec->flags&MEM_Str) ){ /*OPTIMIZATION-IF-FALSE*/
77357 if( (pRec->flags&(MEM_Real|MEM_Int)) ){
77358 sqlite3VdbeMemStringify(pRec, enc, 1);
77361 pRec->flags &= ~(MEM_Real|MEM_Int);
79810 Mem *pRec; /* The new record */
79861 pRec = pData0;
79863 applyAffinity(pRec++, *(zAffinity++), encoding);
79864 assert( zAffinity[0]==0 || pRec<=pLast );
79871 pRec = pLast;
79873 assert( memIsValid(pRec) );
79874 pRec->uTemp = serial_type = sqlite3VdbeSerialType(pRec, file_format, &len);
79875 if( pRec->flags & MEM_Zero ){
79877 if( sqlite3VdbeMemExpandBlob(pRec) ) goto no_mem;
79879 nZero += pRec->u.nZero;
79880 len -= pRec->u.nZero;
79887 if( pRec==pData0 ) break;
79888 pRec--;
79925 pRec = pData0;
79927 serial_type = pRec->uTemp;
79933 j += sqlite3VdbeSerialPut(&zNewRecord[j], pRec, serial_type); /* content */
79934 }while( (++pRec)<=pLast );
123365 UnpackedRecord *pRec; /* Probe for stat4 (if required) */
127725 UnpackedRecord *pRec, /* Vector of values to consider */
127742 assert( pRec!=0 );
127744 assert( pRec->nField>0 && pRec->nField<=pIdx->nSampleCol );
127790 nField = pRec->nField;
127810 pRec->nField = n;
127811 res = sqlite3VdbeRecordCompare(aSample[iSamp].n, aSample[iSamp].p, pRec);
127835 pRec->nField = nField;
127836 assert( 0==sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)
127844 pRec->nField = iCol+1;
127846 || sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)>0
127854 pRec->nField = iCol;
127855 assert( sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)<=0
127859 pRec->nField = nField;
127860 assert( sqlite3VdbeRecordCompare(aSample[i-1].n, aSample[i-1].p, pRec)<0
127898 pRec->nField = nField;
128106 UnpackedRecord *pRec = pBuilder->pRec;
128134 if( pRec ){
128135 testcase( pRec->nField!=pBuilder->nRecValid );
128136 pRec->nField = pBuilder->nRecValid;
128147 whereKeyStats(pParse, p, pRec, 0, a);
128164 rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, aff, nEq, &bOk);
128167 iLwrIdx = whereKeyStats(pParse, p, pRec, 0, a);
128179 rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, aff, nEq, &bOk);
128182 iUprIdx = whereKeyStats(pParse, p, pRec, 1, a);
128190 pBuilder->pRec = pRec;
128272 UnpackedRecord *pRec = pBuilder->pRec;
128298 rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, aff, nEq-1, &bOk);
128299 pBuilder->pRec = pRec;
128304 whereKeyStats(pParse, p, pRec, 0, a);
129538 sqlite3Stat4ProbeFree(pBuilder->pRec);
129540 pBuilder->pRec = 0;