Lines Matching refs:pRet
59661 Wal *pRet; /* Object to allocate and return */
59685 pRet = (Wal*)sqlite3MallocZero(sizeof(Wal) + pVfs->szOsFile);
59686 if( !pRet ){
59690 pRet->pVfs = pVfs;
59691 pRet->pWalFd = (sqlite3_file *)&pRet[1];
59692 pRet->pDbFd = pDbFd;
59693 pRet->readLock = -1;
59694 pRet->mxWalSize = mxWalSize;
59695 pRet->zWalName = zWalName;
59696 pRet->syncHeader = 1;
59697 pRet->padToSectorBoundary = 1;
59698 pRet->exclusiveMode = (bNoShm ? WAL_HEAPMEMORY_MODE: WAL_NORMAL_MODE);
59702 rc = sqlite3OsOpen(pVfs, zWalName, pRet->pWalFd, flags, &flags);
59704 pRet->readOnly = WAL_RDONLY;
59708 walIndexClose(pRet, 0);
59709 sqlite3OsClose(pRet->pWalFd);
59710 sqlite3_free(pRet);
59713 if( iDC & SQLITE_IOCAP_SEQUENTIAL ){ pRet->syncHeader = 0; }
59715 pRet->padToSectorBoundary = 0;
59717 *ppWal = pRet;
59718 WALTRACE(("WAL%d: opened\n", pRet));
62060 WalIndexHdr *pRet;
62069 pRet = (WalIndexHdr*)sqlite3_malloc(sizeof(WalIndexHdr));
62070 if( pRet==0 ){
62073 memcpy(pRet, &pWal->hdr, sizeof(WalIndexHdr));
62074 *ppSnapshot = (sqlite3_snapshot*)pRet;
76879 Op *pRet = 0;
76894 pRet = &aOp[p->iAddr];
76901 if( pRet->p4type==P4_SUBPROGRAM ){
76905 if( p->apSub[j]==pRet->p4.pProgram ) break;
76910 pRet = 0;
76912 p->apSub[p->nSub++] = pRet->p4.pProgram;
76918 return pRet;
81140 sqlite3_value *pRet = sqlite3ValueNew(v->db);
81141 if( pRet ){
81142 sqlite3VdbeMemCopy((Mem *)pRet, pMem);
81143 sqlite3ValueApplyAffinity(pRet, aff, SQLITE_UTF8);
81145 return pRet;
83041 UnpackedRecord *pRet; /* Return value */
83043 pRet = sqlite3VdbeAllocUnpackedRecord(pKeyInfo);
83044 if( pRet ){
83045 memset(pRet->aMem, 0, sizeof(Mem)*(pKeyInfo->nKeyField+1));
83046 sqlite3VdbeRecordUnpack(pKeyInfo, nKey, pKey, pRet);
83048 return pRet;
92832 void *pRet = SQLITE_INT_TO_PTR(SQLITE_ERROR);
92834 (void)sqlite3ThreadJoin(pTask->pThread, &pRet);
92836 rc = SQLITE_PTR_TO_INT(pRet);
93638 void *pRet = SQLITE_INT_TO_PTR( vdbeIncrPopulate(pIncr) );
93640 return pRet;
93973 void *pRet = SQLITE_INT_TO_PTR(
93977 return pRet;
97329 Expr *pRet;
97348 pRet = sqlite3PExpr(pParse, TK_SELECT_COLUMN, 0, 0);
97349 if( pRet ){
97350 pRet->iColumn = iField;
97351 pRet->pLeft = pVector;
97353 assert( pRet==0 || pRet->iTable==0 );
97356 pRet = sqlite3ExprDup(pParse->db, pVector, 0);
97357 sqlite3RenameTokenRemap(pParse, pRet, pVector);
97359 return pRet;
98212 With *pRet = 0;
98215 pRet = sqlite3DbMallocZero(db, nByte);
98216 if( pRet ){
98218 pRet->nCte = p->nCte;
98220 pRet->a[i].pSelect = sqlite3SelectDup(db, p->a[i].pSelect, 0);
98221 pRet->a[i].pCols = sqlite3ExprListDup(db, p->a[i].pCols, 0);
98222 pRet->a[i].zName = sqlite3DbStrDup(db, p->a[i].zName);
98226 return pRet;
98400 Select *pRet = 0;
98402 Select **pp = &pRet;
98437 return pRet;
126834 CollSeq *pRet;
126836 pRet = multiSelectCollSeq(pParse, p->pPrior, iCol);
126838 pRet = 0;
126844 if( pRet==0 && ALWAYS(iCol<p->pEList->nExpr) ){
126845 pRet = sqlite3ExprCollSeq(pParse, p->pEList->a[iCol].pExpr);
126847 return pRet;
126863 KeyInfo *pRet = sqlite3KeyInfoAlloc(db, nOrderBy+nExtra, 1);
126864 if( pRet ){
126879 assert( sqlite3KeyInfoIsWriteable(pRet) );
126880 pRet->aColl[i] = pColl;
126881 pRet->aSortOrder[i] = pOrderBy->a[i].sortOrder;
126885 return pRet;
134477 VTable *pRet = 0;
134494 pRet = pVTable;
134495 p->pVTable = pRet;
134496 pRet->pNext = 0;
134504 assert( !db || pRet );
134505 return pRet;
147423 Window *pRet = 0;
147424 Window **pp = &pRet;
147432 return pRet;
156722 void *pRet;
156731 pRet = db->pUpdateArg;
156735 return pRet;
156747 void *pRet;
156756 pRet = db->pRollbackArg;
156760 return pRet;
156774 void *pRet;
156776 pRet = db->pPreUpdateArg;
156780 return pRet;
156844 void *pRet;
156852 pRet = db->pWalArg;
156856 return pRet;
166943 void *pRet = sqlite3_malloc64(nByte);
166944 if( pRet ) memset(pRet, 0, nByte);
166945 return pRet;
167004 Fts3Expr *pRet = 0;
167023 pRet = (Fts3Expr *)fts3MallocZero(nByte);
167024 if( !pRet ){
167027 pRet->eType = FTSQUERY_PHRASE;
167028 pRet->pPhrase = (Fts3Phrase *)&pRet[1];
167029 pRet->pPhrase->nToken = 1;
167030 pRet->pPhrase->iColumn = iCol;
167031 pRet->pPhrase->aToken[0].n = nToken;
167032 pRet->pPhrase->aToken[0].z = (char *)&pRet->pPhrase[1];
167033 memcpy(pRet->pPhrase->aToken[0].z, zToken, nToken);
167036 pRet->pPhrase->aToken[0].isPrefix = 1;
167047 pRet->pPhrase->aToken[0].bFirst = 1;
167063 *ppExpr = pRet;
167073 void *pRet = sqlite3_realloc64(pOrig, nNew);
167074 if( !pRet ){
167077 return pRet;
167231 Fts3Expr *pRet = 0;
167281 pRet = (Fts3Expr *)fts3MallocZero(sizeof(Fts3Expr));
167282 if( !pRet ){
167285 pRet->eType = pKey->eType;
167286 pRet->nNear = nNear;
167287 *ppExpr = pRet;
167433 Fts3Expr *pRet = 0;
167488 assert( pRet && pPrev );
167496 insertBinaryOperator(&pRet, pPrev, pAnd);
167519 if( pRet ){
167524 pRet = p;
167527 insertBinaryOperator(&pRet, pPrev, p);
167540 if( rc==SQLITE_DONE && pRet && isRequirePhrase ){
167547 if( !pRet ){
167554 pIter->pLeft = pRet;
167555 pRet->pParent = pIter;
167556 pRet = pNotBranch;
167564 sqlite3Fts3ExprFree(pRet);
167566 pRet = 0;
167568 *ppExpr = pRet;
169449 Tcl_Obj *pRet;
169471 pRet = Tcl_NewObj();
169472 Tcl_IncrRefCount(pRet);
169489 Tcl_ListObjAppendElement(0, pRet, Tcl_NewIntObj(iPos));
169490 Tcl_ListObjAppendElement(0, pRet, Tcl_NewStringObj(zToken, nToken));
169493 Tcl_ListObjAppendElement(0, pRet, Tcl_NewStringObj(zToken, nToken));
169509 sqlite3_result_text(context, Tcl_GetString(pRet), -1, SQLITE_TRANSIENT);
169511 Tcl_DecrRefCount(pRet);
175829 char *pRet;
175840 pRet = (char *)sqlite3_malloc(p->pList->nData);
175841 if( !pRet ) return SQLITE_NOMEM;
175845 *ppData = pRet;
175847 memcpy(pRet, &p->pList->aData[nSkip], *pnData);
176227 MatchinfoBuffer *pRet;
176232 pRet = sqlite3_malloc64(nByte + nStr+1);
176233 if( pRet ){
176234 memset(pRet, 0, nByte);
176235 pRet->aMatchinfo[0] = (u8*)(&pRet->aMatchinfo[1]) - (u8*)pRet;
176236 pRet->aMatchinfo[1+nElem] = pRet->aMatchinfo[0]
176238 pRet->nElem = (int)nElem;
176239 pRet->zMatchinfo = ((char*)pRet) + nByte;
176240 memcpy(pRet->zMatchinfo, zMatchinfo, nStr+1);
176241 pRet->aRef[0] = 1;
176244 return pRet;
185018 sqlite3_stmt *pRet = 0;
185027 pCheck->rc = sqlite3_prepare_v2(pCheck->db, z, -1, &pRet, 0);
185033 return pRet;
185076 u8 *pRet = 0; /* Return value */
185090 pRet = sqlite3_malloc64(nNode);
185091 if( pRet==0 ){
185094 memcpy(pRet, pNode, nNode);
185099 if( pCheck->rc==SQLITE_OK && pRet==0 ){
185104 return pRet;
189906 void *pRet = 0;
189909 pRet = sqlite3_malloc64(nByte);
189910 if( pRet==0 ){
189913 memset(pRet, 0, nByte);
189916 return pRet;
191228 RbuState *pRet = 0;
191233 pRet = (RbuState*)rbuMalloc(p, sizeof(RbuState));
191234 if( pRet==0 ) return 0;
191242 pRet->eStage = sqlite3_column_int(pStmt, 1);
191243 if( pRet->eStage!=RBU_STAGE_OAL
191244 && pRet->eStage!=RBU_STAGE_MOVE
191245 && pRet->eStage!=RBU_STAGE_CKPT
191252 pRet->zTbl = rbuStrndup((char*)sqlite3_column_text(pStmt, 1), &rc);
191256 pRet->zIdx = rbuStrndup((char*)sqlite3_column_text(pStmt, 1), &rc);
191260 pRet->nRow = sqlite3_column_int(pStmt, 1);
191264 pRet->nProgress = sqlite3_column_int64(pStmt, 1);
191268 pRet->iWalCksum = sqlite3_column_int64(pStmt, 1);
191272 pRet->iCookie = (u32)sqlite3_column_int64(pStmt, 1);
191276 pRet->iOalSz = (u32)sqlite3_column_int64(pStmt, 1);
191280 pRet->nPhaseOneStep = sqlite3_column_int64(pStmt, 1);
191284 pRet->zDataTbl = rbuStrndup((char*)sqlite3_column_text(pStmt, 1), &rc);
191296 return pRet;
192649 sqlite3rbu *pRet;
192650 pRet = sqlite3_malloc64(sizeof(sqlite3rbu));
192651 if( pRet ){
192652 memset(pRet, 0, sizeof(sqlite3rbu));
192653 pRet->rc = SQLITE_MISUSE;
192655 return pRet;
195750 u8 *pRet = 0;
195758 pRet = a2;
195764 if( pRet==0 ){
195766 pRet = a1;
195770 return pRet;
196332 SessionTable *pRet;
196335 for(pRet=pSession->pTable; pRet; pRet=pRet->pNext){
196336 if( 0==sqlite3_strnicmp(pRet->zName, zName, nName+1) ) break;
196339 if( pRet==0 && pSession->bAutoAttach ){
196347 for(pRet=pSession->pTable; pRet->pNext; pRet=pRet->pNext);
196348 assert( 0==sqlite3_strnicmp(pRet->zName, zName, nName+1) );
196353 assert( rc==SQLITE_OK || pRet==0 );
196354 *ppTab = pRet;
197617 sqlite3_changeset_iter *pRet; /* Iterator to return */
197627 pRet = (sqlite3_changeset_iter *)sqlite3_malloc(nByte);
197628 if( !pRet ) return SQLITE_NOMEM;
197629 memset(pRet, 0, sizeof(sqlite3_changeset_iter));
197630 pRet->in.aData = (u8 *)pChangeset;
197631 pRet->in.nData = nChangeset;
197632 pRet->in.xInput = xInput;
197633 pRet->in.pIn = pIn;
197634 pRet->in.bEof = (xInput ? 0 : 1);
197635 pRet->bInvert = bInvert;
197638 *pp = pRet;
204357 void *pRet = 0;
204359 pRet = sqlite3_malloc64(nByte);
204360 if( pRet==0 ){
204363 memset(pRet, 0, (size_t)nByte);
204366 return pRet;
205034 Fts5Config *pRet; /* New object to return */
205038 *ppOut = pRet = (Fts5Config*)sqlite3_malloc(sizeof(Fts5Config));
205039 if( pRet==0 ) return SQLITE_NOMEM;
205040 memset(pRet, 0, sizeof(Fts5Config));
205041 pRet->db = db;
205042 pRet->iCookie = -1;
205045 pRet->azCol = (char**)sqlite3Fts5MallocZero(&rc, nByte);
205046 pRet->abUnindexed = (u8*)&pRet->azCol[nArg];
205047 pRet->zDb = sqlite3Fts5Strndup(&rc, azArg[1], -1);
205048 pRet->zName = sqlite3Fts5Strndup(&rc, azArg[2], -1);
205049 pRet->bColumnsize = 1;
205050 pRet->eDetail = FTS5_DETAIL_FULL;
205052 pRet->bPrefixIndex = 1;
205054 if( rc==SQLITE_OK && sqlite3_stricmp(pRet->zName, FTS5_RANK_NAME)==0 ){
205055 *pzErr = sqlite3_mprintf("reserved fts5 table name: %s", pRet->zName);
205087 rc = fts5ConfigParseSpecial(pGlobal, pRet, zOne, zTwo?zTwo:"", pzErr);
205089 rc = fts5ConfigParseColumn(pRet, zOne, zTwo, pzErr);
205102 if( rc==SQLITE_OK && pRet->pTok==0 ){
205103 rc = fts5ConfigDefaultTokenizer(pGlobal, pRet);
205107 if( rc==SQLITE_OK && pRet->zContent==0 ){
205109 assert( pRet->eContent==FTS5_CONTENT_NORMAL
205110 || pRet->eContent==FTS5_CONTENT_NONE
205112 if( pRet->eContent==FTS5_CONTENT_NORMAL ){
205114 }else if( pRet->bColumnsize ){
205119 pRet->zContent = sqlite3Fts5Mprintf(
205120 &rc, "%Q.'%q_%s'", pRet->zDb, pRet->zName, zTail
205125 if( rc==SQLITE_OK && pRet->zContentRowid==0 ){
205126 pRet->zContentRowid = sqlite3Fts5Strndup(&rc, "rowid", -1);
205131 rc = fts5ConfigMakeExprlist(pRet);
205135 sqlite3Fts5ConfigFree(pRet);
206943 Fts5ExprNearset *pRet = 0;
206952 pRet = sqlite3_malloc64(nByte);
206953 if( pRet==0 ){
206956 memset(pRet, 0, (size_t)nByte);
206963 pRet = (Fts5ExprNearset*)sqlite3_realloc64(pNear, nByte);
206964 if( pRet==0 ){
206968 pRet = pNear;
206972 if( pRet==0 ){
206977 if( pRet->nPhrase>0 ){
206978 Fts5ExprPhrase *pLast = pRet->apPhrase[pRet->nPhrase-1];
206982 pRet->nPhrase--;
206989 pRet->nPhrase--;
206992 pRet->apPhrase[pRet->nPhrase++] = pPhrase;
206994 return pRet;
207341 Fts5Colset *pRet;
207344 pRet = (Fts5Colset*)sqlite3Fts5MallocZero(&pParse->rc,
207347 if( pRet ){
207352 pRet->aiCol[pRet->nCol++] = i;
207360 return pRet;
207368 Fts5Colset *pRet = 0;
207382 pRet = fts5ParseColset(pParse, pColset, iCol);
207387 if( pRet==0 ){
207392 return pRet;
207404 Fts5Colset *pRet;
207407 pRet = (Fts5Colset*)sqlite3Fts5MallocZero(pRc, nByte);
207408 if( pRet ){
207409 memcpy(pRet, pOrig, (size_t)nByte);
207412 pRet = 0;
207414 return pRet;
207556 Fts5ExprNode *pRet = 0;
207578 pRet = (Fts5ExprNode*)sqlite3Fts5MallocZero(&pParse->rc, nByte);
207580 if( pRet ){
207581 pRet->eType = eType;
207582 pRet->pNear = pNear;
207583 fts5ExprAssignXNext(pRet);
207587 pNear->apPhrase[iPhrase]->pNode = pRet;
207589 pRet->xNext = 0;
207590 pRet->eType = FTS5_EOF;
207607 sqlite3_free(pRet);
207608 pRet = 0;
207612 fts5ExprAddChildren(pRet, pLeft);
207613 fts5ExprAddChildren(pRet, pRight);
207618 if( pRet==0 ){
207624 return pRet;
207632 Fts5ExprNode *pRet = 0;
207663 pRet = pLeft;
207670 pRet = pRight;
207673 pRet = pLeft;
207684 pRet = sqlite3Fts5ParseNode(pParse, FTS5_AND, pLeft, pRight, 0);
207688 return pRet;
208120 Fts5PoslistPopulator *pRet;
208121 pRet = sqlite3_malloc64(sizeof(Fts5PoslistPopulator)*pExpr->nPhrase);
208122 if( pRet ){
208124 memset(pRet, 0, sizeof(Fts5PoslistPopulator)*pExpr->nPhrase);
208132 pRet[i].bMiss = 1;
208138 return pRet;
208720 Fts5HashEntry *pRet = 0;
208721 Fts5HashEntry **ppOut = &pRet;
208751 return pRet;
208827 u8 *pRet = (u8*)(*ppOut = sqlite3_malloc64(nPre + nList + 10));
208828 if( pRet ){
208829 Fts5HashEntry *pFaux = (Fts5HashEntry*)&pRet[nPre-nHashPre];
208830 memcpy(&pRet[nPre], &((u8*)p)[nHashPre], nList);
209518 Fts5Data *pRet = 0;
209557 pRet = (Fts5Data*)sqlite3_malloc64(nAlloc);
209558 if( pRet ){
209559 pRet->nn = nByte;
209560 aOut = pRet->p = (u8*)&pRet[1];
209569 sqlite3_free(pRet);
209570 pRet = 0;
209573 pRet->p[nByte] = 0x00;
209574 pRet->szLeaf = fts5GetU16(&pRet->p[2]);
209581 assert( (pRet==0)==(p->rc!=SQLITE_OK) );
209582 return pRet;
209594 Fts5Data *pRet = fts5DataRead(p, iRowid);
209595 if( pRet ){
209596 if( pRet->szLeaf>pRet->nn ){
209598 fts5DataRelease(pRet);
209599 pRet = 0;
209602 return pRet;
209733 Fts5Structure *pRet = 0; /* Structure object to return */
209752 pRet = (Fts5Structure*)sqlite3Fts5MallocZero(&rc, nByte);
209754 if( pRet ){
209755 pRet->nRef = 1;
209756 pRet->nLevel = nLevel;
209757 pRet->nSegment = nSegment;
209758 i += sqlite3Fts5GetVarint(&pData[i], &pRet->nWriteCounter);
209761 Fts5StructureLevel *pLvl = &pRet->aLevel[iLvl];
209800 fts5StructureRelease(pRet);
209801 pRet = 0;
209805 *ppOut = pRet;
209866 Fts5Structure *pRet = 0;
209875 p->rc = fts5StructureDecode(pData->p, pData->nn, &iCookie, &pRet);
209881 fts5StructureRelease(pRet);
209882 pRet = 0;
209886 return pRet;
214267 Fts5Iter *pRet = 0;
214306 pColset, buf.p, nToken+1, -1, 0, &pRet
214314 fts5SetupPrefixIter(p, bDesc, buf.p, nToken+1, pColset, &pRet);
214315 assert( p->rc!=SQLITE_OK || pRet->pColset==0 );
214316 fts5IterSetOutputCb(&p->rc, pRet);
214318 Fts5SegIter *pSeg = &pRet->aSeg[pRet->aFirst[1].iFirst];
214319 if( pSeg->pLeaf ) pRet->xSetOutputs(pRet, pSeg);
214324 sqlite3Fts5IterClose((Fts5IndexIter*)pRet);
214325 pRet = 0;
214329 *ppIter = (Fts5IndexIter*)pRet;
216332 sqlite3_stmt *pRet = 0;
216343 SQLITE_PREPARE_PERSISTENT, &pRet, 0);
216351 *ppStmt = pRet;
217456 void *pRet = 0;
217463 pRet = pData->pPtr;
217470 return pRet;
219959 PorterTokenizer *pRet;
219967 pRet = (PorterTokenizer*)sqlite3_malloc(sizeof(PorterTokenizer));
219968 if( pRet ){
219969 memset(pRet, 0, sizeof(PorterTokenizer));
219970 rc = pApi->xFindTokenizer(pApi, zBase, &pUserdata, &pRet->tokenizer);
219977 rc = pRet->tokenizer.xCreate(pUserdata, azArg2, nArg2, &pRet->pTokenizer);
219981 fts5PorterDelete((Fts5Tokenizer*)pRet);
219982 pRet = 0;
219984 *ppOut = (Fts5Tokenizer*)pRet;
221970 Fts5VocabTable *pRet = 0;
221995 pRet = sqlite3Fts5MallocZero(&rc, nByte);
221996 if( pRet ){
221997 pRet->pGlobal = (Fts5Global*)pAux;
221998 pRet->eType = eType;
221999 pRet->db = db;
222000 pRet->zFts5Tbl = (char*)&pRet[1];
222001 pRet->zFts5Db = &pRet->zFts5Tbl[nTab];
222002 memcpy(pRet->zFts5Tbl, zTab, nTab);
222003 memcpy(pRet->zFts5Db, zDb, nDb);
222004 sqlite3Fts5Dequote(pRet->zFts5Tbl);
222005 sqlite3Fts5Dequote(pRet->zFts5Db);
222009 *ppVTab = (sqlite3_vtab*)pRet;