Home | History | Annotate | Download | only in orig

Lines Matching defs:pRec

66075     UnpackedRecord *pRec = p->ppRec[0];
66077 if( pRec==0 ){
66084 pRec = (UnpackedRecord*)sqlite3DbMallocZero(db, nByte);
66085 if( pRec ){
66086 pRec->pKeyInfo = sqlite3KeyInfoOfIndex(p->pParse, pIdx);
66087 if( pRec->pKeyInfo ){
66088 assert( pRec->pKeyInfo->nField+pRec->pKeyInfo->nXField==nCol );
66089 assert( pRec->pKeyInfo->enc==ENC(db) );
66090 pRec->aMem = (Mem *)((u8*)pRec + ROUND8(sizeof(UnpackedRecord)));
66092 pRec->aMem[i].flags = MEM_Null;
66093 pRec->aMem[i].db = db;
66096 sqlite3DbFree(db, pRec);
66097 pRec = 0;
66100 if( pRec==0 ) return 0;
66101 p->ppRec[0] = pRec;
66104 pRec->nField = p->iVal+1;
66105 return &pRec->aMem[p->iVal];
66567 ** Extract the iCol-th column from the nRec-byte record in pRec. Write
66576 const void *pRec, /* Pointer to buffer containing record */
66577 int nRec, /* Size of buffer pRec in bytes */
66587 u8 *a = (u8*)pRec; /* Typecast byte array */
66619 SQLITE_PRIVATE void sqlite3Stat4ProbeFree(UnpackedRecord *pRec){
66620 if( pRec ){
66622 int nCol = pRec->pKeyInfo->nField+pRec->pKeyInfo->nXField;
66623 Mem *aMem = pRec->aMem;
66628 sqlite3KeyInfoUnref(pRec->pKeyInfo);
66629 sqlite3DbFree(db, pRec);
73052 static void applyNumericAffinity(Mem *pRec, int bTryForInt){
73055 u8 enc = pRec->enc;
73056 assert( (pRec->flags & (MEM_Str|MEM_Int|MEM_Real))==MEM_Str );
73057 if( sqlite3AtoF(pRec->z, &rValue, pRec->n, enc)==0 ) return;
73058 if( 0==sqlite3Atoi64(pRec->z, &iValue, pRec->n, enc) ){
73059 pRec->u.i = iValue;
73060 pRec->flags |= MEM_Int;
73062 pRec->u.r = rValue;
73063 pRec->flags |= MEM_Real;
73064 if( bTryForInt ) sqlite3VdbeIntegerAffinity(pRec);
73074 ** Try to convert pRec to an integer representation or a
73081 ** Convert pRec to a text representation.
73084 ** No-op. pRec is unchanged.
73087 Mem *pRec, /* The value to apply affinity to */
73094 if( (pRec->flags & MEM_Int)==0 ){
73095 if( (pRec->flags & MEM_Real)==0 ){
73096 if( pRec->flags & MEM_Str ) applyNumericAffinity(pRec,1);
73098 sqlite3VdbeIntegerAffinity(pRec);
73106 if( 0==(pRec->flags&MEM_Str) && (pRec->flags&(MEM_Real|MEM_Int)) ){
73107 sqlite3VdbeMemStringify(pRec, enc, 1);
73109 pRec->flags &= ~(MEM_Real|MEM_Int);
75536 Mem *pRec; /* The new record */
75587 pRec = pData0;
75589 applyAffinity(pRec++, *(zAffinity++), encoding);
75590 assert( zAffinity[0]==0 || pRec<=pLast );
75597 pRec = pLast;
75599 assert( memIsValid(pRec) );
75600 pRec->uTemp = serial_type = sqlite3VdbeSerialType(pRec, file_format);
75602 if( pRec->flags & MEM_Zero ){
75604 if( sqlite3VdbeMemExpandBlob(pRec) ) goto no_mem;
75606 nZero += pRec->u.nZero;
75607 len -= pRec->u.nZero;
75614 }while( (--pRec)>=pData0 );
75650 pRec = pData0;
75652 serial_type = pRec->uTemp;
75658 j += sqlite3VdbeSerialPut(&zNewRecord[j], pRec, serial_type); /* content */
75659 }while( (++pRec)<=pLast );
118393 UnpackedRecord *pRec; /* Probe for stat4 (if required) */
118394 int nRecValid; /* Number of valid fields currently in pRec */
122343 ** aStat[0] Est. number of rows less than pRec
122344 ** aStat[1] Est. number of rows equal to pRec
122347 ** is greater than or equal to pRec. Note that this index is not an index
122350 ** pRec.
122355 UnpackedRecord *pRec, /* Vector of values to consider */
122361 int i; /* Index of first sample >= pRec */
122362 int iSample; /* Smallest sample larger than or equal to pRec */
122366 int nField; /* Number of fields in pRec */
122367 tRowcnt iLower = 0; /* anLt[] + anEq[] of largest sample pRec is > */
122372 assert( pRec!=0 );
122374 assert( pRec->nField>0 && pRec->nField<=pIdx->nSampleCol );
122377 ** to pRec. If pRec contains a single field, the set of samples to search
122381 ** If pRec contains N fields, where N is more than one, then as well as the
122420 nField = pRec->nField;
122440 pRec->nField = n;
122441 res = sqlite3VdbeRecordCompare(aSample[iSamp].n, aSample[iSamp].p, pRec);
122462 /* If (res==0) is true, then pRec must be equal to sample i. */
122465 pRec->nField = nField;
122466 assert( 0==sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)
122470 /* Unless i==pIdx->nSample, indicating that pRec is larger than
122471 ** all samples in the aSample[] array, pRec must be smaller than the
122474 pRec->nField = iCol+1;
122476 || sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)>0
122479 /* if i==0 and iCol==0, then record pRec is smaller than all samples
122480 ** in the aSample[] array. Otherwise, if (iCol>0) then pRec must
122482 ** If (i>0), then pRec must also be greater than sample (i-1). */
122484 pRec->nField = iCol;
122485 assert( sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)<=0
122489 pRec->nField = nField;
122490 assert( sqlite3VdbeRecordCompare(aSample[i-1].n, aSample[i-1].p, pRec)<0
122498 /* Record pRec is equal to sample i */
122504 ** sample that is greater than pRec. Or, if i==pIdx->nSample then pRec
122527 /* Restore the pRec->nField value before returning. */
122528 pRec->nField = nField;
122736 UnpackedRecord *pRec = pBuilder->pRec;
122764 if( pRec ){
122765 testcase( pRec->nField!=pBuilder->nRecValid );
122766 pRec->nField = pBuilder->nRecValid;
122777 whereKeyStats(pParse, p, pRec, 0, a);
122794 rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, aff, nEq, &bOk);
122797 iLwrIdx = whereKeyStats(pParse, p, pRec, 0, a);
122809 rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, aff, nEq, &bOk);
122812 iUprIdx = whereKeyStats(pParse, p, pRec, 1, a);
122820 pBuilder->pRec = pRec;
122902 UnpackedRecord *pRec = pBuilder->pRec;
122928 rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, aff, nEq-1, &bOk);
122929 pBuilder->pRec = pRec;
122934 whereKeyStats(pParse, p, pRec, 0, a);
124108 sqlite3Stat4ProbeFree(pBuilder->pRec);
124110 pBuilder->pRec = 0;