Lines Matching refs:zName
1381 const char *zName; /* Name of this virtual file system */ member
1383 int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*,
1385 int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir);
1386 int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut);
1387 int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut);
1405 int (*xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr);
1406 sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*, const char *zName);
1407 const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName);
3825 SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
4922 const char *zName,
4929 const char *zName,
4937 const void *zName,
5717 int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,
5864 const char *zName, /* Name of the module */
5870 const char *zName, /* Name of the module */
10864 char *zName; /* Name of this database */ member
11236 char *zName; /* SQL name of the function. */ member
11307 #define FUNCTION(zName, nArg, iArg, bNC, xFunc) \ argument
11309 SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0, 0}
11310 #define VFUNCTION(zName, nArg, iArg, bNC, xFunc) \ argument
11312 SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0, 0}
11313 #define FUNCTION2(zName, nArg, iArg, bNC, xFunc, extraFlags) \ argument
11315 SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0, 0}
11316 #define STR_FUNCTION(zName, nArg, pArg, bNC, xFunc) \ argument
11318 pArg, 0, xFunc, 0, 0, #zName, 0, 0}
11319 #define LIKEFUNC(zName, nArg, arg, flags) \ argument
11321 (void *)arg, 0, likeFunc, 0, 0, #zName, 0, 0}
11322 #define AGGREGATE(zName, nArg, arg, nc, xStep, xFinal) \ argument
11324 SQLITE_INT_TO_PTR(arg), 0, 0, xStep,xFinal,#zName,0,0}
11325 #define AGGREGATE2(zName, nArg, arg, nc, xStep, xFinal, extraFlags) \ argument
11327 SQLITE_INT_TO_PTR(arg), 0, 0, xStep,xFinal,#zName,0,0}
11336 char *zName; /* Savepoint name (nul-terminated) */ member
11358 const char *zName; /* Name passed to create_module() */ member
11368 char *zName; /* Name of this column */ member
11394 char *zName; /* Name of the collating sequence, UTF-8 encoded */ member
11506 char *zName; /* Name of the table or view */ member
11732 char *zName; /* Name of this index */ member
12054 char *zName; /* Token associated with this expression */ member
12098 char *zName; /* Name of the identifier */ member
12149 char *zName; /* Name of the table */ member
12655 char *zName; /* The name of the trigger */ member
12891 char *zName; /* Name of this CTE */ member
13425 SQLITE_PRIVATE CollSeq *sqlite3LocateCollSeq(Parse *pParse, const char*zName);
14808 char *zName; /* Name of table or index */ member
16792 if( strcmp(zVfs, pVfs->zName)==0 ) break; in sqlite3_vfs_find()
22058 sqlite3StrAccumAppendAll(pAccum, pItem->zName);
25795 const char *zName; /* Name of the system call */
25923 const char *zName, /* Name of system call to override */
25930 if( zName==0 ){
25945 if( strcmp(zName, aSyscall[i].zName)==0 ){
25966 const char *zName
25972 if( strcmp(zName, aSyscall[i].zName)==0 ) return aSyscall[i].pCurrent;
25983 static const char *unixNextSystemCall(sqlite3_vfs *p, const char *zName){
25987 if( zName ){
25989 if( strcmp(zName, aSyscall[i].zName)==0 ) break;
25993 if( aSyscall[i].pCurrent!=0 ) return aSyscall[i].zName;
29272 *(char**)pArg = sqlite3_mprintf("%s", pFile->pVfs->zName);
30733 if( strcmp(pVfs->zName,"unix-excl")==0 ){
31156 const char *zName = zPath;
31172 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_DB );
31173 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_JOURNAL );
31174 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MASTER_JOURNAL );
31175 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_WAL );
31198 pUnused = findReusableFd(zName, flags);
31212 assert( (flags & SQLITE_OPEN_URI) || zName[strlen(zName)+1]==0 );
31214 }else if( !zName ){
31221 zName = zTmpname;
31225 assert( zName[strlen(zName)+1]==0 );
31242 rc = findCreateFileMode(zName, flags, &openMode, &uid, &gid);
31248 fd = robust_open(zName, openFlags, openMode);
31249 OSTRACE(("OPENX %-3d %s 0%o\n", fd, zName, openFlags));
31257 fd = robust_open(zName, openFlags, openMode);
31260 rc = unixLogError(SQLITE_CANTOPEN_BKPT, "open", zName);
31284 zPath = zName;
31286 zPath = sqlite3_mprintf("%s", zName);
31292 osUnlink(zName);
32036 dummyVfs.zName = "dummy";
33653 const char *zName; /* Name of the system call */
34315 const char *zName, /* Name of system call to override */
34322 if( zName==0 ){
34337 if( strcmp(zName, aSyscall[i].zName)==0 ){
34358 const char *zName
34364 if( strcmp(zName, aSyscall[i].zName)==0 ) return aSyscall[i].pCurrent;
34375 static const char *winNextSystemCall(sqlite3_vfs *p, const char *zName){
34379 if( zName ){
34381 if( strcmp(zName, aSyscall[i].zName)==0 ) break;
34385 if( aSyscall[i].pCurrent!=0 ) return aSyscall[i].zName;
35252 LPWSTR zName;
35257 zName = winUtf8ToUnicode(zFilename);
35258 if( zName==0 ){
35268 zTok = osCharLowerW(zName);
35274 pFile->hMutex = osCreateMutexW(NULL, FALSE, zName);
35277 sqlite3_free(zName);
35289 osCharUpperW(zName);
35292 zName);
35301 sqlite3_free(zName);
36484 *(char**)pArg = sqlite3_mprintf("%s", pFile->pVfs->zName);
37805 const char *zName, /* Name of the file (UTF-8) */
37821 const char *zUtf8Name = zName; /* Filename in UTF-8 encoding */
37865 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_DB );
37866 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_JOURNAL );
37867 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MASTER_JOURNAL );
37868 assert( (!isDelete && zName) || eType!=SQLITE_OPEN_WAL );
38019 return winOpen(pVfs, zName, id,
38042 && (rc = winceCreateLock(zName, pFile))!=SQLITE_OK
38047 OSTRACE(("OPEN-CE-LOCK name=%s, rc=%s\n", zName, sqlite3ErrName(rc)));
38065 if( sqlite3_uri_boolean(zName, "psow", SQLITE_POWERSAFE_OVERWRITE) ){
38069 pFile->zPath = zName;
49661 static char zName[15];
49662 sqlite3_snprintf(sizeof(zName), zName, "READ-LOCK[%d]",
49664 return zName;
65395 const char *zName /* Name of table or index being scanned */
65406 pNew->zName = sqlite3DbStrDup(p->db, zName);
65840 const char *zColl = pColl ? pColl->zName : "nil";
65864 sqlite3_snprintf(nTemp, zTemp, "(%.20s)", pColl->zName);
65869 sqlite3_snprintf(nTemp, zTemp, "%s(%d)", pDef->zName, pDef->nArg);
66706 const char *zName, /* Pointer to buffer containing name */
66714 assert( !zName || xDel!=SQLITE_DYNAMIC );
66719 rc = sqlite3VdbeMemSetStr(pColName, zName, -1, SQLITE_UTF8, xDel);
66720 assert( rc!=0 || !zName || (pColName->flags&MEM_Term)!=0 );
67516 sqlite3DbFree(db, p->aScan[i].zName);
69390 rc = db->xWalCallback(db->pWalArg, db, db->aDb[i].zName, nEntry);
69646 const char *zName = context->pFunc->zName;
69650 "unable to use function %s in the requested context", zName);
70354 SQLITE_PRIVATE int sqlite3VdbeParameterIndex(Vdbe *p, const char *zName, int nName){
70359 if( zName ){
70362 if( z && strncmp(z,zName,nName)==0 && z[nName]==0 ){
70369 SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){
70370 return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName));
70520 *(const char**)pOut = pScan->zName;
73602 char *zName; /* Name of savepoint */
73611 zName = pOp->p4.z;
73631 nName = sqlite3Strlen30(zName);
73647 pNew->zName = (char *)&pNew[1];
73648 memcpy(pNew->zName, zName, nName+1);
73673 pSavepoint && sqlite3StrICmp(pSavepoint->zName, zName);
73679 sqlite3SetString(&p->zErrMsg, db, "no such savepoint: %s", zName);
75055 zDb = db->aDb[pC->iDb].zName;
75111 db->aDb[pC->iDb].zName, pOp->p4.z, pC->movetoTarget);
75980 db->aDb[iDb].zName, zMaster, pOp->p4.z);
77287 sqlite3_file_control(db, db->aDb[i].zName, SQLITE_FCNTL_TRACE, zTrace);
77633 if( sqlite3StrICmp(pTab->aCol[iCol].zName, zColumn)==0 ){
77709 sqlite3VdbeChangeP4(v, 1, pTab->zName, P4_TRANSIENT);
80830 const char *zName, /* Name of the journal file */
80843 return sqlite3OsOpen(pVfs, zName, pJfd, flags, 0);
80848 p->zJournal = zName;
81444 if( sqlite3StrICmp(pUsing->a[k].zName, zCol)==0 ) return 1;
81552 assert( db->aDb[i].zName );
81553 if( sqlite3StrICmp(db->aDb[i].zName,zDb)==0 ){
81569 assert( pTab!=0 && pTab->zName!=0 );
81589 const char *zTabName = pItem->zAlias ? pItem->zAlias : pTab->zName;
81599 if( sqlite3StrICmp(pCol->zName, zCol)==0 ){
81650 if( sqlite3StrICmp(pCol->zName, zCol)==0 ){
81716 char *zAs = pEList->a[j].zName;
82022 pExpr->iTable = pDef->zName[0]=='u' ? 8388608 : 125829120;
82026 auth = sqlite3AuthCheck(pParse, SQLITE_FUNCTION, 0, pDef->zName, 0);
82030 pDef->zName);
82128 char *zAs = pEList->a[i].zName;
82517 if( pItem->zName ) pParse->zAuthContext = pItem->zName;
82787 sSrc.a[0].zName = pTab->zName;
83757 pRet->a[i].zName = sqlite3DbStrDup(db, p->a[i].zName);
83805 pItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
83838 pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
83879 pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
83983 assert( pItem->zName==0 );
83984 pItem->zName = sqlite3DbStrNDup(pParse->db, pName->z, pName->n);
83985 if( dequote && pItem->zName ) sqlite3Dequote(pItem->zName);
84041 sqlite3DbFree(db, pItem->zName);
84516 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
84553 VdbeComment((v, "%s", pIdx->zName));
85855 (pExpr->iColumn<0 ? "rowid" : pExpr->pTab->aCol[pExpr->iColumn].zName),
86366 if( pList->a[i].zName ){
86367 sqlite3ExplainPrintf(pOut, " AS %s", pList->a[i].zName);
87515 zWhere = whereOrName(pParse->db, zWhere, p->pFrom->zName);
87541 zWhere = whereOrName(db, zWhere, pTrig->zName);
87561 static void reloadTableSchema(Parse *pParse, Table *pTab, const char *zName){
87580 sqlite3VdbeAddOp4(v, OP_DropTrigger, iTrigDb, 0, 0, pTrig->zName, 0);
87585 sqlite3VdbeAddOp4(v, OP_DropTable, iDb, 0, 0, pTab->zName, 0);
87588 zWhere = sqlite3MPrintf(pParse->db, "tbl_name=%Q", zName);
87610 static int isSystemTable(Parse *pParse, const char *zName){
87611 if( sqlite3Strlen30(zName)>6 && 0==sqlite3StrNICmp(zName, "sqlite_", 7) ){
87612 sqlite3ErrorMsg(pParse, "table %s may not be altered", zName);
87630 char *zName = 0; /* NULL-terminated version of pName */
87649 zDb = db->aDb[iDb].zName;
87653 zName = sqlite3NameFromToken(db, pName);
87654 if( !zName ) goto exit_rename_table;
87659 if( sqlite3FindTable(db, zName, zDb) || sqlite3FindIndex(db, zName, zDb) ){
87661 "there is already another table or index with this name: %s", zName);
87668 if( SQLITE_OK!=isSystemTable(pParse, pTab->zName) ){
87671 if( SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){ goto
87677 sqlite3ErrorMsg(pParse, "view %s may not be altered", pTab->zName);
87684 if( sqlite3AuthCheck(pParse, SQLITE_ALTER_TABLE, zDb, pTab->zName, 0) ){
87721 sqlite3VdbeAddOp4(v, OP_String8, 0, i, 0, zName, 0);
87728 zTabName = pTab->zName;
87740 "WHERE %s;", zDb, SCHEMA_TABLE(iDb), zTabName, zName, zWhere);
87764 zDb, SCHEMA_TABLE(iDb), zName, zName, zName,
87766 zName,
87768 zName, nTabName, zTabName
87778 zDb, zName, pTab->zName);
87792 "WHERE %s;", zName, zName, zWhere);
87803 reloadTableSchema(pParse, p->pFrom, pFrom->zName);
87810 reloadTableSchema(pParse, pTab, zName);
87814 sqlite3DbFree(db, zName);
87871 zDb = db->aDb[iDb].zName;
87872 zTab = &pNew->zName[16]; /* Skip the "sqlite_altertab_" prefix on the name */
87880 if( sqlite3AuthCheck(pParse, SQLITE_ALTER_TABLE, zDb, pTab->zName, 0) ){
87962 reloadTableSchema(pParse, pTab, pTab->zName);
88008 if( SQLITE_OK!=isSystemTable(pParse, pTab->zName) ){
88031 pNew->zName = sqlite3MPrintf(db, "sqlite_altertab_%s", pTab->zName);
88032 if( !pNew->aCol || !pNew->zName ){
88039 pCol->zName = sqlite3DbStrDup(db, pCol->zName);
88241 const char *zName;
88272 const char *zTab = aTable[i].zName;
88274 if( (pStat = sqlite3FindTable(db, zTab, pDb->zName))==0 ){
88281 "CREATE TABLE %Q.%s(%s)", pDb->zName, zTab, aTable[i].zCols
88296 pDb->zName, zTab, zWhereType, zWhere
88310 VdbeComment((v, aTable[i].zName));
89054 if( sqlite3_strnicmp(pTab->zName, "sqlite_", 7)==0 ){
89063 if( sqlite3AuthCheck(pParse, SQLITE_ANALYZE, pTab->zName, 0,
89064 db->aDb[iDb].zName ) ){
89073 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
89078 sqlite3VdbeAddOp4(v, OP_String8, 0, regTabname, 0, pTab->zName, 0);
89091 zIdxName = pTab->zName;
89095 zIdxName = pIdx->zName;
89101 VdbeComment((v, "Analysis for %s.%s", pTab->zName, zIdxName));
89145 VdbeComment((v, "%s", pIdx->zName));
89251 VdbeComment((v, "%s", pTab->aCol[pPk->aiColumn[j]].zName));
89325 VdbeComment((v, "%s", pTab->zName));
89391 openStatTable(pParse, iDb, iStatCur, pOnlyIdx->zName, "idx");
89393 openStatTable(pParse, iDb, iStatCur, pTab->zName, "tbl");
89455 zDb = db->aDb[iDb].zName;
89701 const char *zName,
89704 Index *pIdx = sqlite3FindIndex(db, zName, zDb);
89706 Table *pTab = sqlite3FindTable(db, zName, zDb);
89915 sInfo.zDatabase = db->aDb[iDb].zName;
90022 const char *zName;
90034 zName = (const char *)sqlite3_value_text(argv[1]);
90036 if( zName==0 ) zName = "";
90055 char *z = db->aDb[i].zName;
90056 assert( z && zName );
90057 if( sqlite3StrICmp(z, zName)==0 ){
90058 zErrDyn = sqlite3MPrintf(db, "database %s is already in use", zName);
90083 rc = sqlite3ParseUri(db->pVfs->zName, zFile, &flags, &pVfs, &zPath, &zErr);
90119 aNew->zName = sqlite3DbStrDup(db, zName);
90120 if( rc==SQLITE_OK && aNew->zName==0 ){
90170 rc = sqlite3UserAuthCheckLogin(db, zName, &newAuth);
90220 const char *zName = (const char *)sqlite3_value_text(argv[0]);
90228 if( zName==0 ) zName = "";
90232 if( sqlite3StrICmp(pDb->zName, zName)==0 ) break;
90236 sqlite3_snprintf(sizeof(zErr),zErr, "no such database: %s", zName);
90240 sqlite3_snprintf(sizeof(zErr),zErr, "cannot detach database %s", zName);
90249 sqlite3_snprintf(sizeof(zErr),zErr, "database %s is locked", zName);
90394 pFix->zDb = db->aDb[iDb].zName;
90652 char *zDb = db->aDb[iDb].zName; /* Name of attached database */
90720 zCol = pTab->aCol[iCol].zName;
90723 zCol = pTab->aCol[pTab->iPKey].zName;
90728 if( SQLITE_IGNORE==sqlite3AuthReadCol(pParse, pTab->zName, zCol, iDb) ){
90848 const char *zName; /* Name of the table */
90866 const char *zName /* Name of the table to be locked */
90890 p->zName = zName;
90912 p->zName, P4_STATIC);
91112 SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3 *db, const char *zName, const char *zDatabase){
91121 if( db->auth.authLevel<UAUTH_Admin && sqlite3UserAuthTable(zName)!=0 ){
91127 if( zDatabase!=0 && sqlite3StrICmp(zDatabase, db->aDb[j].zName) ) continue;
91129 p = sqlite3HashFind(&db->aDb[j].pSchema->tblHash, zName);
91148 const char *zName, /* Name of the table we are looking for */
91159 p = sqlite3FindTable(pParse->db, zName, zDbase);
91163 sqlite3ErrorMsg(pParse, "%s: %s.%s", zMsg, zDbase, zName);
91165 sqlite3ErrorMsg(pParse, "%s: %s", zMsg, zName);
91196 zDb = pParse->db->aDb[iDb].zName;
91200 return sqlite3LocateTable(pParse, isView, p->zName, zDb);
91215 SQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3 *db, const char *zName, const char *zDb){
91224 if( zDb && sqlite3StrICmp(zDb, db->aDb[j].zName) ) continue;
91226 p = sqlite3HashFind(&pSchema->idxHash, zName);
91292 sqlite3DbFree(db, pDb->zName);
91293 pDb->zName = 0;
91372 sqlite3DbFree(db, pCol->zName);
91418 char *zName = pIndex->zName;
91420 &pIndex->pSchema->idxHash, zName, 0
91434 sqlite3DbFree(db, pTable->zName);
91482 char *zName;
91484 zName = sqlite3DbStrNDup(db, (char*)pName->z, pName->n);
91485 sqlite3Dequote(zName);
91487 zName = 0;
91489 return zName;
91511 SQLITE_PRIVATE int sqlite3FindDbName(sqlite3 *db, const char *zName){
91513 if( zName ){
91515 int n = sqlite3Strlen30(zName);
91517 if( (!OMIT_TEMPDB || i!=1 ) && n==sqlite3Strlen30(pDb->zName) &&
91518 0==sqlite3StrICmp(pDb->zName, zName) ){
91534 char *zName; /* Name we are searching for */
91535 zName = sqlite3NameFromToken(db, pName);
91536 i = sqlite3FindDbName(db, zName);
91537 sqlite3DbFree(db, zName);
91592 SQLITE_PRIVATE int sqlite3CheckObjectName(Parse *pParse, const char *zName){
91595 && 0==sqlite3StrNICmp(zName, "sqlite_", 7) ){
91596 sqlite3ErrorMsg(pParse, "object name reserved for internal use: %s", zName);
91649 char *zName = 0; /* The name of the new table */
91683 zName = sqlite3NameFromToken(db, pName);
91684 if( zName==0 ) return;
91685 if( SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){
91693 char *zDb = db->aDb[iDb].zName;
91710 if( !isVirtual && sqlite3AuthCheck(pParse, code, zName, 0, zDb) ){
91724 char *zDb = db->aDb[iDb].zName;
91728 pTable = sqlite3FindTable(db, zName, zDb);
91738 if( sqlite3FindIndex(db, zName, zDb)!=0 ){
91739 sqlite3ErrorMsg(pParse, "there is already an index named %s", zName);
91751 pTable->zName = zName;
91764 if( !pParse->nested && strcmp(zName, "sqlite_sequence")==0 ){
91837 sqlite3DbFree(db, zName);
91871 sqlite3ErrorMsg(pParse, "too many columns on %s", p->zName);
91878 if( STRICMP(z, p->aCol[i].zName) ){
91895 pCol->zName = z;
92047 pCol->zName);
92095 "table \"%s\" has more than one primary key", pTab->zName);
92108 if( sqlite3StrICmp(pList->a[i].zName, pTab->aCol[iCol].zName)==0 ){
92228 SQLITE_PRIVATE CollSeq *sqlite3LocateCollSeq(Parse *pParse, const char *zName){
92234 pColl = sqlite3FindCollSeq(db, enc, zName, initbusy);
92236 pColl = sqlite3GetCollSeq(pParse, enc, pColl, zName);
92333 n += identLength(pCol->zName) + 5;
92335 n += identLength(p->zName);
92353 identPut(zStmt, &k, p->zName);
92369 identPut(zStmt, &k, pCol->zName);
92506 pList->a[0].zName = sqlite3DbStrDup(pParse->db,
92507 pTab->aCol[pTab->iPKey].zName);
92649 sqlite3ErrorMsg(pParse, "PRIMARY KEY missing on table %s", p->zName);
92761 db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
92763 p->zName,
92764 p->zName,
92782 pDb->zName
92790 sqlite3MPrintf(db, "tbl_name='%q' AND type!='trigger'", p->zName));
92800 pOld = sqlite3HashInsert(&pSchema->tblHash, p->zName, p);
92811 const char *zName = (const char *)pParse->sNameToken.z;
92817 nName = (int)((const char *)pCons->z - zName);
92818 p->addColOffset = 13 + sqlite3Utf8CharLen(zName, nName);
92944 sqlite3ErrorMsg(pParse, "view %s is circularly defined", pTable->zName);
93083 pParse->db->aDb[iDb].zName, SCHEMA_TABLE(iDb), iTable, r1, r1);
93156 const char *zName /* Name of index or table */
93159 const char *zDbName = pParse->db->aDb[iDb].zName;
93166 zDbName, zTab, zType, zName
93212 pDb->zName, pTab->zName
93226 pDb->zName, SCHEMA_TABLE(iDb), pTab->zName);
93235 sqlite3VdbeAddOp4(v, OP_VDestroy, iDb, 0, 0, pTab->zName, 0);
93237 sqlite3VdbeAddOp4(v, OP_DropTable, iDb, 0, 0, pTab->zName, 0);
93279 const char *zDb = db->aDb[iDb].zName;
93293 zArg2 = sqlite3GetVTable(db, pTab)->pMod->zName;
93302 if( sqlite3AuthCheck(pParse, code, pTab->zName, zArg2, zDb) ){
93305 if( sqlite3AuthCheck(pParse, SQLITE_DELETE, pTab->zName, 0, zDb) ){
93310 if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0
93311 && sqlite3StrNICmp(pTab->zName, "sqlite_stat", 11)!=0 ){
93312 sqlite3ErrorMsg(pParse, "table %s may not be dropped", pTab->zName);
93321 sqlite3ErrorMsg(pParse, "use DROP TABLE to delete table %s", pTab->zName);
93325 sqlite3ErrorMsg(pParse, "use DROP VIEW to delete view %s", pTab->zName);
93336 sqlite3ClearStatTables(pParse, iDb, "tbl", pTab->zName);
93386 p->aCol[iCol].zName, pTo);
93401 nByte += sqlite3Strlen30(pToCol->a[i].zName) + 1;
93423 if( sqlite3StrICmp(p->aCol[j].zName, pFromCol->a[i].zName)==0 ){
93431 pFromCol->a[i].zName);
93438 int n = sqlite3Strlen30(pToCol->a[i].zName);
93440 memcpy(z, pToCol->a[i].zName, n);
93519 if( sqlite3AuthCheck(pParse, SQLITE_REINDEX, pIndex->zName, 0,
93520 db->aDb[iDb].zName ) ){
93526 sqlite3TableLock(pParse, iDb, pTab->tnum, 1, pTab->zName);
93649 char *zName = 0; /* Name of the index */
93711 pTab->zName);
93726 if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0
93729 && sqlite3UserAuthTable(pTab->zName)==0
93731 && sqlite3StrNICmp(&pTab->zName[7],"altertab_",9)!=0 ){
93732 sqlite3ErrorMsg(pParse, "table %s may not be indexed", pTab->zName);
93762 zName = sqlite3NameFromToken(db, pName);
93763 if( zName==0 ) goto exit_create_index;
93765 if( SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){
93769 if( sqlite3FindTable(db, zName, 0)!=0 ){
93770 sqlite3ErrorMsg(pParse, "there is already a table named %s", zName);
93774 if( sqlite3FindIndex(db, zName, pDb->zName)!=0 ){
93776 sqlite3ErrorMsg(pParse, "index %s already exists", zName);
93787 zName = sqlite3MPrintf(db, "sqlite_autoindex_%s_%d", pTab->zName, n);
93788 if( zName==0 ){
93797 const char *zDb = pDb->zName;
93803 if( sqlite3AuthCheck(pParse, i, zName, pTab->zName, zDb) ){
93816 pList->a[0].zName = sqlite3DbStrDup(pParse->db,
93817 pTab->aCol[pTab->nCol-1].zName);
93835 nName = sqlite3Strlen30(zName);
93844 pIndex->zName = zExtra;
93846 memcpy(pIndex->zName, zName, nName+1);
93879 const char *zColName = pListItem->zName;
93884 if( sqlite3StrICmp(zColName, pTabCol->zName)==0 ) break;
93888 pTab->zName, zColName);
94004 pIndex->zName, pIndex);
94062 db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
94063 pIndex->zName,
94064 pTab->zName,
94077 sqlite3MPrintf(db, "name='%q' AND type='index'", pIndex->zName));
94111 sqlite3DbFree(db, zName);
94175 pIndex = sqlite3FindIndex(db, pName->a[0].zName, pName->a[0].zDatabase);
94195 const char *zDb = db->aDb[iDb].zName;
94201 if( sqlite3AuthCheck(pParse, code, pIndex->zName, pTab->zName, zDb) ){
94213 db->aDb[iDb].zName, SCHEMA_TABLE(iDb), pIndex->zName
94215 sqlite3ClearStatTables(pParse, iDb, "idx", pIndex->zName);
94218 sqlite3VdbeAddOp4(v, OP_DropIndex, iDb, 0, 0, pIndex->zName, 0);
94290 pList->a[i].zName = sqlite3NameFromToken(db, pToken);
94301 sqlite3DbFree(db, pList->a[i].zName);
94311 SQLITE_PRIVATE int sqlite3IdListIndex(IdList *pList, const char *zName){
94315 if( sqlite3StrICmp(pList->a[i].zName, zName)==0 ) return i;
94448 pItem->zName = sqlite3NameFromToken(db, pTable);
94480 sqlite3DbFree(db, pItem->zName);
94656 char *zName = sqlite3NameFromToken(pParse->db, pName);
94657 if( zName ){
94663 if( !v || sqlite3AuthCheck(pParse, SQLITE_SAVEPOINT, az[op], zName, 0) ){
94664 sqlite3DbFree(pParse->db, zName);
94667 sqlite3VdbeAddOp4(v, OP_Savepoint, op, 0, 0, zName, P4_DYNAMIC);
94736 if( pDb->pBt && (!zDb || 0==sqlite3StrICmp(zDb, pDb->zName)) ){
94832 char *zCol = pTab->aCol[pIdx->aiColumn[j]].zName;
94834 sqlite3StrAccumAppendAll(&errMsg, pTab->zName);
94857 zMsg = sqlite3MPrintf(pParse->db, "%s.%s", pTab->zName,
94858 pTab->aCol[pTab->iPKey].zName);
94861 zMsg = sqlite3MPrintf(pParse->db, "%s.rowid", pTab->zName);
94979 zDb = db->aDb[iDb].zName;
95049 char *zName;
95053 zName = sqlite3NameFromToken(pParse->db, pName);
95054 if( zName && pWith ){
95057 if( sqlite3StrICmp(zName, pWith->a[i].zName)==0 ){
95058 sqlite3ErrorMsg(pParse, "duplicate WITH table name: %s", zName);
95069 assert( zName!=0 || pNew==0 );
95075 sqlite3DbFree(db, zName);
95080 pNew->a[pNew->nCte].zName = zName;
95098 sqlite3DbFree(db, pCte->zName);
95128 static void callCollNeeded(sqlite3 *db, int enc, const char *zName){
95131 char *zExternal = sqlite3DbStrDup(db, zName);
95140 sqlite3ValueSetStr(pTmp, -1, zName, SQLITE_UTF8, SQLITE_STATIC);
95159 char *z = pColl->zName;
95191 const char *zName /* Collating sequence name */
95198 p = sqlite3FindCollSeq(db, enc, zName, 0);
95204 callCollNeeded(db, enc, zName);
95205 p = sqlite3FindCollSeq(db, enc, zName, 0);
95212 sqlite3ErrorMsg(pParse, "no such collation sequence: %s", zName);
95230 const char *zName = pColl->zName;
95232 CollSeq *p = sqlite3GetCollSeq(pParse, ENC(db), pColl, zName);
95258 const char *zName, /* Name of the collating sequence */
95262 pColl = sqlite3HashFind(&db->aCollSeq, zName);
95265 int nName = sqlite3Strlen30(zName);
95269 pColl[0].zName = (char*)&pColl[3];
95271 pColl[1].zName = (char*)&pColl[3];
95273 pColl[2].zName = (char*)&pColl[3];
95275 memcpy(pColl[0].zName, zName, nName);
95276 pColl[0].zName[nName] = 0;
95277 pDel = sqlite3HashInsert(&db->aCollSeq, pColl[0].zName, pColl);
95312 const char *zName,
95316 if( zName ){
95317 pColl = findCollSeqEntry(db, zName, create);
95399 if( sqlite3StrNICmp(p->zName, zFunc, nFunc)==0 && p->zName[nFunc]==0 ){
95414 int nName = sqlite3Strlen30(pDef->zName);
95415 u8 c1 = (u8)pDef->zName[0];
95417 pOther = functionSearch(pHash, h, pDef->zName, nName);
95452 const char *zName, /* Name of the function. Not null-terminated */
95465 h = (sqlite3UpperToLower[(u8)zName[0]] + nName) % ArraySize(db->aFunc.a);
95469 p = functionSearch(&db->aFunc, h, zName, nName);
95494 p = functionSearch(pHash, h, zName, nName);
95511 pBest->zName = (char *)&pBest[1];
95514 memcpy(pBest->zName, zName, nName);
95515 pBest->zName[nName] = 0;
95653 sqlite3ErrorMsg(pParse, "table %s may not be modified", pTab->zName);
95659 sqlite3ErrorMsg(pParse,"cannot modify %s because it is a view",pTab->zName);
95688 pFrom->a[0].zName = sqlite3DbStrDup(db, pView->zName);
95689 pFrom->a[0].zDatabase = sqlite3DbStrDup(db, db->aDb[iDb].zName);
95883 zDb = db->aDb[iDb].zName;
95884 rcauth = sqlite3AuthCheck(pParse, SQLITE_DELETE, pTab->zName, 0, zDb);
95902 sqlite3AuthContextPush(pParse, &sContext, pTab->zName);
95950 sqlite3TableLock(pParse, iDb, pTab->tnum, 1, pTab->zName);
95953 pTab->zName, P4_STATIC);
96263 sqlite3VdbeChangeP4(v, -1, pTab->zName, P4_TRANSIENT);
96323 VdbeModuleComment((v, "GenRowIdxDel for %s", pIdx->zName));
98042 static void setLikeOptFlag(sqlite3 *db, const char *zName, u8 flagVal){
98044 pDef = sqlite3FindFunction(db, zName, sqlite3Strlen30(zName),
98445 if( !sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName, zKey) ) return 0;
98491 zIdxCol = pParent->aCol[iCol].zName;
98509 pFKey->pFrom->zName, pFKey->zTo);
98703 if( zColl==0 ) zColl = db->pDfltColl->zName;
98811 zCol = pFKey->pFrom->aCol[iCol].zName;
98889 return (FKey *)sqlite3HashFind(&pTab->pSchema->fkeyHash, pTab->zName);
99030 if( 0==sqlite3StrICmp(pCol->zName, zKey) ) return 1;
99099 zDb = db->aDb[iDb].zName;
99113 && sqlite3_stricmp(pTab->zName, pFKey->zTo)!=0
99167 char *zCol = pTo->aCol[pIdx ? pIdx->aiColumn[i] : pTo->iPKey].zName;
99168 rcauth = sqlite3AuthReadCol(pParse, pTo->zName, zCol, iDb);
99177 sqlite3TableLock(pParse, iDb, pTo->tnum, 0, pTo->zName);
99233 pItem->zName = pFKey->pFrom->zName;
99264 pItem->zName = 0;
99415 tToCol.z = pTab->aCol[pIdx ? pIdx->aiColumn[i] : pTab->iPKey].zName;
99416 tFromCol.z = pFKey->pFrom->aCol[iFromCol].zName;
99476 zFrom = pFKey->pFrom->zName;
99668 (opcode==OP_OpenWrite)?1:0, pTab->zName);
99671 VdbeComment((v, "%s", pTab->zName));
99678 VdbeComment((v, "%s", pTab->zName));
99893 sqlite3VdbeAddOp4(v, OP_String8, 0, memId-1, 0, p->pTab->zName, 0);
100136 zTab = pTabList->a[0].zName;
100145 zDb = pDb->zName;
100146 if( sqlite3AuthCheck(pParse, SQLITE_INSERT, pTab->zName, 0, zDb) ){
100239 if( sqlite3StrICmp(pColumn->a[i].zName, pTab->aCol[j].zName)==0 ){
100249 if( sqlite3IsRowid(pColumn->a[i].zName) && !withoutRowid ){
100254 pTabList, 0, pColumn->a[i].zName);
100836 char *zMsg = sqlite3MPrintf(db, "%s.%s", pTab->zName,
100837 pTab->aCol[i].zName);
100872 char *zName = pCheck->a[i].zName;
100873 if( zName==0 ) zName = pTab->zName;
100876 onError, zName, P4_TRANSIENT,
101034 VdbeComment((v, "%s", iField<0 ? "rowid" : pTab->aCol[iField].zName));
101037 VdbeComment((v, "for %s", pIdx->zName));
101086 VdbeComment((v, "%s.%s", pTab->zName,
101087 pTab->aCol[pPk->aiColumn[i]].zName));
101227 sqlite3VdbeChangeP4(v, -1, pTab->zName, P4_TRANSIENT);
101284 sqlite3TableLock(pParse, iDb, pTab->tnum, op==OP_OpenWrite, pTab->zName);
101296 VdbeComment((v, "%s", pIdx->zName));
101620 sqlite3VdbeChangeP4(v, -1, pDest->zName, 0);
101625 sqlite3TableLock(pParse, iDbDest, pDest->tnum, 1, pDest->zName);
101626 sqlite3TableLock(pParse, iDbSrc, pSrc->tnum, 0, pSrc->zName);
101636 VdbeComment((v, "%s", pSrcIdx->zName));
101640 VdbeComment((v, "%s", pDestIdx->zName));
101898 int (*bind_parameter_index)(sqlite3_stmt*,const char*zName);
103210 const char *const zName; /* Name of pragma */
103803 const char *zName;
103805 case OE_SetNull: zName = "SET NULL"; break;
103806 case OE_SetDflt: zName = "SET DEFAULT"; break;
103807 case OE_Cascade: zName = "CASCADE"; break;
103808 case OE_Restrict: zName = "RESTRICT"; break;
103809 default: zName = "NO ACTION";
103812 return zName;
103902 zDb = pId2->n>0 ? pDb->zName : 0;
103954 rc = sqlite3_stricmp(zLeft, aPragmaNames[mid].zName);
104552 returnSingleInt(pParse, pPragma->zName, (db->flags & pPragma->iArg)!=0 );
104622 sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pCol->zName, 0);
104658 sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, pTab->zName, 0);
104666 sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pIdx->zName, 0);
104711 sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, pTab->aCol[cnum].zName, 0);
104742 sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pIdx->zName, 0);
104761 assert( db->aDb[i].zName!=0 );
104763 sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, db->aDb[i].zName, 0);
104781 sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pColl->zName, 0);
104819 pTab->aCol[pFK->aCol[j].iFrom].zName, 0);
104874 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
104877 sqlite3VdbeAddOp4(v, OP_String8, 0, regResult, 0, pTab->zName,
104883 sqlite3TableLock(pParse, iDb, pParent->tnum, 0, pParent->zName);
105057 VdbeComment((v, "%s", pTab->zName));
105062 VdbeComment((v, "%s", pIdx->zName));
105075 sqlite3MPrintf(db, "*** in database %s ***\n", db->aDb[i].zName),
105118 zErr = sqlite3MPrintf(db, "NULL value in %s.%s", pTab->zName,
105119 pTab->aCol[j].zName);
105146 pIdx->zName, P4_TRANSIENT);
105194 sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, pIdx->zName, P4_TRANSIENT);
105234 char *zName;
105256 sqlite3VdbeChangeP4(v, -1, encnames[ENC(pParse->db)].zName, P4_STATIC);
105268 for(pEnc=&encnames[0]; pEnc->zName; pEnc++){
105269 if( 0==sqlite3StrICmp(zRight, pEnc->zName) ){
105275 if( !pEnc->zName ){
105504 if( db->aDb[i].zName==0 ) continue;
105505 sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, db->aDb[i].zName, P4_STATIC);
105509 }else if( sqlite3_file_control(db, i ? db->aDb[i].zName : 0,
105683 pIndex = sqlite3FindIndex(db, argv[0], db->aDb[iDb].zName);
105777 pTab = sqlite3FindTable(db, zMasterName, db->aDb[iDb].zName);
105900 db->aDb[iDb].zName, zMasterName);
106170 const char *zDb = db->aDb[i].zName;
106617 SQLITE_PRIVATE void sqlite3SelectSetName(Select *p, const char *zName){
106618 if( p && zName ){
106619 sqlite3_snprintf(sizeof(p->zSelName), p->zSelName, "%s", zName);
106721 if( sqlite3StrICmp(pTab->aCol[i].zName, zCol)==0 ) return i;
106881 char *zName; /* Name of column in the right table */
106885 zName = pRightTab->aCol[j].zName;
106886 if( tableAndColumnIndex(pSrc, i+1, zName, &iLeft, &iLeftCol) ){
106920 char *zName; /* Name of the term in the USING clause */
106925 zName = pList->a[j].zName;
106926 iRightCol = columnIndex(pRightTab, zName);
106928 || !tableAndColumnIndex(pSrc, i+1, zName, &iLeft, &iLeftCol)
106931 "not present in both tables", zName);
107177 VdbeComment((v, "%s", pEList->a[i].zName));
107693 VdbeComment((v, "%s", aOutEx[i].zName ? aOutEx[i].zName : aOutEx[i].zSpan));
107873 zOrigCol = pTab->aCol[iCol].zName;
107876 zOrigTab = pTab->zName;
107879 zOrigDb = pNC->pParse->db->aDb[iDb].zName;
107993 if( pEList->a[i].zName ){
107994 char *zName = pEList->a[i].zName;
107995 sqlite3VdbeSetColName(v, i, COLNAME_NAME, zName, SQLITE_TRANSIENT);
108010 zCol = pTab->aCol[iCol].zName;
108016 char *zName = 0;
108017 zName = sqlite3MPrintf(db, "%s.%s", pTab->zName, zCol);
108018 sqlite3VdbeSetColName(v, i, COLNAME_NAME, zName, SQLITE_DYNAMIC);
108056 char *zName; /* Column name */
108074 if( (zName = pEList->a[i].zName)!=0 ){
108076 zName = sqlite3DbStrDup(db, zName);
108089 zName = sqlite3MPrintf(db, "%s",
108090 iCol>=0 ? pTab->aCol[iCol].zName : "rowid");
108093 zName = sqlite3MPrintf(db, "%s", pColExpr->u.zToken);
108096 zName = sqlite3MPrintf(db, "%s", pEList->a[i].zSpan);
108100 sqlite3DbFree(db, zName);
108107 nName = sqlite3Strlen30(zName);
108109 if( sqlite3StrICmp(aCol[j].zName, zName)==0 ){
108112 for(k=nName-1; k>1 && sqlite3Isdigit(zName[k]); k--){}
108113 if( k>=0 && zName[k]==':' ) nName = k;
108114 zName[nName] = 0;
108115 zNewName = sqlite3MPrintf(db, "%s:%d", zName, ++cnt);
108116 sqlite3DbFree(db, zName);
108117 zName = zNewName;
108119 if( zName==0 ) break;
108122 pCol->zName = zName;
108126 sqlite3DbFree(db, aCol[j].zName);
108178 pCol->zColl = sqlite3DbStrDup(db, pColl->zName);
108208 pTab->zName = 0;
108364 sqlite3ExprAddCollateString(pParse, pTerm, pColl->zName);
109927 pParse->zAuthContext = pSubitem->zName;
110006 sqlite3DbFree(db, pSubitem->zName);
110009 pSubitem->zName = 0;
110110 if( pList->a[i].zName==0 ){
110111 char *zName = sqlite3DbStrDup(db, pList->a[i].zSpan);
110112 sqlite3Dequote(zName);
110113 pList->a[i].zName = zName;
110283 pIdx && sqlite3StrICmp(pIdx->zName, zIndex);
110382 const char *zName;
110383 if( pItem->zDatabase==0 && (zName = pItem->zName)!=0 ){
110388 if( sqlite3StrICmp(zName, p->a[i].zName)==0 ){
110457 sqlite3ErrorMsg(pParse, pCte->zErr, pCte->zName);
110465 pTab->zName = sqlite3DbStrDup(db, pCte->zName);
110482 && pItem->zName!=0
110483 && 0==sqlite3StrICmp(pItem->zName, pCte->zName)
110496 pParse, "multiple references to recursive table: %s", pCte->zName
110512 pCte->zName, pEList->nExpr, pCte->pCols->nExpr
110631 if( pFrom->zName==0 ){
110641 pTab->zName = sqlite3MPrintf(db, "sqlite_sq_%p", (void*)pTab);
110655 pTab->zName);
110666 sqlite3SelectSetName(pFrom->pSelect, pTab->zName);
110729 pNew->a[pNew->nExpr-1].zName = a[k].zName;
110731 a[k].zName = 0;
110752 zTabName = pTab->zName;
110761 zSchemaName = iDb>=0 ? db->aDb[iDb].zName : "*";
110764 char *zName = pTab->aCol[j].zName;
110769 assert( zName );
110788 && tableAndColumnIndex(pTabList, i, zName, 0, 0)
110794 if( sqlite3IdListIndex(pFrom->pUsing, zName)>=0 ){
110800 pRight = sqlite3Expr(db, TK_ID, zName);
110801 zColname = zName;
110812 zColname = sqlite3MPrintf(db, "%s.%s", zTabName, zName);
111146 pTab->zName,
111148 bCover ? pIdx->zName : ""
111309 VdbeComment((v, "%s", pItem->pTab->zName));
111338 VdbeComment((v, "materialize \"%s\"", pItem->pTab->zName));
111340 VdbeNoopComment((v, "materialize \"%s\"", pItem->pTab->zName));
111348 VdbeComment((v, "end %s", pItem->pTab->zName));
111828 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
112012 sqlite3XPrintf(&x, 0, " %s.%s", pItem->zDatabase, pItem->zName);
112013 }else if( pItem->zName ){
112014 sqlite3XPrintf(&x, 0, " %s", pItem->zName);
112017 sqlite3XPrintf(&x, 0, " tabname=%Q", pItem->pTab->zName);
112338 && 0==sqlite3StrICmp(pTrig->table, pTab->zName)
112371 char *zName = 0; /* Name of the trigger */
112455 zName = sqlite3NameFromToken(db, pName);
112456 if( !zName || SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){
112460 if( sqlite3HashFind(&(db->aDb[iDb].pSchema->trigHash),zName) ){
112471 if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0 ){
112494 const char *zDb = db->aDb[iTabDb].zName;
112495 const char *zDbTrig = isTemp ? db->aDb[1].zName : zDb;
112497 if( sqlite3AuthCheck(pParse, code, zName, pTab->zName, zDbTrig) ){
112518 pTrigger->zName = zName;
112519 zName = 0;
112520 pTrigger->table = sqlite3DbStrDup(db, pTableName->a[0].zName);
112531 sqlite3DbFree(db, zName);
112552 char *zName; /* Name of trigger */
112560 zName = pTrig->zName;
112567 nameToken.z = pTrig->zName;
112590 db->aDb[iDb].zName, SCHEMA_TABLE(iDb), zName,
112595 sqlite3MPrintf(db, "type='trigger' AND name='%q'", zName));
112602 pTrig = sqlite3HashInsert(pHash, zName, pTrig);
112746 sqlite3DbFree(db, pTrigger->zName);
112765 const char *zName;
112775 zName = pName->a[0].zName;
112779 if( zDb && sqlite3StrICmp(db->aDb[j].zName, zDb) ) continue;
112781 pTrigger = sqlite3HashFind(&(db->aDb[j].pSchema->trigHash), zName);
112825 const char *zDb = db->aDb[iDb].zName;
112828 if( sqlite3AuthCheck(pParse, code, pTrigger->zName, pTable->zName, zDb) ||
112856 sqlite3VdbeChangeP4(v, base+1, pTrigger->zName, P4_TRANSIENT);
112860 sqlite3VdbeAddOp4(v, OP_DropTrigger, iDb, 0, 0, pTrigger->zName, 0);
112870 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTrigger(sqlite3 *db, int iDb, const char *zName){
112876 pTrigger = sqlite3HashInsert(pHash, zName, 0);
112902 if( sqlite3IdListIndex(pIdList, pEList->a[e].zName)>=0 ) return 1;
112960 pSrc->a[pSrc->nSrc-1].zName = sqlite3DbStrDup(db, pStep->zTarget);
112964 pSrc->a[pSrc->nSrc-1].zDatabase = sqlite3DbStrDup(db, db->aDb[iDb].zName);
113101 assert( pTrigger->zName==0 || pTab==tableOfTrigger(pTrigger) );
113128 pSubParse->zAuthContext = pTrigger->zName;
113135 pTrigger->zName, onErrorText(orconf),
113140 pTab->zName
113144 sqlite3MPrintf(db, "-- TRIGGER %s", pTrigger->zName), P4_DYNAMIC
113170 VdbeComment((v, "End: %s.%s", pTrigger->zName, onErrorText(orconf)));
113208 assert( pTrigger->zName==0 || pTab==tableOfTrigger(pTrigger) );
113249 int bRecursive = (p->zName && 0==(pParse->db->flags&SQLITE_RecTriggers));
113254 (v, "Call: %s.%s", (p->zName?p->zName:"fkey"), onErrorText(orconf)));
113465 VdbeComment((v, "%s.%s", pTab->zName, pCol->zName));
113623 if( sqlite3StrICmp(pTab->aCol[j].zName, pChanges->a[i].zName)==0 ){
113635 if( pPk==0 && sqlite3IsRowid(pChanges->a[i].zName) ){
113640 sqlite3ErrorMsg(pParse, "no such column: %s", pChanges->a[i].zName);
113648 rc = sqlite3AuthCheck(pParse, SQLITE_UPDATE, pTab->zName,
113649 j<0 ? "ROWID" : pTab->aCol[j].zName,
113650 db->aDb[iDb].zName);
113724 sqlite3AuthContextPush(pParse, &sContext, pTab->zName);
114133 pExpr = sqlite3Expr(db, TK_ID, pTab->aCol[i].zName);
114349 assert( strcmp(pDb->zName,"vacuum_db")==0 );
114586 const char *zName, /* Name assigned to this module */
114595 nName = sqlite3Strlen30(zName);
114596 if( sqlite3HashFind(&db->aModule, zName) ){
114604 memcpy(zCopy, zName, nName+1);
114605 pMod->zName = zCopy;
114630 const char *zName, /* Name assigned to this module */
114635 if( !sqlite3SafetyCheckOk(db) || zName==0 ) return SQLITE_MISUSE_BKPT;
114637 return createModule(db, zName, pModule, pAux, 0);
114645 const char *zName, /* Name assigned to this module */
114651 if( !sqlite3SafetyCheckOk(db) || zName==0 ) return SQLITE_MISUSE_BKPT;
114653 return createModule(db, zName, pModule, pAux, xDestroy);
114884 addModuleArgument(db, pTable, sqlite3DbStrDup(db, pTable->zName));
114899 sqlite3AuthCheck(pParse, SQLITE_CREATE_VTABLE, pTable->zName,
114900 pTable->azModuleArg[0], pParse->db->aDb[iDb].zName);
114964 db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
114965 pTab->zName,
114966 pTab->zName,
114975 zWhere = sqlite3MPrintf(db, "name='%q' AND type='table'", pTab->zName);
114979 sqlite3VdbeAddOp4(v, OP_String8, 0, iReg, 0, pTab->zName, 0);
114991 const char *zName = pTab->zName;
114993 pOld = sqlite3HashInsert(&pSchema->tblHash, zName, pTab);
115054 "vtable constructor called recursively: %s", pTab->zName
115060 zModuleName = sqlite3MPrintf(db, "%s", pTab->zName);
115074 pTab->azModuleArg[1] = db->aDb[iDb].zName;
115105 *pzErr = sqlite3MPrintf(db, zFormat, pTab->zName);
115244 pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zName);
115354 pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zName);
115589 zLowerName = sqlite3DbStrDup(db, pDef->zName);
115604 + sqlite3Strlen30(pDef->zName) + 1);
115609 pNew->zName = (char *)&pNew[1];
115610 memcpy(pNew->zName, pDef->zName, sqlite3Strlen30(pDef->zName)+1);
116660 if( sqlite3StrICmp(pColl->zName, pScan->zCollName) ){
117710 if( pColl && 0==sqlite3StrICmp(pColl->zName, zColl) ){
117928 "automatic index on %s(%s)", pTable->zName,
117929 pTable->aCol[iCol].zName);
117969 pIdx->zName = "auto-index";
117984 pIdx->azColl[n] = pColl ? pColl->zName : "BINARY";
118016 VdbeComment((v, "for %s", pTable->zName));
118193 "table %s: xBestIndex returned an invalid plan", pTab->zName);
119116 VdbeComment((v, "begin skip-scan on %s", pIdx->zName));
119126 VdbeComment((v, "%s", pIdx->pTable->aCol[pIdx->aiColumn[j]].zName));
119218 char *z = aiColumn[i] < 0 ? "rowid" : aCol[aiColumn[i]].zName;
119229 char *z = aiColumn[j] < 0 ? "rowid" : aCol[aiColumn[j]].zName;
119233 char *z = aiColumn[j] < 0 ? "rowid" : aCol[aiColumn[j]].zName;
119285 sqlite3XPrintf(&str, 0, " TABLE %s", pItem->zName);
119313 sqlite3XPrintf(&str, 0, zFmt, pIdx->zName);
119372 zObj = pLoop->u.btree.pIndex->zName;
119374 zObj = pSrclist->a[pLvl->iFrom].zName;
119452 VdbeModuleComment((v, "Begin WHERE-loop%d: %s",iLevel,pTabItem->pTab->zName));
119483 VdbeComment((v, "next row of \"%s\"", pTabItem->pTab->zName));
120355 pItem->zAlias ? pItem->zAlias : pTab->zName);
120357 const char *zName;
120358 if( p->u.btree.pIndex && (zName = p->u.btree.pIndex->zName)!=0 ){
120359 if( strncmp(zName, "sqlite_autoindex_", 17)==0 ){
120360 int i = sqlite3Strlen30(zName) - 1;
120361 while( zName[i]!='_' ) i--;
120362 zName += i;
120364 sqlite3DebugPrintf(".%-16s %2d", zName, p->u.btree.nEq);
121544 sqlite3ErrorMsg(pParse, "%s.xBestIndex() malfunction", pTab->zName);
121873 z1 = pColl->zName;
121876 z2 = pColl->zName;
121957 if( sqlite3StrICmp(pColl->zName, pIndex->azColl[j])!=0 ) continue;
122054 static char zName[65];
122056 for(i=0; i<nLoop; i++){ zName[i] = pPath->aLoop[i]->cId; }
122057 if( pLast ) zName[i++] = pLast->cId;
122058 zName[i] = 0;
122059 return zName;
122947 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
122990 VdbeComment((v, "%s", pIx->zName));
123086 VdbeComment((v, "next skip-scan on %s", pLoop->u.btree.pIndex->zName));
123118 pWInfo->pTabList->a[pLevel->iFrom].pTab->zName));
125799 pNew->zName = pOld->zName;
125802 pOld->zName = pOld->zDatabase = 0;
129202 const char *zName = 0;
129204 for(i=0; i<2 && zName==0; i++, rc &= 0xff){
129206 case SQLITE_OK: zName = "SQLITE_OK"; break;
129207 case SQLITE_ERROR: zName = "SQLITE_ERROR"; break;
129208 case SQLITE_INTERNAL: zName = "SQLITE_INTERNAL"; break;
129209 case SQLITE_PERM: zName = "SQLITE_PERM"; break;
129210 case SQLITE_ABORT: zName = "SQLITE_ABORT"; break;
129211 case SQLITE_ABORT_ROLLBACK: zName = "SQLITE_ABORT_ROLLBACK"; break;
129212 case SQLITE_BUSY: zName = "SQLITE_BUSY"; break;
129213 case SQLITE_BUSY_RECOVERY: zName = "SQLITE_BUSY_RECOVERY"; break;
129214 case SQLITE_BUSY_SNAPSHOT: zName = "SQLITE_BUSY_SNAPSHOT"; break;
129215 case SQLITE_LOCKED: zName = "SQLITE_LOCKED"; break;
129216 case SQLITE_LOCKED_SHAREDCACHE: zName = "SQLITE_LOCKED_SHAREDCACHE";break;
129217 case SQLITE_NOMEM: zName = "SQLITE_NOMEM"; break;
129218 case SQLITE_READONLY: zName = "SQLITE_READONLY"; break;
129219 case SQLITE_READONLY_RECOVERY: zName = "SQLITE_READONLY_RECOVERY"; break;
129220 case SQLITE_READONLY_CANTLOCK: zName = "SQLITE_READONLY_CANTLOCK"; break;
129221 case SQLITE_READONLY_ROLLBACK: zName = "SQLITE_READONLY_ROLLBACK"; break;
129222 case SQLITE_READONLY_DBMOVED: zName = "SQLITE_READONLY_DBMOVED"; break;
129223 case SQLITE_INTERRUPT: zName = "SQLITE_INTERRUPT"; break;
129224 case SQLITE_IOERR: zName = "SQLITE_IOERR"; break;
129225 case SQLITE_IOERR_READ: zName = "SQLITE_IOERR_READ"; break;
129226 case SQLITE_IOERR_SHORT_READ: zName = "SQLITE_IOERR_SHORT_READ"; break;
129227 case SQLITE_IOERR_WRITE: zName = "SQLITE_IOERR_WRITE"; break;
129228 case SQLITE_IOERR_FSYNC: zName = "SQLITE_IOERR_FSYNC"; break;
129229 case SQLITE_IOERR_DIR_FSYNC: zName = "SQLITE_IOERR_DIR_FSYNC"; break;
129230 case SQLITE_IOERR_TRUNCATE: zName = "SQLITE_IOERR_TRUNCATE"; break;
129231 case SQLITE_IOERR_FSTAT: zName = "SQLITE_IOERR_FSTAT"; break;
129232 case SQLITE_IOERR_UNLOCK: zName = "SQLITE_IOERR_UNLOCK"; break;
129233 case SQLITE_IOERR_RDLOCK: zName = "SQLITE_IOERR_RDLOCK"; break;
129234 case SQLITE_IOERR_DELETE: zName = "SQLITE_IOERR_DELETE"; break;
129235 case SQLITE_IOERR_NOMEM: zName = "SQLITE_IOERR_NOMEM"; break;
129236 case SQLITE_IOERR_ACCESS: zName = "SQLITE_IOERR_ACCESS"; break;
129238 zName = "SQLITE_IOERR_CHECKRESERVEDLOCK"; break;
129239 case SQLITE_IOERR_LOCK: zName = "SQLITE_IOERR_LOCK"; break;
129240 case SQLITE_IOERR_CLOSE: zName = "SQLITE_IOERR_CLOSE"; break;
129241 case SQLITE_IOERR_DIR_CLOSE: zName = "SQLITE_IOERR_DIR_CLOSE"; break;
129242 case SQLITE_IOERR_SHMOPEN: zName = "SQLITE_IOERR_SHMOPEN"; break;
129243 case SQLITE_IOERR_SHMSIZE: zName = "SQLITE_IOERR_SHMSIZE"; break;
129244 case SQLITE_IOERR_SHMLOCK: zName = "SQLITE_IOERR_SHMLOCK"; break;
129245 case SQLITE_IOERR_SHMMAP: zName = "SQLITE_IOERR_SHMMAP"; break;
129246 case SQLITE_IOERR_SEEK: zName = "SQLITE_IOERR_SEEK"; break;
129247 case SQLITE_IOERR_DELETE_NOENT: zName = "SQLITE_IOERR_DELETE_NOENT";break;
129248 case SQLITE_IOERR_MMAP: zName = "SQLITE_IOERR_MMAP"; break;
129249 case SQLITE_IOERR_GETTEMPPATH: zName = "SQLITE_IOERR_GETTEMPPATH"; break;
129250 case SQLITE_IOERR_CONVPATH: zName = "SQLITE_IOERR_CONVPATH"; break;
129251 case SQLITE_CORRUPT: zName = "SQLITE_CORRUPT"; break;
129252 case SQLITE_CORRUPT_VTAB: zName = "SQLITE_CORRUPT_VTAB"; break;
129253 case SQLITE_NOTFOUND: zName = "SQLITE_NOTFOUND"; break;
129254 case SQLITE_FULL: zName = "SQLITE_FULL"; break;
129255 case SQLITE_CANTOPEN: zName = "SQLITE_CANTOPEN"; break;
129256 case SQLITE_CANTOPEN_NOTEMPDIR: zName = "SQLITE_CANTOPEN_NOTEMPDIR";break;
129257 case SQLITE_CANTOPEN_ISDIR: zName = "SQLITE_CANTOPEN_ISDIR"; break;
129258 case SQLITE_CANTOPEN_FULLPATH: zName = "SQLITE_CANTOPEN_FULLPATH"; break;
129259 case SQLITE_CANTOPEN_CONVPATH: zName = "SQLITE_CANTOPEN_CONVPATH"; break;
129260 case SQLITE_PROTOCOL: zName = "SQLITE_PROTOCOL"; break;
129261 case SQLITE_EMPTY: zName = "SQLITE_EMPTY"; break;
129262 case SQLITE_SCHEMA: zName = "SQLITE_SCHEMA"; break;
129263 case SQLITE_TOOBIG: zName = "SQLITE_TOOBIG"; break;
129264 case SQLITE_CONSTRAINT: zName = "SQLITE_CONSTRAINT"; break;
129265 case SQLITE_CONSTRAINT_UNIQUE: zName = "SQLITE_CONSTRAINT_UNIQUE"; break;
129266 case SQLITE_CONSTRAINT_TRIGGER: zName = "SQLITE_CONSTRAINT_TRIGGER";break;
129268 zName = "SQLITE_CONSTRAINT_FOREIGNKEY"; break;
129269 case SQLITE_CONSTRAINT_CHECK: zName = "SQLITE_CONSTRAINT_CHECK"; break;
129271 zName = "SQLITE_CONSTRAINT_PRIMARYKEY"; break;
129272 case SQLITE_CONSTRAINT_NOTNULL: zName = "SQLITE_CONSTRAINT_NOTNULL";break;
129274 zName = "SQLITE_CONSTRAINT_COMMITHOOK"; break;
129275 case SQLITE_CONSTRAINT_VTAB: zName = "SQLITE_CONSTRAINT_VTAB"; break;
129277 zName = "SQLITE_CONSTRAINT_FUNCTION"; break;
129278 case SQLITE_CONSTRAINT_ROWID: zName = "SQLITE_CONSTRAINT_ROWID"; break;
129279 case SQLITE_MISMATCH: zName = "SQLITE_MISMATCH"; break;
129280 case SQLITE_MISUSE: zName = "SQLITE_MISUSE"; break;
129281 case SQLITE_NOLFS: zName = "SQLITE_NOLFS"; break;
129282 case SQLITE_AUTH: zName = "SQLITE_AUTH"; break;
129283 case SQLITE_FORMAT: zName = "SQLITE_FORMAT"; break;
129284 case SQLITE_RANGE: zName = "SQLITE_RANGE"; break;
129285 case SQLITE_NOTADB: zName = "SQLITE_NOTADB"; break;
129286 case SQLITE_ROW: zName = "SQLITE_ROW"; break;
129287 case SQLITE_NOTICE: zName = "SQLITE_NOTICE"; break;
129288 case SQLITE_NOTICE_RECOVER_WAL: zName = "SQLITE_NOTICE_RECOVER_WAL";break;
129290 zName = "SQLITE_NOTICE_RECOVER_ROLLBACK"; break;
129291 case SQLITE_WARNING: zName = "SQLITE_WARNING"; break;
129292 case SQLITE_WARNING_AUTOINDEX: zName = "SQLITE_WARNING_AUTOINDEX"; break;
129293 case SQLITE_DONE: zName = "SQLITE_DONE"; break;
129296 if( zName==0 ){
129299 zName = zBuf;
129301 return zName;
129710 const char *zName,
129713 int nName = sqlite3Strlen30(zName);
129717 if( !sqlite3SafetyCheckOk(db) || zName==0 || nArg<-2 ){
129722 if( sqlite3FindFunction(db, zName, nName, nArg, SQLITE_UTF8, 0)==0 ){
129723 rc = sqlite3CreateFunc(db, zName, nArg, SQLITE_UTF8,
130194 const char *zName,
130223 pColl = sqlite3FindCollSeq(db, (u8)enc2, zName, 0);
130239 CollSeq *aColl = sqlite3HashFind(&db->aCollSeq, zName);
130253 pColl = sqlite3FindCollSeq(db, (u8)enc2, zName, 1);
130809 db->aDb[0].zName = "main";
130811 db->aDb[1].zName = "temp";
130985 const char *zName,
130990 return sqlite3_create_collation_v2(db, zName, enc, pCtx, xCompare, 0);
130998 const char *zName,
131007 if( !sqlite3SafetyCheckOk(db) || zName==0 ) return SQLITE_MISUSE_BKPT;
131011 rc = createCollation(db, zName, (u8)enc, pCtx, xCompare, xDel);
131023 const void *zName,
131032 if( !sqlite3SafetyCheckOk(db) || zName==0 ) return SQLITE_MISUSE_BKPT;
131036 zName8 = sqlite3Utf16to8(db, zName, -1, SQLITE_UTF16NATIVE);
131215 if( 0==sqlite3StrICmp(pCol->zName, zColumnName) ){
131733 && (zDbName==0 || sqlite3StrICmp(zDbName, db->aDb[i].zName)==0)
132888 const char *zName; /* virtual table name */
133553 fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_content'", zDb, p->zName);
133555 fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_segments'", zDb,p->zName);
133556 fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_segdir'", zDb, p->zName);
133557 fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_docsize'", zDb, p->zName);
133558 fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_stat'", zDb, p->zName);
133597 zCols, p->zName, zLanguageid
133618 p->zDb, p->zName
133655 p->zDb, p->zName, zContentCols
133663 p->zDb, p->zName
133675 p->zDb, p->zName
133680 p->zDb, p->zName
133862 (p->zContentTbl ? p->zContentTbl : p->zName),
134380 p->zName = zCsr;
136395 char *zSql = sqlite3_mprintf(zFmt, p->zDb, p->zName);
136654 const char *zName, /* Name of SQL function */
136659 const char *zName;
136674 if( strcmp(zName, aOverload[i].zName)==0 ){
136689 const char *zName /* New name of table */
136713 p->zDb, p->zName, zName
136720 p->zDb, p->zName, zName
136726 p->zDb, p->zName, zName
136731 p->zDb, p->zName, zName
136735 p->zDb, p->zName, zName
138995 p->pFts3Tab->zName = &p->pFts3Tab->zDb[nDb+1];
139000 memcpy((char *)p->pFts3Tab->zName, zFts3, nFts3);
139001 sqlite3Fts3Dequote((char *)p->pFts3Tab->zName);
140530 const char *zName,
140543 sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);
141831 const unsigned char *zName;
141838 zName = sqlite3_value_text(argv[0]);
141844 if( zName==0 || n!=sizeof(pPtr) ){
141849 pOld = sqlite3Fts3HashInsert(pHash, (void *)zName, nName, pPtr);
141855 if( zName ){
141856 pPtr = sqlite3Fts3HashFind(pHash, zName, nName);
141859 char *zErr = sqlite3_mprintf("unknown tokenizer: %s", zName);
142024 const char *zName;
142046 zName = (const char *)sqlite3_value_text(argv[0]);
142051 p = (sqlite3_tokenizer_module *)sqlite3Fts3HashFind(pHash, zName, nName+1);
142054 char *zErr2 = sqlite3_mprintf("unknown tokenizer: %s", zName);
142106 char *zName,
142118 sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);
142128 char *zName,
142141 sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);
142226 const char *zName
142236 zTest = sqlite3_mprintf("%s_test", zName);
142237 zTest2 = sqlite3_mprintf("%s_internal_test", zName);
142244 rc = sqlite3_create_function(db, zName, 1, any, p, scalarFunc, 0, 0);
142247 rc = sqlite3_create_function(db, zName, 2, any, p, scalarFunc, 0, 0);
142582 const char *zName,
142587 int nName = (int)strlen(zName);
142589 p = (sqlite3_tokenizer_module *)sqlite3Fts3HashFind(pHash, zName, nName+1);
142591 sqlite3Fts3ErrMsg(pzErr, "unknown tokenizer: %s", zName);
143359 zSql = sqlite3_mprintf(azSql[eStmt], p->zDb, p->zName, p->zWriteExprlist);
143363 zSql = sqlite3_mprintf(azSql[eStmt], p->zDb, p->zName);
144162 p->zSegmentsTbl = sqlite3_mprintf("%s_segments", p->zName);
151093 char *zName; /* Name of r-tree table */
151796 pRtree->zDb, pRtree->zName,
151797 pRtree->zDb, pRtree->zName,
151798 pRtree->zDb, pRtree->zName
153901 , pRtree->zDb, pRtree->zName, zNewName
153902 , pRtree->zDb, pRtree->zName, zNewName
153903 , pRtree->zDb, pRtree->zName, zNewName
153924 zSql = sqlite3_mprintf(zFmt, pRtree->zDb, pRtree->zName);
154109 pRtree->zDb, pRtree->zName
154170 pRtree->zName = &pRtree->zDb[nDb+1];
154175 memcpy(pRtree->zName, argv[2], nName);
154654 const char *zName, /* Name of ICU function that failed */
154658 sqlite3_snprintf(128, zBuf, "ICU error: %s(): %s", zName, u_errorName(e));
154867 const char *zName; /* SQL Collation sequence name (eg. "japanese") */
154873 zName = (const char *)sqlite3_value_text(apArg[1]);
154875 if( !zLocale || !zName ){
154886 rc = sqlite3_create_collation_v2(db, zName, SQLITE_UTF16, (void *)pUCollator,
154900 const char *zName; /* Function name */
154930 db, p->zName, p->nArg, p->enc, p->pContext, p->xFunc, 0, 0
155325 char *zName; /* Value of 'name' column */
155444 " ORDER BY name", pTab->db->aDb[pTab->iDb].zName);
155685 pCsr->zName = (char *)sqlite3_column_text(pCsr->pStmt, 0);
155736 pCsr->zName = (char *)sqlite3_column_text(pCsr->pStmt, 0);
155796 sqlite3_result_text(ctx, pCsr->zName, -1, SQLITE_TRANSIENT);