Home | History | Annotate | Download | only in orig

Lines Matching defs:pRec

64186     UnpackedRecord *pRec = p->ppRec[0];
64188 if( pRec==0 ){
64195 pRec = (UnpackedRecord*)sqlite3DbMallocZero(db, nByte);
64196 if( pRec ){
64197 pRec->pKeyInfo = sqlite3KeyInfoOfIndex(p->pParse, pIdx);
64198 if( pRec->pKeyInfo ){
64199 assert( pRec->pKeyInfo->nField+pRec->pKeyInfo->nXField==nCol );
64200 assert( pRec->pKeyInfo->enc==ENC(db) );
64201 pRec->aMem = (Mem *)((u8*)pRec + ROUND8(sizeof(UnpackedRecord)));
64203 pRec->aMem[i].flags = MEM_Null;
64204 pRec->aMem[i].db = db;
64207 sqlite3DbFree(db, pRec);
64208 pRec = 0;
64211 if( pRec==0 ) return 0;
64212 p->ppRec[0] = pRec;
64215 pRec->nField = p->iVal+1;
64216 return &pRec->aMem[p->iVal];
64678 ** Extract the iCol-th column from the nRec-byte record in pRec. Write
64687 const void *pRec, /* Pointer to buffer containing record */
64688 int nRec, /* Size of buffer pRec in bytes */
64698 u8 *a = (u8*)pRec; /* Typecast byte array */
64730 SQLITE_PRIVATE void sqlite3Stat4ProbeFree(UnpackedRecord *pRec){
64731 if( pRec ){
64733 int nCol = pRec->pKeyInfo->nField+pRec->pKeyInfo->nXField;
64734 Mem *aMem = pRec->aMem;
64739 sqlite3KeyInfoUnref(pRec->pKeyInfo);
64740 sqlite3DbFree(db, pRec);
70985 static void applyNumericAffinity(Mem *pRec, int bTryForInt){
70988 u8 enc = pRec->enc;
70989 assert( (pRec->flags & (MEM_Str|MEM_Int|MEM_Real))==MEM_Str );
70990 if( sqlite3AtoF(pRec->z, &rValue, pRec->n, enc)==0 ) return;
70991 if( 0==sqlite3Atoi64(pRec->z, &iValue, pRec->n, enc) ){
70992 pRec->u.i = iValue;
70993 pRec->flags |= MEM_Int;
70995 pRec->u.r = rValue;
70996 pRec->flags |= MEM_Real;
70997 if( bTryForInt ) sqlite3VdbeIntegerAffinity(pRec);
71007 ** Try to convert pRec to an integer representation or a
71014 ** Convert pRec to a text representation.
71017 ** No-op. pRec is unchanged.
71020 Mem *pRec, /* The value to apply affinity to */
71027 if( (pRec->flags & MEM_Int)==0 ){
71028 if( (pRec->flags & MEM_Real)==0 ){
71029 if( pRec->flags & MEM_Str ) applyNumericAffinity(pRec,1);
71031 sqlite3VdbeIntegerAffinity(pRec);
71039 if( 0==(pRec->flags&MEM_Str) && (pRec->flags&(MEM_Real|MEM_Int)) ){
71040 sqlite3VdbeMemStringify(pRec, enc, 1);
71042 pRec->flags &= ~(MEM_Real|MEM_Int);
73433 Mem *pRec; /* The new record */
73484 pRec = pData0;
73486 applyAffinity(pRec++, *(zAffinity++), encoding);
73487 assert( zAffinity[0]==0 || pRec<=pLast );
73494 pRec = pLast;
73496 assert( memIsValid(pRec) );
73497 pRec->uTemp = serial_type = sqlite3VdbeSerialType(pRec, file_format);
73499 if( pRec->flags & MEM_Zero ){
73501 sqlite3VdbeMemExpandBlob(pRec);
73503 nZero += pRec->u.nZero;
73504 len -= pRec->u.nZero;
73511 }while( (--pRec)>=pData0 );
73547 pRec = pData0;
73549 serial_type = pRec->uTemp;
73555 j += sqlite3VdbeSerialPut(&zNewRecord[j], pRec, serial_type); /* content */
73556 }while( (++pRec)<=pLast );
76545 Mem *pRec;
76552 pRec = &aMem[pOp->p2];
76555 for(i=0; i<n; i++, pRec++){
76556 assert( memIsValid(pRec) );
76557 apVal[i] = pRec;
76558 memAboutToChange(p, pRec);
116106 UnpackedRecord *pRec; /* Probe for stat4 (if required) */
116107 int nRecValid; /* Number of valid fields currently in pRec */
118206 ** aStat[0] Est. number of rows less than pRec
118207 ** aStat[1] Est. number of rows equal to pRec
118210 ** is greater than or equal to pRec. Note that this index is not an index
118213 ** pRec.
118218 UnpackedRecord *pRec, /* Vector of values to consider */
118224 int i; /* Index of first sample >= pRec */
118225 int iSample; /* Smallest sample larger than or equal to pRec */
118229 int nField; /* Number of fields in pRec */
118230 tRowcnt iLower = 0; /* anLt[] + anEq[] of largest sample pRec is > */
118235 assert( pRec!=0 );
118237 assert( pRec->nField>0 && pRec->nField<=pIdx->nSampleCol );
118240 ** to pRec. If pRec contains a single field, the set of samples to search
118244 ** If pRec contains N fields, where N is more than one, then as well as the
118283 nField = pRec->nField;
118303 pRec->nField = n;
118304 res = sqlite3VdbeRecordCompare(aSample[iSamp].n, aSample[iSamp].p, pRec);
118325 /* If (res==0) is true, then pRec must be equal to sample i. */
118328 pRec->nField = nField;
118329 assert( 0==sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)
118333 /* Unless i==pIdx->nSample, indicating that pRec is larger than
118334 ** all samples in the aSample[] array, pRec must be smaller than the
118337 pRec->nField = iCol+1;
118339 || sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)>0
118342 /* if i==0 and iCol==0, then record pRec is smaller than all samples
118343 ** in the aSample[] array. Otherwise, if (iCol>0) then pRec must
118345 ** If (i>0), then pRec must also be greater than sample (i-1). */
118347 pRec->nField = iCol;
118348 assert( sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)<=0
118352 pRec->nField = nField;
118353 assert( sqlite3VdbeRecordCompare(aSample[i-1].n, aSample[i-1].p, pRec)<0
118361 /* Record pRec is equal to sample i */
118367 ** sample that is greater than pRec. Or, if i==pIdx->nSample then pRec
118390 /* Restore the pRec->nField value before returning. */
118391 pRec->nField = nField;
118585 UnpackedRecord *pRec = pBuilder->pRec;
118613 if( pRec ){
118614 testcase( pRec->nField!=pBuilder->nRecValid );
118615 pRec->nField = pBuilder->nRecValid;
118629 whereKeyStats(pParse, p, pRec, 0, a);
118646 rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, aff, nEq, &bOk);
118649 iLwrIdx = whereKeyStats(pParse, p, pRec, 0, a);
118661 rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, aff, nEq, &bOk);
118664 iUprIdx = whereKeyStats(pParse, p, pRec, 1, a);
118672 pBuilder->pRec = pRec;
118754 UnpackedRecord *pRec = pBuilder->pRec;
118780 rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, aff, nEq-1, &bOk);
118781 pBuilder->pRec = pRec;
118786 whereKeyStats(pParse, p, pRec, 0, a);
121421 sqlite3Stat4ProbeFree(pBuilder->pRec);
121423 pBuilder->pRec = 0;